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 dummy payloads for withdrawals #15

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

Nashtare
Copy link
Contributor

@Nashtare Nashtare commented Jan 22, 2024

Fixes an oversight from my review of #4.

The issue is that dummy payloads were still being constructed as if they were at the start of a block, even the one possibly created to include the withdrawals vector. This had the consequence that:

  • txn and receipt tries were set to EMPTY_TRIE_HASH (and so were their trie_after_roots), while if we create a payload for withdrawals after existing transactions, these tries would not be empty;
  • the rest of the GenerationInputs, namely what's commonly called as ExtraBlockData on the plonky2 side was set to Default::default(), which would also cause discrepancies if we were to add a dummy payload after (i.e. gas_used, txn_number, etc).

The fix is kinda drowning in additional cleanup changes (what I was originally doing when I noticed the issue, apologies for this 🙏🏼).

@Nashtare Nashtare added the bug Something isn't working label Jan 22, 2024
@Nashtare Nashtare requested a review from BGluth January 22, 2024 19:50
@Nashtare Nashtare self-assigned this Jan 22, 2024
Copy link
Contributor

@BGluth BGluth left a comment

Choose a reason for hiding this comment

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

LGTM!

@Nashtare Nashtare merged commit 5b5ddcf into 0xPolygonZero:main Jan 22, 2024
2 checks passed
@Nashtare Nashtare deleted the fix_withdrawals branch January 22, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants