Skip to content

Add test with multiple deposit requests with same pubkey but different withdrawal credentials#4085

Merged
jtraglia merged 7 commits into
ethereum:devfrom
debjit-bw:electra-test
Jan 20, 2025
Merged

Add test with multiple deposit requests with same pubkey but different withdrawal credentials#4085
jtraglia merged 7 commits into
ethereum:devfrom
debjit-bw:electra-test

Conversation

@debjit-bw

Copy link
Copy Markdown
Contributor

If a block contained multiple deposits with the same pubkey, Grandine would add them to BeaconState.pending_deposits with the same withdrawal credentials. link

This PR adds a test which checks that the withdrawal credentials associated with the same pubkey are retained, rather than being made the same. It randomly picks 2 deposit requests and their pubkeys are made the same as the top deposit.

fixes partially: #4054

@ethereum ethereum deleted a comment from cheyenne-bot Jan 20, 2025
Comment thread tests/core/pyspec/eth2spec/test/electra/sanity/blocks/test_deposit_transition.py Outdated
@debjit-bw debjit-bw requested a review from mkalinin January 20, 2025 05:09

@mkalinin mkalinin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for this PR!

@mkalinin mkalinin requested a review from jtraglia January 20, 2025 05:11

@jtraglia jtraglia left a comment

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.

This is really great, thank you! 😄

I pushed two small commits to help readability; notably a check which tells the reader that the top-up withdrawal credentials are indeed different.

@jtraglia jtraglia merged commit 188a2ff into ethereum:dev Jan 20, 2025
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.

3 participants