state: Implement EIP-3651: Warm COINBASE#560
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #560 +/- ##
=======================================
Coverage 97.03% 97.03%
=======================================
Files 66 66
Lines 6136 6138 +2
=======================================
+ Hits 5954 5956 +2
Misses 182 182
Flags with carried forward coverage won't be shown. Click here to find out more.
|
| storage[key].access_status = EVMC_ACCESS_WARM; | ||
| } | ||
| // EIP-3651: Warm COINBASE. | ||
| // We cannot touch it here because it may create an account in pre Spurious Dragon. |
There was a problem hiding this comment.
Hm? The condition is >=Shanghai, so not sure how Spurious Dragon is related.
There was a problem hiding this comment.
This refers to the implementation detail that the coinbase is touched after the transaction execution (see some lines below). This gives 2 coinbase account lookups, but it looks we cannot do better because we are not allowed to create the account here for pre Spurious Dragon revisions.
There was a problem hiding this comment.
because we are not allowed to create the account here for pre Spurious Dragon revisions.
Since the condition is >=Shanghai, this can never happen. Or the point of the comment is to explain the condition?
We don't have unit tests for State/Host 😬. We mostly relay on state tests. |
064893a to
daca228
Compare
daca228 to
fe540d3
Compare
Actually, we have some in test/integration/statetest. |
state: Implement EIP-3651: Warm COINBASE
Spec: https://eips.ethereum.org/EIPS/eip-3651
Tested with: ethereum/tests#1082.