-
Notifications
You must be signed in to change notification settings - Fork 746
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
1.1.5 merge spec tests #2781
1.1.5 merge spec tests #2781
Conversation
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.
Awesome work! I made one subjective suggestion, lmk what you think.
I also had a go at removing the Transaction
new-type, which is possible because the enum
was removed. Code is here paulhauner@63b01d5. Let me know what you think, it's nice to avoid the ssz/tree_hash manual impls.
consensus/state_processing/src/per_epoch_processing/altair/rewards_and_penalties.rs
Show resolved
Hide resolved
I did attempt to go this route after finishing the implementation in the PR. But I got hung up on generics in the Anyways, I think this is much better! Was also wondering if adding |
…1.4-merge-specs � Conflicts: � consensus/types/src/execution_payload.rs
Yeah, I think that would be great. That would have been a nice solution here, but involves some dank macro work that I didn't have an appetite for. |
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.
Very nice! Only a few very minor changes. Feel free to squash-merge after you've addressed them!
.gas_limit | ||
.safe_add(parent.gas_limit.safe_div(T::gas_limit_denominator())?)? | ||
{ | ||
return Err(BlockProcessingError::ExecutionInvalidGasLimitIncrease { |
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.
We can remove these ExecutionInvalidGas*
error variants, too.
.latest_execution_payload_header()? | ||
.block_number | ||
.safe_add(1)?, | ||
BlockProcessingError::ExecutionBlockNumberIncontiguous { |
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.
We can also remove this error variant.
that the broad Ethereum community has elected to override the terminal PoW block. \ | ||
Incorrect use of this flag will cause your node to experience a consensus | ||
failure. Be extremely careful with this flag.") | ||
.takes_value(true) |
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.
I think we should make a "requires" dependency between both "terminal-block-hash-override"
and "terminal-block-hash-epoch-override"
(i.e. you can't supply one without the other).
I can't see how they'd be effective without each other and it would be nice to fail early.
// Gas used is less than the gas limit | ||
if execution_payload.gas_used > execution_payload.gas_limit { | ||
return Err(BlockError::ExecutionPayloadError( | ||
ExecutionPayloadError::GasUsedExceedsLimit, |
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.
We can remove this GasUsedExceedsLimit
error variant.
// The execution payload block hash is not equal to the parent hash | ||
if execution_payload.block_hash == execution_payload.parent_hash { | ||
return Err(BlockError::ExecutionPayloadError( | ||
ExecutionPayloadError::BlockHashEqualsParentHash, |
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.
We can remove this BlockHashEqualsParentHash
error variant.
It looks like there's a consistent stack overflow on Windows 🤔
I'm in the middle of some things, but I'll try have a look. I assume it's due to recursion somewhere. |
Feel free to just leave this, we can pick it up in another PR. |
- Require both "terminal-block-hash-epoch-override" and "terminal-block-hash-override" when either flag is used
* Fix arbitrary check kintsugi * Add merge chain spec fields, and a function to determine which constant to use based on the state variant * increment spec test version * Remove `Transaction` enum wrapper * Remove Transaction new-type * Remove gas validations * Add `--terminal-block-hash-epoch-override` flag * Increment spec tests version to 1.1.5 * Remove extraneous gossip verification ethereum/consensus-specs#2687 * - Remove unused Error variants - Require both "terminal-block-hash-epoch-override" and "terminal-block-hash-override" when either flag is used * - Remove a couple more unused Error variants Co-authored-by: Paul Hauner <[email protected]>
* Fix arbitrary check kintsugi * Add merge chain spec fields, and a function to determine which constant to use based on the state variant * increment spec test version * Remove `Transaction` enum wrapper * Remove Transaction new-type * Remove gas validations * Add `--terminal-block-hash-epoch-override` flag * Increment spec tests version to 1.1.5 * Remove extraneous gossip verification ethereum/consensus-specs#2687 * - Remove unused Error variants - Require both "terminal-block-hash-epoch-override" and "terminal-block-hash-override" when either flag is used * - Remove a couple more unused Error variants Co-authored-by: Paul Hauner <[email protected]>
* Fix arbitrary check kintsugi * Add merge chain spec fields, and a function to determine which constant to use based on the state variant * increment spec test version * Remove `Transaction` enum wrapper * Remove Transaction new-type * Remove gas validations * Add `--terminal-block-hash-epoch-override` flag * Increment spec tests version to 1.1.5 * Remove extraneous gossip verification ethereum/consensus-specs#2687 * - Remove unused Error variants - Require both "terminal-block-hash-epoch-override" and "terminal-block-hash-override" when either flag is used * - Remove a couple more unused Error variants Co-authored-by: Paul Hauner <[email protected]>
* Fix arbitrary check kintsugi * Add merge chain spec fields, and a function to determine which constant to use based on the state variant * increment spec test version * Remove `Transaction` enum wrapper * Remove Transaction new-type * Remove gas validations * Add `--terminal-block-hash-epoch-override` flag * Increment spec tests version to 1.1.5 * Remove extraneous gossip verification ethereum/consensus-specs#2687 * - Remove unused Error variants - Require both "terminal-block-hash-epoch-override" and "terminal-block-hash-override" when either flag is used * - Remove a couple more unused Error variants Co-authored-by: Paul Hauner <[email protected]>
Issue Addressed
1.1.5 spec tests
Proposed Changes
Union
wrapper aroundTransaction
Remove Union from ExecutionPayload transaction type ethereum/consensus-specs#2684TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH
available but not used anywhere yet add TBH_ACTIVATION_EPOCH ethereum/consensus-specs#2682Additional Info