Skip to content

state: Implement EIP-3651: Warm COINBASE#560

Merged
axic merged 1 commit into
masterfrom
warm_coinbase
Feb 13, 2023
Merged

state: Implement EIP-3651: Warm COINBASE#560
axic merged 1 commit into
masterfrom
warm_coinbase

Conversation

@chfast
Copy link
Copy Markdown
Member

@chfast chfast commented Feb 10, 2023

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 10, 2023

Codecov Report

Merging #560 (fe540d3) into master (791b42b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

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           
Flag Coverage Δ
blockchaintests 76.96% <ø> (ø)
statetests 71.44% <100.00%> (+0.03%) ⬆️
unittests 92.78% <50.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
test/state/state.cpp 98.92% <100.00%> (+0.02%) ⬆️

Copy link
Copy Markdown
Member

@axic axic left a comment

Choose a reason for hiding this comment

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

Any unit test for this?

Comment thread test/state/state.cpp Outdated
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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hm? The condition is >=Shanghai, so not sure how Spurious Dragon is related.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I changed the comment.

@chfast
Copy link
Copy Markdown
Member Author

chfast commented Feb 10, 2023

Any unit test for this?

We don't have unit tests for State/Host 😬. We mostly relay on state tests.

@axic axic merged commit 676027e into master Feb 13, 2023
@axic axic deleted the warm_coinbase branch February 13, 2023 13:46
@chfast
Copy link
Copy Markdown
Member Author

chfast commented Feb 13, 2023

We don't have unit tests for State/Host grimacing. We mostly relay on state tests.

Actually, we have some in test/integration/statetest.

hanzo-dev pushed a commit to luxcpp/cevm that referenced this pull request Apr 26, 2026
state: Implement EIP-3651: Warm COINBASE
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.

4 participants