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

[Flow EVM] populate receipt root hash in blocks #5542

Merged
merged 6 commits into from
Mar 20, 2024

Conversation

ramtinms
Copy link
Contributor

@ramtinms ramtinms commented Mar 12, 2024

closes: #5509

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 94.73684% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 55.83%. Comparing base (d47a6f5) to head (f7ed559).
Report is 32 commits behind head on master.

Files Patch % Lines
fvm/evm/types/block.go 91.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5542   +/-   ##
=======================================
  Coverage   55.82%   55.83%           
=======================================
  Files        1031     1031           
  Lines      100880   100893   +13     
=======================================
+ Hits        56321    56338   +17     
+ Misses      40230    40223    -7     
- Partials     4329     4332    +3     
Flag Coverage Δ
unittests 55.83% <94.73%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ramtinms ramtinms marked this pull request as ready for review March 18, 2024 19:08
@ramtinms ramtinms requested a review from sideninja March 18, 2024 19:09
@@ -22,6 +23,9 @@ type Block struct {
TotalSupply *big.Int

// ReceiptRoot returns the root hash of the receipts emitted in this block
// Note that this value won't be unique to each block, for example for the
// case of empty trie of receipts or a single receipt with no logs and failed state
// the same receipt root would be reported for block.
Copy link
Contributor

Choose a reason for hiding this comment

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

When is this relevant? what kind of transactions cause same receipt root? direct calls?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we don't have any state root and based on the definition of the receipt hash its going to use the tx result (failed or not failed) as part of the computation. and for example, if two blocks both have a single transaction with failed status and same gas consumption (no logs, etc). they would reference the same receipt root hash.

@ramtinms ramtinms added this pull request to the merge queue Mar 20, 2024
Merged via the queue into master with commit dcb7fee Mar 20, 2024
54 of 55 checks passed
@ramtinms ramtinms deleted the ramtin/5509-populate-receipt-root branch March 20, 2024 20:27
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.

[Flow EVM] populate receiptRoot in the block
4 participants