-
Notifications
You must be signed in to change notification settings - Fork 328
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
[evm] Add methods for StatedbAdapter #3964
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3964 +/- ##
==========================================
+ Coverage 75.38% 76.13% +0.75%
==========================================
Files 303 329 +26
Lines 25923 28045 +2122
==========================================
+ Hits 19541 21353 +1812
- Misses 5360 5595 +235
- Partials 1022 1097 +75
... and 4 files with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
// - Add coinbase to access list (EIP-3651) | ||
// - Reset transient storage (EIP-1153) | ||
func (stateDB *StateDBAdapter) Prepare(rules params.Rules, sender, coinbase common.Address, dst *common.Address, precompiles []common.Address, list types.AccessList) { | ||
if rules.IsBerlin { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
early return:
if !rules.IsBerlin {
return
}
SonarCloud Quality Gate failed. 0 Bugs No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Description
In the Shanghai upgrade of EVM, there have been changes to the StateDB Interface, therefore the StatedbAdapter also needs to be modified accordingly.
The modified parts of the new StateDB Interface are as follows:
=>
Among them,
GetTransientState
andSetTransientState
are prepared for EIP-1153, but this EIP is not activated in Shanghai, so it will not be supported in this PR for now.The implementation of the
Prepare
method refers to the implementation in Ethereum.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: