Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove special handling for gas estimation #2274

Merged
merged 2 commits into from
Mar 4, 2024
Merged

Conversation

palango
Copy link
Contributor

@palango palango commented Feb 28, 2024

This is now done by the SkipDebitCredit flag.

Resolves #2267

@palango palango requested a review from piersy February 28, 2024 09:29
Copy link

github-actions bot commented Feb 28, 2024

Coverage from tests in ./e2e_test/... for ./consensus/istanbul/... at commit 8d0f0f9

coverage: 46.3% of statements across all listed packages
coverage:  56.8% of statements in consensus/istanbul
coverage:  23.7% of statements in consensus/istanbul/announce
coverage:  54.3% of statements in consensus/istanbul/backend
coverage:   0.0% of statements in consensus/istanbul/backend/backendtest
coverage:  24.3% of statements in consensus/istanbul/backend/internal/replica
coverage:  63.3% of statements in consensus/istanbul/core
coverage:  45.0% of statements in consensus/istanbul/db
coverage:   0.0% of statements in consensus/istanbul/proxy
coverage:  64.2% of statements in consensus/istanbul/uptime
coverage:  51.8% of statements in consensus/istanbul/validator
coverage:  79.2% of statements in consensus/istanbul/validator/random

Copy link

github-actions bot commented Feb 28, 2024

5890 passed, 1 failed, 45 skipped

Test failures:
  TestWalletNotifications: keystore

Failed
    keystore_test.go:453: wallet list doesn't match required accounts: have 541, want 540
keystore_test.go:481: can&apos;t find event with Kind=0 for 98236cbb3fc0ed453f15c72f6b4fac460ef8d5c6</code></pre></td></tr>
This test report was produced by the test-summary action.  Made with ❤️ in Cambridge.

@piersy
Copy link
Contributor

piersy commented Feb 29, 2024

Hey @palango. I think this change is fine, but I think there is a problem with the previous change.

Looking in ethapi.DoCall:

evm, vmError, err := b.GetEVM(ctx, msg, state, header, &vm.Config{NoBaseFee: true, SkipDebitCredit: true})

We can see that skipDebitCredit is set to true, but ethapi.DoCall is called from ethapi.Call so that previous change is also disabling debit/credit calls for eth_call which I don't think we want, right? I think it makes sense to fix that here and also include a comment for EstimateGas saying that we skip the debit/credit calls.

@palango
Copy link
Contributor Author

palango commented Mar 4, 2024

Hey @palango. I think this change is fine, but I think there is a problem with the previous change.

Looking in ethapi.DoCall:

evm, vmError, err := b.GetEVM(ctx, msg, state, header, &vm.Config{NoBaseFee: true, SkipDebitCredit: true})

We can see that skipDebitCredit is set to true, but ethapi.DoCall is called from ethapi.Call so that previous change is also disabling debit/credit calls for eth_call which I don't think we want, right? I think it makes sense to fix that here and also include a comment for EstimateGas saying that we skip the debit/credit calls.

I fixed that in #2273

Copy link
Contributor

@piersy piersy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

This is now done by the `SkipDebitCredit` flag.

Resolves #2267
@palango palango force-pushed the palango/remove-debit-skip branch from 36746b2 to b854c1b Compare March 4, 2024 11:53
@palango palango enabled auto-merge (squash) March 4, 2024 13:29
@palango palango merged commit 8d0f0f9 into master Mar 4, 2024
26 checks passed
@palango palango deleted the palango/remove-debit-skip branch March 4, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Asymmetry in mechanisms to skip calling debitGasFees & creditGasFees
2 participants