Skip to content

feat(executor): transaction and receipts verification#195

Merged
gakonst merged 14 commits intomainfrom
rakita/tx_receipt_verification
Nov 16, 2022
Merged

feat(executor): transaction and receipts verification#195
gakonst merged 14 commits intomainfrom
rakita/tx_receipt_verification

Conversation

@rakita
Copy link
Collaborator

@rakita rakita commented Nov 11, 2022

Transaction and receipts verification.

Removal of receipts from a sealed block( as in all cases they are not obtained from outside but generated inside executor) and receipt root is checked for verification after execution.

left it as draft and will promote it after EIP check and merger of #190

Things left for verification are difficulty, extra_data and pow stuff (mix_hash/nonce) and I will need to go over EIP's to double check when and what needs to be enabled/disabled.
edit: done, they are disabled after the merge, before the merge check should be done for consistency but it is low priority as it does not matter a lot for consensus as we sync from the chain tip.

Transaction price-related fields are promoted to u128 just to be safe, and tx value is put as u128 (from U256) as there is no amount of eth that can overflow u128.

@rakita rakita force-pushed the rakita/tx_receipt_verification branch from 2a7f1b1 to dada514 Compare November 11, 2022 20:54
@rakita rakita mentioned this pull request Nov 14, 2022
@rakita rakita force-pushed the rakita/tx_receipt_verification branch from 6559153 to 54ed125 Compare November 14, 2022 16:48
@codecov
Copy link

codecov bot commented Nov 15, 2022

Codecov Report

Merging #195 (d6320d5) into main (6b336c6) will increase coverage by 0.53%.
The diff coverage is 41.42%.

❗ Current head d6320d5 differs from pull request most recent head b3131a9. Consider uploading reports for the commit b3131a9 to get more accurate results

@@            Coverage Diff             @@
##             main     #195      +/-   ##
==========================================
+ Coverage   67.74%   68.27%   +0.53%     
==========================================
  Files         213      214       +1     
  Lines       18142    18064      -78     
==========================================
+ Hits        12290    12334      +44     
+ Misses       5852     5730     -122     
Impacted Files Coverage Δ
crates/consensus/src/consensus.rs 0.00% <0.00%> (ø)
crates/executor/src/executor.rs 0.00% <0.00%> (ø)
crates/executor/src/revm_wrap.rs 0.00% <0.00%> (ø)
crates/interfaces/src/consensus.rs 100.00% <ø> (ø)
crates/interfaces/src/executor.rs 0.00% <ø> (ø)
...tes/interfaces/src/provider/db_provider/storage.rs 6.97% <0.00%> (ø)
crates/interfaces/src/test_utils/generators.rs 100.00% <ø> (ø)
crates/net/rpc/src/eth/eth_server.rs 0.00% <ø> (ø)
crates/net/rpc/src/eth/mod.rs 0.00% <ø> (ø)
crates/primitives/src/account.rs 40.00% <0.00%> (-60.00%) ⬇️
... and 35 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rakita rakita force-pushed the rakita/tx_receipt_verification branch from dd76362 to 5c9221f Compare November 15, 2022 10:56
@rakita rakita marked this pull request as ready for review November 15, 2022 10:56
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

smol nit.

will also convert corresponding values to u128 in txpool once this is merged

Comment on lines +101 to +110

use hex_literal::hex;

/// Keccak256 over empty array.
pub const KECCAK_EMPTY: H256 =
H256(hex!("c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"));

/// Ommer root of empty list.
pub const EMPTY_OMMER_ROOT: H256 =
H256(hex!("1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

move to constants.rs?

@gakonst gakonst merged commit 09c5c34 into main Nov 16, 2022
@gakonst gakonst deleted the rakita/tx_receipt_verification branch November 16, 2022 19:10
emhane pushed a commit to JoshdfG/reth that referenced this pull request Jan 5, 2026
Closes paradigmxyz#179

---------

Co-authored-by: Julian Meyer <julian.meyer@coinbase.com>
JoshdfG pushed a commit to JoshdfG/reth that referenced this pull request Jan 16, 2026
Closes paradigmxyz#179

---------

Co-authored-by: Julian Meyer <julian.meyer@coinbase.com>
emhane pushed a commit to JoshdfG/reth that referenced this pull request Jan 21, 2026
Closes paradigmxyz#179

---------

Co-authored-by: Julian Meyer <julian.meyer@coinbase.com>
dhyaniarun1993 added a commit to dhyaniarun1993/reth that referenced this pull request Feb 23, 2026
Closes paradigmxyz#179

---------

Co-authored-by: Julian Meyer <julian.meyer@coinbase.com>
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