-
Notifications
You must be signed in to change notification settings - Fork 784
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
Electra alpha8 spec updates #6496
Conversation
@@ -36,7 +36,7 @@ impl DepositRequest { | |||
pubkey: PublicKeyBytes::empty(), | |||
withdrawal_credentials: Hash256::ZERO, | |||
amount: 0, | |||
signature: Signature::empty(), | |||
signature: SignatureBytes::empty(), |
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.
Should we change the type to SignatureBytes for the other request types as well for consistency?
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.
curious why we did this?
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.
Because we need to allow for invalid bls signature bytes to be sent over the engine api. Otherwise, it becomes a deserialization error when we get the payload from the EL instead of an invalid deposit during processing
consensus/state_processing/src/per_block_processing/process_operations.rs
Outdated
Show resolved
Hide resolved
consensus/state_processing/src/per_block_processing/process_operations.rs
Outdated
Show resolved
Hide resolved
consensus/state_processing/src/per_block_processing/process_operations.rs
Outdated
Show resolved
Hide resolved
consensus/state_processing/src/per_block_processing/process_operations.rs
Show resolved
Hide resolved
consensus/state_processing/src/per_block_processing/process_operations.rs
Outdated
Show resolved
Hide resolved
consensus/state_processing/src/per_block_processing/process_operations.rs
Show resolved
Hide resolved
consensus/state_processing/src/per_epoch_processing/single_pass.rs
Outdated
Show resolved
Hide resolved
Great find 🙌 Turns out there was a spec test to catch this specific case, but it was written incorrectly. This has been fixed in the linked consensus specs PR above |
Nice! Thanks for following that up! |
Some of the tests seem to be failing due to builder stuff. Did you mean to include mock-builder changes in this PR? |
Ahh I didn't realise I pushed the mock builder changes to this PR. I'll revert them and fix the tests. |
I think I've fixed another consensus bug in this commit: The spec iterates over lighthouse/consensus/state_processing/src/upgrade/electra.rs Lines 68 to 76 in ebabd0f
And then another deposit if they meet the conditions lighthouse/consensus/state_processing/src/upgrade/electra.rs Lines 81 to 85 in ebabd0f
lighthouse/consensus/types/src/beacon_state.rs Lines 2170 to 2192 in ebabd0f
Additionally, in this case, the balance of the validator would be set to |
I also simplified some sorting in this commit (non-semantic change): |
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.
Looks good. Let's merge this so we can get other Electra PRs into unstable on top
Great find with the other accounting bug as well! 🙏 I looked through it and also agree with your solution. |
@mergify queue |
🛑 The pull request has been removed from the queue
|
This pull request has been removed from the queue for the following reason: The merge conditions cannot be satisfied due to failing checks: You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
@mergify requeue |
✅ This pull request will be re-embarked automaticallyThe followup |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at d74b2d9 |
Yay! |
Issue Addressed
N/A
Proposed Changes
Implements changes for electra from https://github.com/ethereum/consensus-specs/releases/tag/v1.5.0-alpha.7 and https://github.com/ethereum/consensus-specs/releases/tag/v1.5.0-alpha.8
Other changes from the releases are mostly cosmetic/ do not require changes on our end.
Can be reviewed per commit for each change. However, b28d010 contains bug fixes from all the changes