Skip to content
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

Fix invalid merkle proof generation when there is a large number of unprocessed deposits #3607

Merged
merged 2 commits into from Apr 27, 2022

Conversation

zah
Copy link
Member

@zah zah commented Apr 23, 2022

No description provided.

var pendingDepositsCount =
getStateField(state, eth1_data).deposit_count -
getStateField(state, eth1_deposit_index)
getStateField(state, eth1_data).deposit_count - stateDepositIdx
Copy link
Contributor

Choose a reason for hiding this comment

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

sanity check for stateDepositIdx > deposit_count underflow?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm pretty sure a state carrying such contradicting values would be illegal, but I added some sanity checks regardless.

@github-actions
Copy link

github-actions bot commented Apr 23, 2022

Unit Test Results

     12 files  ±0     834 suites  ±0   53m 38s ⏱️ + 5m 16s
1 686 tests ±0  1 638 ✔️ ±0    48 💤 ±0  0 ±0 
9 825 runs  ±0  9 713 ✔️ ±0  112 💤 ±0  0 ±0 

Results for commit 4a7eda1. ± Comparison against base commit 09b2f4c.

♻️ This comment has been updated with latest results.

@zah zah merged commit abfef0a into unstable Apr 27, 2022
@zah zah deleted the shadow-fork-tentative-fix branch April 27, 2022 09:39
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.

None yet

2 participants