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

transactionHashesRoot calculated in proposeBlock without challenge #639

Merged
merged 2 commits into from
May 6, 2022

Conversation

ChaitanyaKonda
Copy link
Contributor

@ChaitanyaKonda ChaitanyaKonda commented May 6, 2022

This PR replaces blockHash being calculated from block struct object (including transactionHashesRoot) and transactionsHash to just block struct object (including transactionHashesRoot). Also, transactionHashesRoot is now calculated during proposeBlock and so it does not need to be challenged anymore.

Test: This is automatically tested by github actions.

After this transactionHashesRoot PR Before this transactionHashesRoot PR Gas added
Deposit (gas) 8636 8203.03125 433
Single Transfer (gas) 11841.125 11407.03125 434
Double Transfer (gas) 12602 12166.78125 436
Withdraw (gas) 8902.25 8470.40625 432
Finalise Withdraw (gas) 118995 535547 -416552
  • calculated at 32 transactions per block
  • Before this transactionHashesRoot PR is calculated at commit dc6d7464bcc97d16ad2f1ba32aeda82ea25298d1 when finalise withdrawal needed sending all transactions as calldata

@ChaitanyaKonda ChaitanyaKonda added One more approval needed One reviewer has approved this PR but another is needed PRIORITY 0 labels May 6, 2022
@IlyasRidhuan IlyasRidhuan merged commit cb73321 into master May 6, 2022
@IlyasRidhuan IlyasRidhuan deleted the chait/txHashes branch May 6, 2022 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contract change One more approval needed One reviewer has approved this PR but another is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants