Compare commits

...

285 Commits

Author SHA1 Message Date
jenpaff
2bdb6aa00e chore: update alloy-evm patches and fix cargo-deny
- Switch alloy-evm and alloy-op-evm patches from Rimeeeeee/evm to alloy-rs/evm staging-revm branch
- Add Soubhik-10/alloy to deny.toml allow-git for EIP-7928 BAL support
- Add TODOs for temporary git patches
2026-01-16 02:18:18 +00:00
jenpaff
abebb54b6c fix: allow BAL devnet-1 git sources in cargo deny
Add Soubhik-10/alloy and Rimeeeeee/evm to allow-git list for BAL patches.
2026-01-16 02:09:12 +00:00
jenpaff
8fc1c9bb61 fix: resolve remaining clippy warnings
- Update deprecated with_spec() to with_spec_and_mainnet_gas_params() in tests
- Remove unused Cfg import in op-node builder test
2026-01-16 02:06:07 +00:00
jenpaff
9426575977 fix: regenerate exex WAL test data with BAL fields
The serialized test data needed to be regenerated after alloy-consensus
added block_access_list_hash and block_access_list fields.
2026-01-16 01:47:14 +00:00
jenpaff
c196503931 fix: add missing slot_number and block_access_list fields in tests
- Add slot_number: None to PayloadAttributes in test files
- Add block_access_list_hash and block_access_list to test block structs
- Dereference spec() for UniPrecompiles in op-node tests
2026-01-16 00:50:03 +00:00
jenpaff
538a05e98a fix: resolve merge conflicts and update for revm v34/alloy-evm BAL support
- Add missing slot_number field to PayloadAttributes in e2e-test-utils
- Update CfgEnv to use with_spec_and_mainnet_gas_params (non-deprecated API)
- Add test helper functions for multiproof batching tests
- Fix BAL test types for alloy-eip7928 v0.3.0 (U256 for slots)
- Fix clippy warnings (collapsible_if, len_zero)
2026-01-15 19:39:48 +00:00
Soubhik Singha Mahapatra
914afe15be update 2025-12-17 11:50:11 +05:30
Ishika Choudhury
bf03673d53 fixes 2025-12-17 11:37:04 +05:30
Ishika Choudhury
fff297bbb9 rebase 2025-12-17 11:21:08 +05:30
Ishika Choudhury
38e44d190f fixes 2025-12-17 11:04:17 +05:30
Soubhik Singha Mahapatra
f3232dd700 bump 2025-12-16 11:11:57 +05:30
Soubhik Singha Mahapatra
77c7e9af9c bump 2025-12-16 11:08:23 +05:30
Ishika Choudhury
299661fa2c fixes 2025-12-14 15:41:03 +05:30
Ishika Choudhury
65a6edb604 fixes 2025-12-14 13:56:09 +05:30
Ishika Choudhury
49007cac36 chore: bump eip 7928 dep for BAL 2025-12-14 13:09:54 +05:30
Ishika Choudhury
830125e95a fixes 2025-12-10 20:08:56 +05:30
Soubhik Singha Mahapatra
0bc0a6b7c3 rebase 2025-12-10 18:39:13 +05:30
Ishika Choudhury
068ef0c681 fixes 2025-12-10 18:23:20 +05:30
Ishika Choudhury
49249ed2c8 fixes 2025-12-09 23:16:16 +05:30
Ishika Choudhury
c72163de43 fixes 2025-12-09 22:23:47 +05:30
Ishika Choudhury
41c02695d5 bal to rpc compact 2025-12-09 21:20:01 +05:30
Ishika Choudhury
6f626fd6d2 fixes 2025-12-09 21:10:28 +05:30
Soubhik Singha Mahapatra
b222cc64cd try fix 2025-12-09 20:34:09 +05:30
Ishika Choudhury
b89ef781f7 fixes 2025-12-09 19:32:29 +05:30
Soubhik Singha Mahapatra
71cd419f7f more tracing 2025-12-09 19:09:40 +05:30
Ishika Choudhury
fdaf3403e0 chore: set bal new 2025-12-07 21:49:18 +05:30
Ishika Choudhury
331e8ca110 fixes 2025-12-07 20:41:16 +05:30
Ishika Choudhury
3a1e2e23a9 bump bal index 2025-12-07 18:41:15 +05:30
Ishika Choudhury
3fbe585448 fixes 2025-12-07 17:27:00 +05:30
Ishika Choudhury
d8b13adacd fixes 2025-12-06 16:07:09 +05:30
Soubhik Singha Mahapatra
26cc128546 rerun 2025-12-06 13:29:55 +05:30
Soubhik Singha Mahapatra
cdd2298da4 fix 2025-12-06 13:08:41 +05:30
Ishika Choudhury
b5391deeca fixes 2025-12-06 12:47:34 +05:30
Ishika Choudhury
d753e1983d chore: rebase and fixes 2025-12-05 21:11:24 +05:30
Ishika Choudhury
87cc04ee7b fixes 2025-11-27 23:44:35 +05:30
Ishika Choudhury
d7dc2586b6 fixes 2025-11-27 23:31:55 +05:30
Ishika Choudhury
6056f9ec1a new release tests 2025-11-27 21:49:38 +05:30
Ishika Choudhury
778af94ecc Update build_simulators.sh 2025-11-22 07:33:10 -03:00
Ishika Choudhury
5d21b42dcd Merge branch 'main' into new-approach3 2025-11-22 07:22:23 -03:00
Soubhik-10
5c60cb42d4 trace 2025-11-22 03:26:20 +05:30
Soubhik-10
de3f6ebd6f Merge branch 'main' into new-approach3 2025-11-22 02:09:55 +05:30
Ishika Choudhury
b3863e4bf0 Update build_simulators.sh 2025-11-21 09:57:46 -03:00
Soubhik-10
3f38f77fc3 fmt 2025-11-12 10:52:49 +05:30
Soubhik-10
b2c31b0f7c Merge branch 'main' into new-approach3 2025-11-12 10:51:39 +05:30
Soubhik Singha Mahapatra
4724cec28d run all fixtures 2025-11-07 08:51:27 +05:30
Soubhik Singha Mahapatra
6824f4726b fix 2025-11-06 22:47:53 +05:30
Ishika Choudhury
092600c6d8 feat: added getBlockAccessList for eip-7928 (#20)
Co-authored-by: Soubhik Singha Mahapatra <160333583+Soubhik-10@users.noreply.github.com>
2025-11-06 22:44:51 +05:30
Soubhik Singha Mahapatra
4163e4ea4a more logs 2025-11-06 21:11:21 +05:30
Soubhik Singha Mahapatra
1cbd53ea4f fmt 2025-11-06 21:05:34 +05:30
Soubhik Singha Mahapatra
4cba143822 fix 2025-11-06 20:31:13 +05:30
Soubhik Singha Mahapatra
41d2276755 fix 2025-11-06 20:24:37 +05:30
Ishika Choudhury
7603ac7e23 fixes 2025-11-06 19:46:30 +05:30
Soubhik Singha Mahapatra
1164e11600 fixes 2025-11-05 17:58:18 +05:30
Soubhik Singha Mahapatra
796c19cc57 Merge branch 'main' into new-approach3 2025-11-05 17:53:48 +05:30
Ishika Choudhury
016b36c918 fixes 2025-11-05 16:08:24 +05:30
Ishika Choudhury
efd198246d fix: added proper handling for empty block(coinbase) 2025-11-05 15:27:59 +05:30
Soubhik Singha Mahapatra
495a3b3bd1 Merge branch 'new-approach3' of https://github.com/Rimeeeeee/reth into new-approach3 2025-11-05 14:42:16 +05:30
Soubhik Singha Mahapatra
1fc48d4291 fixes 2025-11-05 14:41:52 +05:30
Soubhik Singha Mahapatra
ae3f950135 Merge branch 'paradigmxyz:main' into new-approach3 2025-11-05 14:11:02 +05:30
Soubhik Singha Mahapatra
18cee16f54 fixes 2025-11-05 14:09:55 +05:30
Soubhik Singha Mahapatra
eb2dc5e84b fix 2025-11-05 13:30:04 +05:30
Ishika Choudhury
4bb38df3eb fixes 2025-11-05 12:19:43 +05:30
Ishika Choudhury
869306a2ae fixes 2025-11-05 00:23:19 +05:30
Ishika Choudhury
43f4fef490 tracing 2025-11-04 22:15:48 +05:30
Soubhik-10
e048909f74 new bramnch 2025-11-04 21:14:50 +05:30
Soubhik-10
67ba84edab new bramnch 2025-11-04 21:14:24 +05:30
Soubhik-10
b4f405a7b2 new bramnch 2025-11-04 20:39:45 +05:30
Soubhik-10
0ff2a51eab fix 2025-11-04 20:07:54 +05:30
Soubhik-10
e63a2521a3 fix 2025-11-04 20:06:22 +05:30
Ishika Choudhury
63ef0734f7 fixes 2025-11-04 19:14:17 +05:30
Soubhik-10
02e3c2b768 fix 2025-11-04 18:25:27 +05:30
Ishika Choudhury
925b57abcb fixes 2025-11-04 17:47:55 +05:30
Soubhik-10
20af62849e fixes 2025-11-04 17:15:23 +05:30
Soubhik-10
d6281dc72e fixes 2025-11-04 16:46:21 +05:30
Soubhik-10
2aaa8a844b fixes 2025-11-04 16:00:46 +05:30
Ishika Choudhury
c1d056b7e3 Merge branch 'new-approach3' of https://github.com/Rimeeeeee/reth into new-approach3 2025-11-04 15:27:05 +05:30
Ishika Choudhury
f13e9d840d fixes 2025-11-04 15:26:43 +05:30
Soubhik-10
498889f094 branch fix 2025-11-04 11:25:46 +05:30
Ishika Choudhury
0ac3973352 fixes 2025-11-04 11:03:01 +05:30
Ishika Choudhury
54b66df732 tests with bal new release 2025-11-04 10:46:14 +05:30
PO
6bcc0a6887 avoid failed to open the database error when BAL is not enabled (#19) 2025-11-04 10:37:55 +05:30
Soubhik Singha Mahapatra
112ff19582 fixes 2025-10-31 18:24:13 +05:30
Ishika Choudhury
d3cb07f256 Merge branch 'new-approach3' of https://github.com/Rimeeeeee/reth into new-approach3 2025-10-31 16:25:01 +05:30
Ishika Choudhury
5aa81f9487 fixes 2025-10-31 16:24:35 +05:30
Soubhik Singha Mahapatra
d0f4238163 fix 2025-10-31 10:50:34 +05:30
Soubhik Singha Mahapatra
41393b1f83 Merge branch 'new-approach3' of https://github.com/Rimeeeeee/reth into new-approach3 2025-10-31 09:40:52 +05:30
Soubhik Singha Mahapatra
a7a0d85527 fix 2025-10-31 09:40:31 +05:30
Soubhik Singha Mahapatra
9f83a91baf Merge branch 'main' into new-approach3 2025-10-31 09:22:38 +05:30
Soubhik Singha Mahapatra
5186797a2f try hive on old 2025-10-31 09:21:15 +05:30
Soubhik Singha Mahapatra
4012a60bd0 fix 2025-10-30 23:35:11 +05:30
Ishika Choudhury
d79125dd9b fixes 2025-10-30 23:04:15 +05:30
Ishika Choudhury
3ac602a366 Merge branch 'new-approach3' of https://github.com/Rimeeeeee/reth into new-approach3 2025-10-30 20:32:47 +05:30
Ishika Choudhury
f96a37a4ed fixes 2025-10-30 20:32:15 +05:30
Soubhik Singha Mahapatra
c469ef9337 fix 2025-10-30 19:37:05 +05:30
Soubhik Singha Mahapatra
6bb9df9dbb fmt 2025-10-30 19:29:26 +05:30
Soubhik Singha Mahapatra
bd59f50d49 fmt 2025-10-30 19:12:59 +05:30
Ishika Choudhury
2c554a0cc3 fixes 2025-10-30 18:50:39 +05:30
Soubhik-10
b775368d85 Merge branch 'main' into new-approach3 2025-10-30 16:08:49 +05:30
Soubhik-10
b755ea39a3 try fix hive 2025-10-30 15:43:09 +05:30
Ishika Choudhury
5393381863 fixes 2025-10-30 13:52:16 +05:30
Soubhik-10
3a30b97774 rebase 2025-10-30 12:23:37 +05:30
Ishika Choudhury
57269e281e Merge branch 'new-approach' of https://github.com/Rimeeeeee/reth into new-approach 2025-10-22 22:12:48 +05:30
Ishika Choudhury
976c4255e2 fixes 2025-10-22 22:12:28 +05:30
Ishika Choudhury
a1466e3a6e Merge branch 'main' into new-approach 2025-10-22 21:34:04 +05:30
Ishika Choudhury
db1ee1dfea fixes 2025-10-22 21:31:42 +05:30
Ishika Choudhury
79c0b81b7e fixes 2025-10-22 20:43:14 +05:30
Soubhik Singha Mahapatra
2eb460d74a Merge branch 'paradigmxyz:main' into new-approach 2025-10-22 20:35:44 +05:30
Soubhik-10
cf8ba329c7 amsterdam 2025-10-22 20:11:52 +05:30
Soubhik-10
8105616931 amsterdam 2025-10-22 20:08:33 +05:30
Soubhik-10
4795e66fbd amsterdam 2025-10-22 19:58:38 +05:30
Soubhik-10
82771ebdd2 amsterdam 2025-10-22 19:40:33 +05:30
Soubhik-10
78eeb03c43 pin 2025-10-22 19:27:53 +05:30
Soubhik-10
62b12c9587 pin 2025-10-22 18:55:51 +05:30
Soubhik-10
b0f4154455 pin 2025-10-22 18:53:18 +05:30
Ishika Choudhury
a914ed6b56 fixes 2025-10-22 18:29:35 +05:30
Ishika Choudhury
aaff3a32d5 fix: updated alloy/evm 2025-10-22 17:56:03 +05:30
Ishika Choudhury
d92f818086 hive run 2025-10-22 17:05:13 +05:30
Ishika Choudhury
9bcfcbf0d4 fixes 2025-10-20 20:43:58 +05:30
Ishika Choudhury
beade650c4 fixes 2025-10-20 12:36:09 +05:30
Soubhik-10
96c0db1b87 mergre 2025-10-20 08:29:26 +05:30
Soubhik-10
bf064424c2 mergre 2025-10-20 07:52:45 +05:30
Soubhik-10
12ce5b43fb update evm 2025-10-20 07:40:16 +05:30
Soubhik-10
830b98da64 traces 2025-10-19 21:30:35 +05:30
Soubhik-10
0875ba0f57 fix 2025-10-19 20:48:47 +05:30
Soubhik Singha Mahapatra
77133f1c3c Merge branch 'paradigmxyz:main' into new-approach 2025-10-19 20:43:28 +05:30
Soubhik-10
fc64e9228d fix 2025-10-19 20:41:08 +05:30
Ishika Choudhury
a9248d78d0 fixes 2025-10-19 20:34:14 +05:30
Ishika Choudhury
a27af7f6f5 fixes 2025-10-19 20:29:34 +05:30
Ishika Choudhury
f296e727a7 fixes 2025-10-19 11:44:41 +05:30
Ishika Choudhury
b06f731410 new revm for bal 2025-10-19 10:58:49 +05:30
Ishika Choudhury
1e9fb40156 fixes 2025-10-15 12:07:09 +05:30
Ishika Choudhury
00d2f8ae32 fixes bal 2025-10-15 11:35:04 +05:30
Ishika Choudhury
3633c97fc0 rebase 2025-10-15 11:11:40 +05:30
Ishika Choudhury
383421ee2f fixes 2025-10-15 10:57:21 +05:30
Ishika Choudhury
a6a07b7df5 fixes 2025-10-12 12:04:56 +05:30
Ishika Choudhury
cc3fd77982 foxes 2025-10-11 22:04:32 +05:30
Ishika Choudhury
8ac93babb5 tracing for account 2025-10-11 21:24:32 +05:30
Ishika Choudhury
fa03006830 fixes 2025-10-11 19:48:14 +05:30
Soubhik-10
ca9dddc8ee try fix 2025-10-11 19:02:28 +05:30
Soubhik-10
c5989637cf try fix 2025-10-11 18:34:53 +05:30
Soubhik-10
7fee43bc26 new tar 2025-10-11 17:00:34 +05:30
Ishika Choudhury
54debce9ed oog handling 2025-10-11 16:37:04 +05:30
Ishika Choudhury
4ca9cb597f fixes 2025-10-11 12:28:59 +05:30
Ishika Choudhury
e1cf800c5c feat: revert casing handle 2025-10-11 12:27:00 +05:30
Soubhik-10
80c3d60fbd code 2025-10-11 11:10:01 +05:30
Ishika Choudhury
c54f402150 tracing in evm 2025-10-11 11:05:38 +05:30
Ishika Choudhury
b6891d06c6 fixes 2025-10-10 21:52:09 +05:30
Soubhik-10
469dfe0fb3 fixed coinbase 2025-10-10 20:27:26 +05:30
Soubhik-10
d732c18f74 fixed coinbase 2025-10-10 19:53:13 +05:30
Soubhik-10
819b6d6704 oog 2025-10-09 15:52:44 +05:30
Ishika Choudhury
252de71a38 sender=recipt balance 2025-10-09 13:44:34 +05:30
Ishika Choudhury
a58cd20438 update 2025-10-09 12:33:19 +05:30
Ishika Choudhury
d014918119 fixes 2025-10-04 15:38:28 +05:30
Ishika Choudhury
d8b7450f9c Merge branch 'bal' of https://github.com/Rimeeeeee/reth into bal 2025-10-04 13:50:22 +05:30
Ishika Choudhury
e5c8922760 empty account handling for 2930 2025-10-04 13:48:55 +05:30
Soubhik-10
c937af1584 2930 2025-10-04 13:12:52 +05:30
Ishika Choudhury
5af61ef057 feat: running with new eest 2025-10-04 11:54:06 +05:30
Ishika Choudhury
548187ce22 fixes 2025-10-04 11:10:04 +05:30
Ishika Choudhury
90801b954e new way of tracking balance 2025-10-03 20:21:18 +05:30
Ishika Choudhury
cfc29f0463 fixes 2025-10-03 18:49:18 +05:30
Ishika Choudhury
1be4b9a631 zepter 2025-10-03 18:16:46 +05:30
Ishika Choudhury
dfcb3d1013 Merge branch 'main' into bal 2025-10-03 18:07:01 +05:30
Ishika Choudhury
f0e4d6b364 balance fixes 2025-10-03 18:05:39 +05:30
Ishika Choudhury
7084be96ff fixes 2025-10-03 17:19:09 +05:30
Ishika Choudhury
9dcedec746 fixes 2025-10-03 16:25:41 +05:30
Ishika Choudhury
cb83eeb13e fixes 2025-10-03 15:55:23 +05:30
Ishika Choudhury
118e58f9a0 fixes 2025-10-03 15:27:52 +05:30
Soubhik-10
8574dcc05b update 2025-10-03 14:21:30 +05:30
Ishika Choudhury
a7608944ae Merge branch 'main' into bal 2025-10-03 13:44:11 +05:30
Ishika Choudhury
cfada9b6dd feat: track balance change from revm 2025-10-03 13:41:44 +05:30
Soubhik-10
dc8def7d69 merge main 2025-10-01 18:46:52 +05:30
Soubhik-10
1c78c1b98a fix self-destruct 2025-09-30 12:48:37 +05:30
Ishika Choudhury
d0f9d47fac selffestruct fix 2025-09-30 12:14:30 +05:30
Ishika Choudhury
7ec0deeadd rebase 2025-09-30 10:18:41 +05:30
Soubhik-10
4b19ca268b new tar 2025-09-30 10:04:00 +05:30
Ishika Choudhury
4acd90b199 exp 2025-09-27 10:55:52 +05:30
Ishika Choudhury
02ef365987 fixes 2025-09-25 21:00:59 +05:30
Ishika Choudhury
751ee7c769 Merge branch 'bal' of https://github.com/Rimeeeeee/reth into bal 2025-09-25 20:33:17 +05:30
Ishika Choudhury
32b2240884 mapping fixes 2025-09-25 20:32:53 +05:30
Soubhik Singha Mahapatra
51900de33a Merge branch 'main' into bal 2025-09-25 19:48:17 +05:30
Ishika Choudhury
9ed37ccc93 fixes 2025-09-25 19:47:08 +05:30
Ishika Choudhury
8cff2b0f4c error variant fixes 2025-09-25 19:43:42 +05:30
Soubhik-10
e9f7790965 correct payload hash 2025-09-25 17:37:33 +05:30
Ishika Choudhury
03736e7784 fixes 2025-09-24 18:01:53 +05:30
Ishika Choudhury
11378180a8 added bal to payload attr 2025-09-24 17:46:54 +05:30
Ishika Choudhury
ae8ec3df2b Merge branch 'bal' of https://github.com/Rimeeeeee/reth into bal 2025-09-24 16:12:30 +05:30
Ishika Choudhury
660352fba2 added more tracing 2025-09-24 16:12:02 +05:30
Soubhik-10
ebb5955b43 traces 2025-09-24 13:40:06 +05:30
Ishika Choudhury
f691ab2796 fixes 2025-09-24 13:03:24 +05:30
Ishika Choudhury
2b8eaf1fed rebase 2025-09-24 13:02:08 +05:30
Ishika Choudhury
f7570a35d2 added tracing and clone(tbr) 2025-09-24 12:46:26 +05:30
Ishika Choudhury
08b8138748 fixes 2025-09-24 12:02:40 +05:30
Ishika Choudhury
f84984becd fixes 2025-09-23 23:48:53 +05:30
Soubhik-10
258cad74d6 address 2025-09-23 23:12:52 +05:30
Ishika Choudhury
c4c30cede4 code change fix 2025-09-23 22:27:11 +05:30
Ishika Choudhury
727ece434e nonce change fix 2025-09-23 21:39:22 +05:30
Ishika Choudhury
8d29344af5 fixes 2025-09-23 20:44:15 +05:30
Soubhik-10
96d24307b3 update 2025-09-23 20:06:22 +05:30
Soubhik-10
f229f6eba9 Merge branch 'main' into bal 2025-09-23 20:05:43 +05:30
Soubhik-10
9ee16c502a new tar 2025-09-23 19:32:07 +05:30
Ishika Choudhury
dcd5be6723 coinbase after tx 2025-09-23 18:58:14 +05:30
Soubhik-10
d07ee9a155 fix 2025-09-23 18:22:37 +05:30
Soubhik-10
4199058437 coinbase 2025-09-23 18:09:23 +05:30
Ishika Choudhury
87d2b12ac3 fixes 2025-09-23 17:29:41 +05:30
Soubhik-10
faa1b3698a retry again 2025-09-23 16:08:08 +05:30
Soubhik-10
07e8192b12 balance fix 2025-09-23 15:26:23 +05:30
Soubhik-10
0046f50d97 fix evm specid 2025-09-23 14:17:37 +05:30
Ishika Choudhury
1bd3f6bbc8 fixes 2025-09-23 12:00:38 +05:30
Ishika Choudhury
a827c71b9c added tracing 2025-09-23 11:58:37 +05:30
Ishika Choudhury
d5ab87825a fixes 2025-09-23 11:20:59 +05:30
Ishika Choudhury
f611af3d4d fix conflicts 2025-09-23 11:05:21 +05:30
Ishika Choudhury
7c2f715e72 fixes 2025-09-23 10:38:20 +05:30
Soubhik-10
c86a4169b9 logs 2025-09-20 13:30:40 +05:30
Soubhik-10
d1566e5553 old tar 2025-09-19 21:16:11 +05:30
Soubhik-10
50f3254028 fmt 2025-09-19 20:52:53 +05:30
Soubhik-10
b52f8556ca try new tar 2025-09-19 20:27:20 +05:30
Ishika Choudhury
ff68980619 refactor 2025-09-16 16:29:14 +05:30
Soubhik Singha Mahapatra
7ced848feb Merge branch 'main' into bal 2025-09-16 16:04:37 +05:30
Ishika Choudhury
2d43e96247 docs 2025-09-14 11:26:32 +05:30
Soubhik-10
b562c6d6a5 merge 2025-09-13 18:23:39 +05:30
Soubhik-10
f3091094ec merge 2025-09-13 18:13:54 +05:30
Soubhik-10
27e89becee Bring in test-ci changes 2025-09-13 18:06:01 +05:30
Soubhik-10
56b8e290a4 Revert "Test ci (#16)"
This reverts commit 692683c79a.
2025-09-13 18:04:43 +05:30
Ishika Choudhury
692683c79a Test ci (#16)
* feat: optionally disable balance check for `EthTransactionValidator` (#18086)

* feat(optimism): Launch `FlashBlockService` when websocket URL is provided in `OpEthApi` (#18077)

* feat: add NoopNetwork example (#18093)

* feat: add helper for provider with wallet (#18085)

* feat(optimism): Add `flashblocks_url` as part of rollup args of the `op-reth` CLI (#18094)

* perf(engine): only fetch headers instead of full blocks for tree tasks (#18088)

* feat(optimism): Implement conversion of `ExecutionPayloadBaseV1` into `OpNextBlockEnvAttributes` (#18097)

* feat(optimism): Remove builder of next block environment from `FlashBlockService` (#18100)

* refactor: make transaction validator functions reusable (#17929)

Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>

* feat: add module manipulation methods and RPC server arg helpers (#18084)

* chore(reth-optimism-cli): use OpTypedTransaction::eip2718_encode (#18105)

* ci: remove expected failures (#18099)

* feat: add EIP-7934 block size check to validateBuilderSubmissionV5 (#18111)

* chore: include err in log (#18119)

* fix(optimism): Prevent old pending flashblock from being returned from `pending_flashblock` (#18103)

* chore: make `caller_gas_allowance` an RPC trait method (#18101)

* fix(optimism): Fix endless poll on the FlashBlockService (#18120)

* chore: add prewarm traces (#18117)

* refactor(eth-wire): remove EthVersion::total_messages in favor of EthMessageID::max (#17999)

* fix(engine): Prevent instant miner from creating empty blocks (#18108)

Signed-off-by: 7suyash7 <suyashnyn1@gmail.com>

* perf(engine): only clone headers instead of full blocks for tree tasks (#18116)

* fix(optimism): Verify that flashblocks are not old according to canon state (#18123)

* fix: import should count on the delta (#17819)

Signed-off-by: tmel <tmel0103@gmail.com>
Signed-off-by: tmelhao <tmel0103@gmail.com>
Co-authored-by: tmel <tmel0103@gmail.com>

* feat: Forward transactions to a specified endpoint (#17444)

Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>

* feat(net): implement support of subprotocols (#18080)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* fix(optimism): Fail if latest and base flashblock parent are different (#18132)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* fix(txpool): ensure fee changes are updated (#18137)

* refactor: merge `EthTransactionValidator` and `EthTransactionValidatorInner` (#18129)

* docs(op): op chains don't require deposit contracts, so as dev chain (#17988)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* feat: generalize impl EngineValidatorAddOn for OpAddOns (#18141)

* perf(engine): pre-allocate Vec capacity in payload processor (#18148)

* perf(engine): pre-allocate channel handles in prewarm task (#18147)

* chore(reth-optimism-storage): small refactor code (#18104)

* fix(trie): Fix call to update_account in witness (#18154)

* feat(optimism): add FlashblocksRx getter (#18155)

* perf(reth-invalid-block-hooks): use Reverts::eq reduce clone (#18159)

* perf(optimism): Pass noop provider to skip state root calculations for flashblocks (#18161)

* chore: Add 0x prefix and use macro (#18156)

* fix(optimism): find fb attrs in base fb (#18164)

* chore(deps): bump actions/upload-pages-artifact from 3 to 4 (#18076)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* perf: optimize single-element collection creation (#18168)

* ci: Fix .PHONY declaration for install-reth-bench target in Makefile (#18152)

* fix: correct logical error in delete_outside_range error message (#18031)

* refactor: remove unnecessary PathBuf clone in CLI help generator (#18172)

* chore: simplify dev signed tx conversions (#18171)

* chore(deps): weekly `cargo update` (#18174)

Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>

* perf(stages): optimize unwind operation by fetching headers instead full blocks (#18139)

* chore: avoid using hashmap hashers directly (#18176)

* feat: enhance engine tree metrics (#18000)

* perf(txpool): eliminate allocations in basefee enforcement (#18162)

* perf(optimism): use cached db in `FlashblockService` (#18125)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* refactor(optimism): Extract responsibility to connect to a flashblock websocket stream (#18158)

* test ci on main

* feat(examples): added txpoolExt_clearTxpool to existing example (#18175)

* fix: Pass prefix set from init_from_state_dump into compute_state_root (#18185)

* test(optimism): Cover successful decoding of websocket messages in `WsFlashBlockStream` (#18163)

* test(optimism): Cover the failure case of decoding a non-binary message in `WsFlashBlockStream` (#18166)

* test(optimism): Cover the case of stream returning errors in `WsFlashBlockStream` (#18167)

* test(optimism): Cover the case of repeatedly failing to connect to websocket in `WsFlashBlockStream` (#18169)

* dprint

* fixes

* fixes

* fix: struct serialization to match actual fields (#18189)

* test(optimism): Test that streaming flashblocks from remote source is successful (#18170)

* fixes

* fixes

* fixes

* resort

* fixes

* chore: simplify flashblocks poll logic (#18194)

Co-authored-by: julio4 <30329843+julio4@users.noreply.github.com>
Co-authored-by: Roman Hodulák <roman.hodulak@polyglot-software.com>

* fixes

* chore: impl ExecutorTx for withtxenv (#18202)

* perf: prepare flashblock txs (#18201)

Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>

* fixes

* local tar

* try fork

* try fork

* fix: spawn flashblocks service as blocking (#18214)

* fixes

* revert: "perf(txpool): eliminate allocations in basefee enforcement" (#18215)

* fix: incorrect blob fee comparison (#18216)

* fixes

* add an extra check

* add an extra check

* fix(optimism): Prevent repeated executions of current flashblock sequence (#18224)

* fixes

* try fix

* added another check

* added another check

* test(optimism): Test that sequence stops before a gap (#18228)

* feat(optimism): Warn if `FlashBlockService` has stopped (#18227)

* chore: safe None check (#18225)

* chore: improve flashblock logs (#18232)

* fix(download): use updated merkle base URL (#18236)

* fixes

* fixes

* chore(engine): add better logs and spans for execution (#18240)

* chore(trie): use instrument instead of manual span (#18239)

* fix: filter zero storage values when computing withdrawals root in genesis header (#18213)

* enable by default

* perf(reth-optimism-flashblocks): rm redundant clone (#18196)

* perf(txpool): eliminate allocations in basefee enforcement (#18218)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* fixes

* docs: update urls in docs (#18245)

* feat(optimism): Respond to ping messages with pong in `WsFlashBlockStream` (#18212)

* removed one check is_some

* with new release

* test(optimism): Test that `WsFlashBlockStream` pongs a ping (#18217)

* fixes

* fixes

* chore: downgrade debug to trace  for peer reputation logs (#18250)

* feat: added amsterdam to hardforks

* use alloy config

* chore: unify engine downloader targets (#18248)

* fix(optimism): Compare parent hash and latest hash to invalidate cached flashblock (#18238)

* feat(optimism): Decode text messages in `WsFlashBlockStream` (#18257)

* chore: remove redundant payload trait bounds (#18262)

* hivd

* feat(optimism): Respond to close messages in `WsFlashBlockStream` (#18256)

* fix(optimism): Reconnect if ws stream ends in `WsFlashBlockStream` (#18226)

* test(optimism): Test that UTF-8 encoded messages are received in `WsFlashBlockStream` (#18269)

* chore: log prune settings on unwind (#18270)

* feat:db

* new tarball

* new tarball

* chore: extract `validate_against_parent_gas_limit` into separate fn (#18277)

* perf: rm redundant collect (#18281)

* fixes

* fixes

* 100

* rerun

* rerun

* rerun

* tracing

* perf: build local pending block without updates (#18271)

* perf(db): do not heap-allocate the stage key per query (#18284)

* chore(txpool): add sanity tests for blob fee bit handling (#18258)

* fix: check prune checkpoints for unwind target limit (#18263)

* perf: optimize send raw batching (#18280)

* perf: specialize single batch request (#18289)

* chore: delist unused deps with `cargo-machete` (#18259)

* test(optimism): Test that close message is responded to in `WsFlashBlockStream` (#18268)

* tracing

* fixes

* perf: specialize validate_transactions_with_origin for task validator (#18288)

* feat(metrics): add `TxPoolValidatorMetrics` to track inflight validation jobs (#18295)

* fixes

* fixes

* feat(gpo): add default fee price argument (#18297)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* fixes

* feat: introduce setting for delegated txs slots (#18298)

* feat: expose `EvmEnv` to `caller_gas_allowance` (#18302)

* perf: specialize len 1 (#18307)

* trace

* chore: fix various typos in comments and documentation (#18296)

* perf(e2e-test-utils): optimize block checking by fetching header instead of full block (#18254)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* feat: introduce maybe_pending method to StateProviderFactory (#18260)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* chore: clippy happy (#18310)

* more trace

* feat(download): support zst archives in reth download (#18237)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* with new types

* rerun

* rerun

* rerun

* chore: introduce validationtask with capacity (#18291)

* chore(deps): weekly `cargo update` (#18312)

Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>

* fix(rpc): error code `eth_sendRawTransactionSync` timeout (#18252)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* fixes

* fixe

* fixes

* fixes

* chore(trie): dont warn on blinded node reveals (#18317)

* refactor(optimism): Extract pending block building responsibility out of `FlashBlockService` (#18247)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* rerun

* refactor: change PendingPool and PendingTransaction visibility to pub (#18267)

* refactor(engine): persistence logic (#18318)

* feat(optimism): flashblock completed sequences (#18272)

* fix

* feat(trie): Add helper sub-command (#18301)

* ci: pin Rust to 1.88 when building for Windows in Cross (#18320)

* docs(reth-bench): fix markdown (#18322)

* fix(bench): fix deadlock in test data generation (#18321)

* fix(stateless): verify_execution_witness doc for pre-state mismatch (#18319)

* fix: DB benches (#18314)

* chore: bump version 1.7.0 (#18323)

* chore: bump docs version 1.7.0 (#18326)

* docs: update public dashboards (#18331)

* chore(trie): use read-only db handle during repair-trie dry-runs (#18328)

* chore(deps): bump actions/setup-go from 5 to 6 (#18332)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump actions/github-script from 7 to 8 (#18334)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump actions/stale from 9 to 10 (#18335)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: cache latest built payload (#18324)

* perf(merkle-stage): only fetch checkpoint in the branch that needs it (#18339)

* fix: properly compute genesis hash (#18300)

* feat(op-reth/flashblocks): subscribe to the flashblock sequences produced (#18276)

Co-authored-by: julio4 <30329843+julio4@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* perf(reth-engine-local): use VecDeque reduce removal operations (#18198)

* fix(ci): pin teku image to fix kurtosis-op build (#18345)

* fix(stages): implement entities checkpoint update in merkle stage unwind (#18131)

* rerurn

* perf: use debug_assert for parked pool lookup (#17712)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* refactor(revm): (#18150) use hardfork activation helpers (#18349)

Co-authored-by: Waiting-Chai <1753609696@qq.com>

* feat(stateless): Run EEST tests in stateless block validator & bug fixes (#18140)

Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* feat: support customizable RPC namespace parsers (#18160)

Co-authored-by: Federico Gimenez <federico.gimenez@gmail.com>

* fix(prune): TransactionLookup pruning issues with pre-merge expiry (#18348)

* feat(op-sdk): custom precompiles (#18350)

* fix: fix search in vocs doc (#18354)

* merge

* fix

* fix: add is_osaka check before erroring in default_ethereum_payload (#18355)

* perf: optimize canonical_hashes_range with Vec::with_capacity pre-allocation + benchmark (#18072)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* feat: add some ethapi builder fns (#18358)

* fix(docs): include .vocs to retain search-index (#18363)

* feat(engine): check header validity after invalid transaction (#18356)

* fix(engine): avoid block fetching inconsistencies for checks during reorgs (#18368)

* feat: bump hive eest tests (#18013)

* fix: check payload id (#18370)

* perf(trie): Use ParallelSparseTrie (if enabled) for storage tries (#17959)

* fixes

* refactor!: more type-safety in cli (#18375)

* feat: add helper aliases for node adapters (#18366)

* fix: relax nonce gap rule if configured (#18385)

* fix(docs): disable jekyll which removes the search-index (#18388)

* fix(docs): mv search-index to dist from .vocs (#18390)

* fix: map EIP-7623 gas floor errors to expected exception type for test compatibility (#18389)

* feat: replace PendingBlockAndReceipts tuple with dedicated struct (#18395)

* fix: still use real chain id for no-op network (#18382)

* chore: use decode_2718_exact for recover raw txs (#18381)

* chore: fixed broken link in history-expiry.mdx (#18400)

* fix(e2e): persist accepted header in CheckPayloadAccepted and align timestamp (#18275)

Co-authored-by: Federico Gimenez <federico.gimenez@gmail.com>
Co-authored-by: Federico Gimenez <fgimenez@users.noreply.github.com>

* chore: update e2e-test-utils code owners (#18397)

* perf(db): reuse MDBX DBIs for the same tx (#18292)

* feat(txpool): break down queued transaction states into specific reasons (#18106)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>

* fix: dont update canon chain to ancestor for opstack (#18410)

* feat(observability): add phase-level observablity to newPayload processing  (#18308)

Co-authored-by: YK <chiayongkang@hotmail.com>
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* perf: downsize mempool tx priority from `U256` to `u128` (#18413)

* chore(storage): remove unused `primed_dbis` (#18415)

* feat: fn recovered_tx to indexedTx (#18421)

* feat: add helper to PendingBlockAndReceipts (#18423)

* refactor and cleanup

* fmt

* fixes

* clippy

* clippy

---------

Signed-off-by: 7suyash7 <suyashnyn1@gmail.com>
Signed-off-by: tmel <tmel0103@gmail.com>
Signed-off-by: tmelhao <tmel0103@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Co-authored-by: 0xKitsune <77890308+0xKitsune@users.noreply.github.com>
Co-authored-by: Roman Hodulák <roman.hodulak@polyglot-software.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Hai | RISE <150876604+hai-rise@users.noreply.github.com>
Co-authored-by: Dharm Singh <153282211+dharmvr1@users.noreply.github.com>
Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
Co-authored-by: nk_ysg <nk_ysg@163.com>
Co-authored-by: leniram159 <leniram159@gmail.com>
Co-authored-by: Andrea Simeoni <andreasimeoni84@gmail.com>
Co-authored-by: Matus Kysel <MatusKysel@users.noreply.github.com>
Co-authored-by: Suyash Nayan <89125422+7suyash7@users.noreply.github.com>
Co-authored-by: Haotian <303518297@qq.com>
Co-authored-by: tmel <tmel0103@gmail.com>
Co-authored-by: Louis Brown <48462338+louisbrown0212@users.noreply.github.com>
Co-authored-by: Max Bytefield <schoentgenaa@gmail.com>
Co-authored-by: Eric Woolsey <ewoolsey@ualberta.ca>
Co-authored-by: YK <chiayongkang@hotmail.com>
Co-authored-by: Brian Picciano <me@mediocregopher.com>
Co-authored-by: Jonas Bostoen <jonasbostoen@fastmail.com>
Co-authored-by: quantix9 <quantix9@proton.me>
Co-authored-by: Julio <30329843+julio4@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: pepes <155114519+dennsikl@users.noreply.github.com>
Co-authored-by: James Niken <155266991+dizer-ti@users.noreply.github.com>
Co-authored-by: VolodymyrBg <aqdrgg19@gmail.com>
Co-authored-by: David Klank <155117116+davidjsonn@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
Co-authored-by: smileclown2024 <167074920+smileclown2024@users.noreply.github.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Fynn <zcheng1004@gmail.com>
Co-authored-by: Soubhik-10 <soubhiksmp2004@gmail.com>
Co-authored-by: TMOT <166535397+Timosdev99@users.noreply.github.com>
Co-authored-by: Brawn <nftdropped@gmail.com>
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
Co-authored-by: Ivan Wang <wff19940326@gmail.com>
Co-authored-by: Mablr <59505383+mablr@users.noreply.github.com>
Co-authored-by: zhygis <5236121+Zygimantass@users.noreply.github.com>
Co-authored-by: Femi Bankole <llordbanks500@gmail.com>
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Co-authored-by: kien-rise <157339831+kien-rise@users.noreply.github.com>
Co-authored-by: Alexey Shekhirin <5773434+shekhirin@users.noreply.github.com>
Co-authored-by: radik878 <radikpadik76@gmail.com>
Co-authored-by: theo <80177219+theochap@users.noreply.github.com>
Co-authored-by: Federico Gimenez <fgimenez@users.noreply.github.com>
Co-authored-by: かとり <SarahADavisA@gmail.com>
Co-authored-by: malik <aremumalik05@gmail.com>
Co-authored-by: Waiting-Chai <1753609696@qq.com>
Co-authored-by: Ignacio Hagopian <jsign.uy@gmail.com>
Co-authored-by: Federico Gimenez <federico.gimenez@gmail.com>
Co-authored-by: Léa Narzis <78718413+lean-apple@users.noreply.github.com>
Co-authored-by: Rez <rez@berachain.com>
Co-authored-by: Yash Atreya <44857776+yash-atreya@users.noreply.github.com>
Co-authored-by: Soubhik Singha Mahapatra <160333583+Soubhik-10@users.noreply.github.com>
Co-authored-by: stevencartavia <112043913+stevencartavia@users.noreply.github.com>
Co-authored-by: Cypher Pepe <125112044+cypherpepe@users.noreply.github.com>
Co-authored-by: Snezhkko <snezhkodaria38@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-13 18:00:26 +05:30
Ishika Choudhury
ab3e7ac98f refactor 2025-08-31 12:10:36 +05:30
Ishika Choudhury
d4f669f629 Merge branch 'approach1-bal-extra' of https://github.com/Rimeeeeee/reth into approach1-bal-extra 2025-08-30 13:30:25 +05:30
Ishika Choudhury
a811bacaf3 using specid 2025-08-30 13:30:01 +05:30
Soubhik-10
e9ac5d1a59 print 2025-08-30 12:16:24 +05:30
Ishika Choudhury
cbe50f5c2f fixes 2025-08-30 11:42:27 +05:30
Ishika Choudhury
be21b256b8 Merge branch 'approach1-bal-extra' of https://github.com/Rimeeeeee/reth into approach1-bal-extra 2025-08-29 17:11:34 +05:30
Ishika Choudhury
455f06e3cd fixes 2025-08-29 17:10:49 +05:30
Soubhik-10
3205700a7a added envelope v6 in here 2025-08-29 16:07:59 +05:30
Ishika Choudhury
513a04d71b fixes 2025-08-29 15:51:44 +05:30
Ishika Choudhury
ffbab127e3 fixes 2025-08-28 20:36:05 +05:30
Soubhik-10
eba128111b test 2025-08-28 20:00:48 +05:30
Soubhik-10
608b80ee41 cargo update 2025-08-28 19:50:16 +05:30
Ishika Choudhury
fd66ebc158 fixes 2025-08-28 17:22:06 +05:30
Soubhik-10
a320b422d8 add engine_getPayloadV6 2025-08-28 16:56:04 +05:30
Soubhik-10
2faac6ccf5 add engine_getPayloadV6 2025-08-28 16:02:34 +05:30
Soubhik-10
fb88af7c1c add engine_getPayloadV6 2025-08-28 15:53:44 +05:30
Ishika Choudhury
b7e306d3c1 engine payload 2025-08-28 12:04:20 +05:30
Soubhik-10
e20e17c77e merge 2025-08-25 18:15:22 +05:30
Soubhik-10
3970778f6a merge 2025-08-25 17:55:17 +05:30
Ishika Choudhury
dbeeca2e65 Merge branch 'paradigmxyz:main' into bal 2025-08-25 17:27:06 +05:30
Ishika Choudhury
7022049391 fixes 2025-08-25 17:25:30 +05:30
Ishika Choudhury
0b8b942c5d fixes 2025-08-25 17:02:56 +05:30
Ishika Choudhury
01840bc18f fixes 2025-08-24 19:07:29 +05:30
Ishika Choudhury
609a7dd2ea validation of bal_hash 2025-08-24 19:00:21 +05:30
Ishika Choudhury
f5bc91f69d with updates 2025-08-24 12:00:29 +05:30
Ishika Choudhury
1aa7ff44dc fixes 2025-08-22 11:11:46 +05:30
Ishika Choudhury
162c845fa1 book 2025-08-22 10:50:44 +05:30
Soubhik-10
2986f97a1b lint 2025-08-21 20:43:11 +05:30
Soubhik-10
1362feeef6 lint 2025-08-21 20:35:54 +05:30
Soubhik-10
be4eb84ae9 lint 2025-08-21 20:31:37 +05:30
Soubhik-10
286dc161a8 lint 2025-08-21 20:28:52 +05:30
Ishika Choudhury
984bdeb37e book on main 2025-08-21 17:18:03 +05:30
Ishika Choudhury
43e74235cf fixes 2025-08-21 17:16:20 +05:30
Ishika Choudhury
c846db2af6 fixes 2025-08-21 12:51:13 +05:30
Soubhik-10
b0af2848c3 rm test 2025-08-21 12:02:37 +05:30
Ishika Choudhury
522ad9a508 fixes 2025-08-21 11:36:37 +05:30
Ishika Choudhury
3cbf46c0c3 fixes 2025-08-21 11:25:55 +05:30
Soubhik-10
cc83bfb7f1 new patch 2025-08-21 11:00:54 +05:30
Ishika Choudhury
582ba3b810 fixes 2025-08-18 22:57:36 +05:30
Ishika Choudhury
9b2d6c89ac fixes 2025-08-18 22:20:49 +05:30
Ishika Choudhury
a5e42e8d29 modfied assemble block 2025-08-18 20:53:33 +05:30
Ishika Choudhury
e4cd20aa4b fixes 2025-08-18 20:32:47 +05:30
Soubhik-10
25e8b03a22 patch 2025-08-18 19:44:15 +05:30
Soubhik-10
28d2c7982a patch 2025-08-18 19:31:37 +05:30
Soubhik-10
6c37352e6c fixes 2025-08-16 17:45:49 +05:30
Soubhik-10
67c37d0a9c cargo update 2025-08-16 17:06:38 +05:30
Ishika Choudhury
94f996ae8a feat: approach 1 for bal build 2025-08-16 17:02:35 +05:30
Soubhik Singha Mahapatra
57654fd2aa Merge branch 'paradigmxyz:main' into bal 2025-08-10 11:09:42 +05:30
Ishika Choudhury
3275939438 feat: eip7928 patches (#11)
* eip7928 patches

* fixes

* fixes

* msrv
2025-08-10 11:09:11 +05:30
Ishika Choudhury
f3e353a0a6 fix: ci workflow (#12)
* fixes: ci workflow

* ci

---------

Co-authored-by: Soubhik-10 <soubhiksmp2004@gmail.com>
2025-08-09 12:35:52 +05:30
Ishika Choudhury
e1a42b815c Merge branch 'paradigmxyz:main' into bal 2025-08-07 16:03:24 +05:30
Ishika Choudhury
a66a9df95f Merge branch 'paradigmxyz:main' into bal 2025-07-14 21:50:01 +05:30
Soubhik Singha Mahapatra
f4d64fbf64 Merge branch 'paradigmxyz:main' into bal 2025-07-08 19:04:50 +05:30
Ishika Choudhury
f72a467468 Merge branch 'paradigmxyz:main' into bal 2025-07-08 10:38:35 +05:30
Soubhik Singha Mahapatra
3cbb9a90e5 chore: upstreamed to alloy (#7)
* upstreamed to alloy

* upstreamed to alloy
2025-07-06 18:38:59 +05:30
Soubhik Singha Mahapatra
8da02d7f38 Merge branch 'paradigmxyz:main' into bal 2025-07-06 17:42:46 +05:30
Ishika Choudhury
29e9696ff4 feat: added remaining core structs and minor refactor (#5) 2025-07-06 16:47:46 +05:30
Soubhik Singha Mahapatra
1b797c97a5 feat: added Storage structs as per eip (#4)
* feat: added storage structs as per eip

* clippy

---------

Co-authored-by: Ishika Choudhury <117741714+Rimeeeeee@users.noreply.github.com>
2025-07-06 12:53:23 +05:30
Ishika Choudhury
194d8b6c36 feat: added BalanceChange and CodeChange for BAL (#3)
* feat: added BalanceChange and CodeChange for BAL

* fixes
2025-07-06 12:32:32 +05:30
Ishika Choudhury
b527e56e00 added toml (#2) 2025-07-06 11:12:21 +05:30
Ishika Choudhury
e1b0884bab feat: intial commit for eip-7928 2025-07-05 20:25:27 +05:30
129 changed files with 2166 additions and 442 deletions

View File

@@ -11,14 +11,17 @@ go build .
# Run each hive command in the background for each simulator and wait
echo "Building images"
# TODO: test code has been moved from https://github.com/ethereum/execution-spec-tests to https://github.com/ethereum/execution-specs we need to pin eels branch with `--sim.buildarg branch=<release-branch-name>` once we have the fusaka release tagged on the new repo
./hive -client reth --sim "ethereum/eels" --sim.buildarg fixtures=https://github.com/ethereum/execution-spec-tests/releases/download/v5.3.0/fixtures_develop.tar.gz -sim.timelimit 1s || true &
./hive -client reth --sim "ethereum/eels" \
--sim.buildarg fixtures=https://github.com/ethereum/execution-spec-tests/releases/download/bal@v2.0.0/fixtures_bal.tar.gz \
--sim.buildarg branch=eips/amsterdam/eip-7928 \
--sim.timelimit 1s || true &
./hive -client reth --sim "ethereum/engine" -sim.timelimit 1s || true &
./hive -client reth --sim "devp2p" -sim.timelimit 1s || true &
./hive -client reth --sim "ethereum/rpc-compat" -sim.timelimit 1s || true &
./hive -client reth --sim "smoke/genesis" -sim.timelimit 1s || true &
./hive -client reth --sim "smoke/network" -sim.timelimit 1s || true &
./hive -client reth --sim "ethereum/sync" -sim.timelimit 1s || true &
wait
# Run docker save in parallel, wait and exit on error
@@ -37,7 +40,7 @@ for pid in "${saving_pids[@]}"; do
wait "$pid" || exit
done
# Make sure we don't rebuild images on the CI jobs
# Make sure we don't rebuild images on the CI jobs
git apply ../.github/assets/hive/no_sim_build.diff
go build .
mv ./hive ../hive_assets/

View File

@@ -24,4 +24,4 @@ done
wait
docker image ls -a
docker image ls -a

View File

@@ -3,9 +3,9 @@
on:
pull_request:
# TODO: Disabled temporarily for https://github.com/CodSpeedHQ/runner/issues/55
# merge_group:
# merge_group :
push:
branches: [main]
branches: ["**"]
env:
CARGO_TERM_COLOR: always

View File

@@ -74,4 +74,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4

View File

@@ -9,7 +9,7 @@ on:
pull_request:
merge_group:
push:
branches: [main]
branches: ["**"]
env:
CARGO_TERM_COLOR: always

View File

@@ -6,7 +6,7 @@ on:
pull_request:
merge_group:
push:
branches: [main]
branches: ["**"]
env:
CARGO_TERM_COLOR: always

View File

@@ -6,7 +6,9 @@ on:
workflow_dispatch:
schedule:
- cron: "0 */6 * * *"
pull_request:
branches:
- main
env:
CARGO_TERM_COLOR: always
@@ -42,6 +44,7 @@ jobs:
uses: actions/checkout@v6
with:
repository: ethereum/hive
ref: master
path: hivetests
- name: Get hive commit hash
@@ -127,27 +130,29 @@ jobs:
# eth_ rpc methods
- sim: ethereum/rpc-compat
include:
- eth_blockNumber
# - eth_blockNumber
- eth_call
- eth_chainId
- eth_createAccessList
- eth_estimateGas
- eth_feeHistory
- eth_getBalance
- eth_getBlockBy
- eth_getBlockTransactionCountBy
- eth_getCode
- eth_getProof
- eth_getStorage
- eth_getTransactionBy
- eth_getTransactionCount
- eth_getTransactionReceipt
- eth_sendRawTransaction
- eth_syncing
# debug_ rpc methods
- debug_
# - eth_chainId
# - eth_createAccessList
# - eth_estimateGas
# - eth_feeHistory
# - eth_getBalance
# - eth_getBlockBy
# - eth_getBlockTransactionCountBy
# - eth_getCode
# - eth_getProof
# - eth_getStorage
# - eth_getTransactionBy
# - eth_getTransactionCount
# - eth_getTransactionReceipt
# - eth_sendRawTransaction
# - eth_syncing
# # debug_ rpc methods
# - debug_
# consume-engine
- sim: ethereum/eels/consume-engine
limit: .*tests/amsterdam.*
- sim: ethereum/eels/consume-engine
limit: .*tests/osaka.*
- sim: ethereum/eels/consume-engine
@@ -164,10 +169,10 @@ jobs:
limit: .*tests/homestead.*
- sim: ethereum/eels/consume-engine
limit: .*tests/frontier.*
- sim: ethereum/eels/consume-engine
limit: .*tests/paris.*
# consume-rlp
- sim: ethereum/eels/consume-rlp
limit: .*tests/amsterdam.*
- sim: ethereum/eels/consume-rlp
limit: .*tests/osaka.*
- sim: ethereum/eels/consume-rlp
@@ -184,8 +189,6 @@ jobs:
limit: .*tests/homestead.*
- sim: ethereum/eels/consume-rlp
limit: .*tests/frontier.*
- sim: ethereum/eels/consume-rlp
limit: .*tests/paris.*
needs:
- prepare-reth-stable
- prepare-reth-edge

View File

@@ -6,7 +6,7 @@ on:
pull_request:
merge_group:
push:
branches: [main]
branches: ["**"]
schedule:
# Run once a day at 3:00 UTC
- cron: "0 3 * * *"

View File

@@ -4,7 +4,7 @@ on:
pull_request:
merge_group:
push:
branches: [main]
branches: ["**"]
env:
CARGO_TERM_COLOR: always

View File

@@ -6,7 +6,7 @@ on:
pull_request:
merge_group:
push:
branches: [main]
branches: ["**"]
env:
CARGO_TERM_COLOR: always

View File

@@ -4,9 +4,10 @@ name: unit
on:
pull_request:
branches: ["**"]
merge_group:
push:
branches: [main]
branches: ["**"]
env:
CARGO_TERM_COLOR: always

View File

@@ -4,9 +4,9 @@ name: windows
on:
push:
branches: [main]
branches: ["**"]
pull_request:
branches: [main]
branches: ["**"]
merge_group:
env:

219
Cargo.lock generated
View File

@@ -122,8 +122,7 @@ dependencies = [
[[package]]
name = "alloy-consensus"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c3a590d13de3944675987394715f37537b50b856e3b23a0e66e97d963edbf38"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-eips",
"alloy-primitives",
@@ -150,8 +149,7 @@ dependencies = [
[[package]]
name = "alloy-consensus-any"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f28f769d5ea999f0d8a105e434f483456a15b4e1fcb08edbbbe1650a497ff6d"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-consensus",
"alloy-eips",
@@ -165,8 +163,7 @@ dependencies = [
[[package]]
name = "alloy-contract"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "990fa65cd132a99d3c3795a82b9f93ec82b81c7de3bab0bf26ca5c73286f7186"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-consensus",
"alloy-dyn-abi",
@@ -249,24 +246,26 @@ dependencies = [
[[package]]
name = "alloy-eip7928"
version = "0.1.0"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "926b2c0d34e641cf8b17bf54ce50fda16715b9f68ad878fa6128bae410c6f890"
checksum = "6adac476434bf024279164dcdca299309f0c7d1e3557024eb7a83f8d9d01c6b5"
dependencies = [
"alloy-primitives",
"alloy-rlp",
"arbitrary",
"borsh",
"serde",
]
[[package]]
name = "alloy-eips"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09535cbc646b0e0c6fcc12b7597eaed12cf86dff4c4fba9507a61e71b94f30eb"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-eip2124",
"alloy-eip2930",
"alloy-eip7702",
"alloy-eip7928",
"alloy-primitives",
"alloy-rlp",
"alloy-serde",
@@ -287,8 +286,7 @@ dependencies = [
[[package]]
name = "alloy-evm"
version = "0.25.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6ccc4c702c840148af1ce784cc5c6ed9274a020ef32417c5b1dbeab8c317673"
source = "git+https://github.com/Rimeeeeee/evm?branch=bal-devnet-1#f29844095d4625da59d6c6dcc80c370bb570255b"
dependencies = [
"alloy-consensus",
"alloy-eips",
@@ -304,13 +302,13 @@ dependencies = [
"op-revm",
"revm",
"thiserror 2.0.17",
"tracing",
]
[[package]]
name = "alloy-genesis"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1005520ccf89fa3d755e46c1d992a9e795466c2e7921be2145ef1f749c5727de"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-eips",
"alloy-primitives",
@@ -350,8 +348,7 @@ dependencies = [
[[package]]
name = "alloy-json-rpc"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b626409c98ba43aaaa558361bca21440c88fd30df7542c7484b9c7a1489cdb"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-primitives",
"alloy-sol-types",
@@ -365,8 +362,7 @@ dependencies = [
[[package]]
name = "alloy-network"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89924fdcfeee0e0fa42b1f10af42f92802b5d16be614a70897382565663bf7cf"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-consensus",
"alloy-consensus-any",
@@ -391,8 +387,7 @@ dependencies = [
[[package]]
name = "alloy-network-primitives"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f0dbe56ff50065713ff8635d8712a0895db3ad7f209db9793ad8fcb6b1734aa"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-consensus",
"alloy-eips",
@@ -404,8 +399,7 @@ dependencies = [
[[package]]
name = "alloy-op-evm"
version = "0.25.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f640da852f93ddaa3b9a602b7ca41d80e0023f77a67b68aaaf511c32f1fe0ce"
source = "git+https://github.com/Rimeeeeee/evm?branch=bal-devnet-1#f29844095d4625da59d6c6dcc80c370bb570255b"
dependencies = [
"alloy-consensus",
"alloy-eips",
@@ -440,6 +434,7 @@ checksum = "f6a0fb18dd5fb43ec5f0f6a20be1ce0287c79825827de5744afaa6c957737c33"
dependencies = [
"alloy-rlp",
"arbitrary",
"borsh",
"bytes",
"cfg-if",
"const-hex",
@@ -467,8 +462,7 @@ dependencies = [
[[package]]
name = "alloy-provider"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b56f7a77513308a21a2ba0e9d57785a9d9d2d609e77f4e71a78a1192b83ff2d"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-chains",
"alloy-consensus",
@@ -512,8 +506,7 @@ dependencies = [
[[package]]
name = "alloy-pubsub"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94813abbd7baa30c700ea02e7f92319dbcb03bff77aeea92a3a9af7ba19c5c70"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-json-rpc",
"alloy-primitives",
@@ -556,8 +549,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-client"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff01723afc25ec4c5b04de399155bef7b6a96dfde2475492b1b7b4e7a4f46445"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-json-rpc",
"alloy-primitives",
@@ -582,8 +574,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-types"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f91bf006bb06b7d812591b6ac33395cb92f46c6a65cda11ee30b348338214f0f"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-primitives",
"alloy-rpc-types-engine",
@@ -595,8 +586,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-admin"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b934c3bcdc6617563b45deb36a40881c8230b94d0546ea739dff7edb3aa2f6fd"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-genesis",
"alloy-primitives",
@@ -607,8 +597,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-anvil"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e82145856df8abb1fefabef58cdec0f7d9abf337d4abd50c1ed7e581634acdd"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-primitives",
"alloy-rpc-types-eth",
@@ -619,8 +608,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-any"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "212ca1c1dab27f531d3858f8b1a2d6bfb2da664be0c1083971078eb7b71abe4b"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-consensus-any",
"alloy-rpc-types-eth",
@@ -630,8 +618,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-beacon"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d92a9b4b268fac505ef7fb1dac9bb129d4fd7de7753f22a5b6e9f666f7f7de6"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-eips",
"alloy-primitives",
@@ -650,8 +637,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-debug"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bab1ebed118b701c497e6541d2d11dfa6f3c6ae31a3c52999daa802fcdcc16b7"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-primitives",
"derive_more",
@@ -662,8 +648,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-engine"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "232f00fcbcd3ee3b9399b96223a8fc884d17742a70a44f9d7cef275f93e6e872"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-consensus",
"alloy-eips",
@@ -683,8 +668,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-eth"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5715d0bf7efbd360873518bd9f6595762136b5327a9b759a8c42ccd9b5e44945"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-consensus",
"alloy-consensus-any",
@@ -705,8 +689,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-mev"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7b61941d2add2ee64646612d3eda92cbbde8e6c933489760b6222c8898c79be"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-consensus",
"alloy-eips",
@@ -720,8 +703,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-trace"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9763cc931a28682bd4b9a68af90057b0fbe80e2538a82251afd69d7ae00bbebf"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-primitives",
"alloy-rpc-types-eth",
@@ -734,8 +716,7 @@ dependencies = [
[[package]]
name = "alloy-rpc-types-txpool"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "359a8caaa98cb49eed62d03f5bc511dd6dd5dee292238e8627a6e5690156df0f"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-primitives",
"alloy-rpc-types-eth",
@@ -746,8 +727,7 @@ dependencies = [
[[package]]
name = "alloy-serde"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ed8531cae8d21ee1c6571d0995f8c9f0652a6ef6452fde369283edea6ab7138"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-primitives",
"arbitrary",
@@ -758,8 +738,7 @@ dependencies = [
[[package]]
name = "alloy-signer"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb10ccd49d0248df51063fce6b716f68a315dd912d55b32178c883fd48b4021d"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-primitives",
"async-trait",
@@ -773,8 +752,7 @@ dependencies = [
[[package]]
name = "alloy-signer-local"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4d992d44e6c414ece580294abbadb50e74cfd4eaa69787350a4dfd4b20eaa1b"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-consensus",
"alloy-network",
@@ -862,8 +840,7 @@ dependencies = [
[[package]]
name = "alloy-transport"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f50a9516736d22dd834cc2240e5bf264f338667cc1d9e514b55ec5a78b987ca"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-json-rpc",
"auto_impl",
@@ -885,8 +862,7 @@ dependencies = [
[[package]]
name = "alloy-transport-http"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a18b541a6197cf9a084481498a766fdf32fefda0c35ea6096df7d511025e9f1"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-json-rpc",
"alloy-transport",
@@ -900,8 +876,7 @@ dependencies = [
[[package]]
name = "alloy-transport-ipc"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8075911680ebc537578cacf9453464fd394822a0f68614884a9c63f9fbaf5e89"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-json-rpc",
"alloy-pubsub",
@@ -920,8 +895,7 @@ dependencies = [
[[package]]
name = "alloy-transport-ws"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "921d37a57e2975e5215f7dd0f28873ed5407c7af630d4831a4b5c737de4b0b8b"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"alloy-pubsub",
"alloy-transport",
@@ -957,8 +931,7 @@ dependencies = [
[[package]]
name = "alloy-tx-macros"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2289a842d02fe63f8c466db964168bb2c7a9fdfb7b24816dbb17d45520575fb"
source = "git+https://github.com/Soubhik-10/alloy?branch=bal-devnet-1#4949c3918ce4c59af674ada45a406a5bd5c4fa12"
dependencies = [
"darling 0.21.3",
"proc-macro2",
@@ -1491,12 +1464,6 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
[[package]]
name = "az"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973"
[[package]]
name = "backon"
version = "1.6.0"
@@ -2400,7 +2367,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
dependencies = [
"lazy_static",
"windows-sys 0.59.0",
"windows-sys 0.48.0",
]
[[package]]
@@ -3141,7 +3108,7 @@ dependencies = [
"libc",
"option-ext",
"redox_users 0.5.2",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@@ -3471,7 +3438,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@@ -4461,16 +4428,6 @@ dependencies = [
"web-sys",
]
[[package]]
name = "gmp-mpfr-sys"
version = "1.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60f8970a75c006bb2f8ae79c6768a116dd215fa8346a87aed99bf9d82ca43394"
dependencies = [
"libc",
"windows-sys 0.60.2",
]
[[package]]
name = "group"
version = "0.13.0"
@@ -4859,7 +4816,7 @@ dependencies = [
"js-sys",
"log",
"wasm-bindgen",
"windows-core 0.62.2",
"windows-core 0.57.0",
]
[[package]]
@@ -5205,7 +5162,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46"
dependencies = [
"hermit-abi",
"libc",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@@ -6159,7 +6116,7 @@ version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@@ -6488,9 +6445,9 @@ dependencies = [
[[package]]
name = "op-revm"
version = "14.1.0"
version = "15.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1475a779c73999fc803778524042319691b31f3d6699d2b560c4ed8be1db802a"
checksum = "79c92b75162c2ed1661849fa51683b11254a5b661798360a2c24be918edafd40"
dependencies = [
"auto_impl",
"revm",
@@ -7255,7 +7212,7 @@ dependencies = [
"once_cell",
"socket2 0.6.1",
"tracing",
"windows-sys 0.60.2",
"windows-sys 0.59.0",
]
[[package]]
@@ -8016,11 +7973,13 @@ dependencies = [
"alloy-consensus",
"alloy-eips",
"alloy-primitives",
"alloy-rlp",
"rand 0.9.2",
"reth-chainspec",
"reth-consensus",
"reth-ethereum-primitives",
"reth-primitives-traits",
"tracing",
]
[[package]]
@@ -8529,6 +8488,7 @@ dependencies = [
"reth-primitives-traits",
"reth-revm",
"reth-storage-api",
"revm",
"serde",
"serde_json",
"tokio",
@@ -8744,6 +8704,7 @@ dependencies = [
"alloy-consensus",
"alloy-eips",
"alloy-primitives",
"alloy-rlp",
"reth-chainspec",
"reth-consensus",
"reth-consensus-common",
@@ -8883,6 +8844,7 @@ dependencies = [
"alloy-evm",
"alloy-genesis",
"alloy-primitives",
"alloy-rlp",
"alloy-rpc-types-engine",
"derive_more",
"parking_lot",
@@ -11316,9 +11278,9 @@ dependencies = [
[[package]]
name = "revm"
version = "33.1.0"
version = "34.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c85ed0028f043f87b3c88d4a4cb6f0a76440085523b6a8afe5ff003cf418054"
checksum = "c2aabdebaa535b3575231a88d72b642897ae8106cf6b0d12eafc6bfdf50abfc7"
dependencies = [
"revm-bytecode",
"revm-context",
@@ -11335,9 +11297,9 @@ dependencies = [
[[package]]
name = "revm-bytecode"
version = "7.1.1"
version = "8.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2c6b5e6e8dd1e28a4a60e5f46615d4ef0809111c9e63208e55b5c7058200fb0"
checksum = "74d1e5c1eaa44d39d537f668bc5c3409dc01e5c8be954da6c83370bbdf006457"
dependencies = [
"bitvec",
"phf",
@@ -11347,9 +11309,9 @@ dependencies = [
[[package]]
name = "revm-context"
version = "12.1.0"
version = "13.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f038f0c9c723393ac897a5df9140b21cfa98f5753a2cb7d0f28fa430c4118abf"
checksum = "892ff3e6a566cf8d72ffb627fdced3becebbd9ba64089c25975b9b028af326a5"
dependencies = [
"bitvec",
"cfg-if",
@@ -11364,9 +11326,9 @@ dependencies = [
[[package]]
name = "revm-context-interface"
version = "13.1.0"
version = "14.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "431c9a14e4ef1be41ae503708fd02d974f80ef1f2b6b23b5e402e8d854d1b225"
checksum = "57f61cc6d23678c4840af895b19f8acfbbd546142ec8028b6526c53cc1c16c98"
dependencies = [
"alloy-eip2930",
"alloy-eip7702",
@@ -11380,9 +11342,9 @@ dependencies = [
[[package]]
name = "revm-database"
version = "9.0.6"
version = "10.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "980d8d6bba78c5dd35b83abbb6585b0b902eb25ea4448ed7bfba6283b0337191"
checksum = "529528d0b05fe646be86223032c3e77aa8b05caa2a35447d538c55965956a511"
dependencies = [
"alloy-eips",
"revm-bytecode",
@@ -11394,22 +11356,23 @@ dependencies = [
[[package]]
name = "revm-database-interface"
version = "8.0.5"
version = "9.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8cce03e3780287b07abe58faf4a7f5d8be7e81321f93ccf3343c8f7755602bae"
checksum = "b7bf93ac5b91347c057610c0d96e923db8c62807e03f036762d03e981feddc1d"
dependencies = [
"auto_impl",
"either",
"revm-primitives",
"revm-state",
"serde",
"thiserror 2.0.17",
]
[[package]]
name = "revm-handler"
version = "14.1.0"
version = "15.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d44f8f6dbeec3fecf9fe55f78ef0a758bdd92ea46cd4f1ca6e2a946b32c367f3"
checksum = "0cd0e43e815a85eded249df886c4badec869195e70cdd808a13cfca2794622d2"
dependencies = [
"auto_impl",
"derive-where",
@@ -11426,9 +11389,9 @@ dependencies = [
[[package]]
name = "revm-inspector"
version = "14.1.0"
version = "15.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5617e49216ce1ca6c8826bcead0386bc84f49359ef67cde6d189961735659f93"
checksum = "4f3ccad59db91ef93696536a0dbaf2f6f17cfe20d4d8843ae118edb7e97947ef"
dependencies = [
"auto_impl",
"either",
@@ -11445,8 +11408,7 @@ dependencies = [
[[package]]
name = "revm-inspectors"
version = "0.33.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01def7351cd9af844150b8e88980bcd11304f33ce23c3d7c25f2a8dab87c1345"
source = "git+https://github.com/paradigmxyz/revm-inspectors?branch=staging-revm#3020ea8cdc409b978871dbe89fa06b00a38e61fb"
dependencies = [
"alloy-primitives",
"alloy-rpc-types-eth",
@@ -11464,9 +11426,9 @@ dependencies = [
[[package]]
name = "revm-interpreter"
version = "31.1.0"
version = "32.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26ec36405f7477b9dccdc6caa3be19adf5662a7a0dffa6270cdb13a090c077e5"
checksum = "11406408597bc249392d39295831c4b641b3a6f5c471a7c41104a7a1e3564c07"
dependencies = [
"revm-bytecode",
"revm-context-interface",
@@ -11477,9 +11439,9 @@ dependencies = [
[[package]]
name = "revm-precompile"
version = "31.0.0"
version = "32.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a62958af953cc4043e93b5be9b8497df84cc3bd612b865c49a7a7dfa26a84e2"
checksum = "50c1285c848d240678bf69cb0f6179ff5a4aee6fc8e921d89708087197a0aff3"
dependencies = [
"ark-bls12-381",
"ark-bn254",
@@ -11495,16 +11457,15 @@ dependencies = [
"p256",
"revm-primitives",
"ripemd",
"rug",
"secp256k1 0.31.1",
"sha2",
]
[[package]]
name = "revm-primitives"
version = "21.0.2"
version = "22.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29e161db429d465c09ba9cbff0df49e31049fe6b549e28eb0b7bd642fcbd4412"
checksum = "ba580c56a8ec824a64f8a1683577876c2e1dbe5247044199e9b881421ad5dcf9"
dependencies = [
"alloy-primitives",
"num_enum",
@@ -11514,10 +11475,11 @@ dependencies = [
[[package]]
name = "revm-state"
version = "8.1.1"
version = "9.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d8be953b7e374dbdea0773cf360debed8df394ea8d82a8b240a6b5da37592fc"
checksum = "311720d4f0f239b041375e7ddafdbd20032a33b7bae718562ea188e188ed9fd3"
dependencies = [
"alloy-eip7928",
"bitflags 2.10.0",
"revm-bytecode",
"revm-primitives",
@@ -11666,18 +11628,6 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "rug"
version = "1.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58ad2e973fe3c3214251a840a621812a4f40468da814b1a3d6947d433c2af11f"
dependencies = [
"az",
"gmp-mpfr-sys",
"libc",
"libm",
]
[[package]]
name = "ruint"
version = "1.17.2"
@@ -11689,6 +11639,7 @@ dependencies = [
"ark-ff 0.3.0",
"ark-ff 0.4.2",
"ark-ff 0.5.0",
"borsh",
"bytes",
"fastrlp 0.3.1",
"fastrlp 0.4.0",
@@ -11784,7 +11735,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys 0.11.0",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@@ -12670,7 +12621,7 @@ dependencies = [
"getrandom 0.3.4",
"once_cell",
"rustix 1.1.3",
"windows-sys 0.61.2",
"windows-sys 0.59.0",
]
[[package]]
@@ -13386,7 +13337,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5f7c95348f20c1c913d72157b3c6dee6ea3e30b3d19502c5a7f6d3f160dacbf"
dependencies = [
"cc",
"windows-targets 0.52.6",
"windows-targets 0.48.5",
]
[[package]]
@@ -13920,7 +13871,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
"windows-sys 0.61.2",
"windows-sys 0.48.0",
]
[[package]]

View File

@@ -376,11 +376,11 @@ reth-era-utils = { path = "crates/era-utils" }
reth-errors = { path = "crates/errors" }
reth-eth-wire = { path = "crates/net/eth-wire" }
reth-eth-wire-types = { path = "crates/net/eth-wire-types" }
reth-ethereum-payload-builder = { path = "crates/ethereum/payload" }
reth-ethereum-cli = { path = "crates/ethereum/cli", default-features = false }
reth-ethereum-consensus = { path = "crates/ethereum/consensus", default-features = false }
reth-ethereum-engine-primitives = { path = "crates/ethereum/engine-primitives", default-features = false }
reth-ethereum-forks = { path = "crates/ethereum/hardforks", default-features = false }
reth-ethereum-payload-builder = { path = "crates/ethereum/payload" }
reth-ethereum-primitives = { path = "crates/ethereum/primitives", default-features = false }
reth-ethereum = { path = "crates/ethereum/reth" }
reth-etl = { path = "crates/etl" }
@@ -472,24 +472,29 @@ reth-zstd-compressors = { path = "crates/storage/zstd-compressors", default-feat
reth-ress-protocol = { path = "crates/ress/protocol" }
reth-ress-provider = { path = "crates/ress/provider" }
# revm
revm = { version = "33.1.0", default-features = false }
revm-bytecode = { version = "7.1.1", default-features = false }
revm-database = { version = "9.0.5", default-features = false }
revm-state = { version = "8.1.1", default-features = false }
revm-primitives = { version = "21.0.2", default-features = false }
revm-interpreter = { version = "31.1.0", default-features = false }
revm-database-interface = { version = "8.0.5", default-features = false }
op-revm = { version = "14.1.0", default-features = false }
# revm v103 (revm v34.0.0 with BAL EIP-7928 support)
revm = { version = "34.0.0", default-features = false }
revm-bytecode = { version = "8.0.0", default-features = false }
revm-database = { version = "10.0.0", default-features = false }
revm-state = { version = "9.0.0", default-features = false }
revm-primitives = { version = "22.0.0", default-features = false }
revm-interpreter = { version = "32.0.0", default-features = false }
revm-database-interface = { version = "9.0.0", default-features = false }
revm-context = { version = "13.0.0", default-features = false }
revm-context-interface = { version = "14.0.0", default-features = false }
revm-inspector = { version = "15.0.0", default-features = false }
revm-handler = { version = "15.0.0", default-features = false }
revm-precompile = { version = "32.0.0", default-features = false }
op-revm = { version = "15.0.0", default-features = false }
revm-inspectors = "0.33.2"
# eth
alloy-chains = { version = "0.2.5", default-features = false }
alloy-dyn-abi = "1.4.3"
alloy-eip2124 = { version = "0.2.0", default-features = false }
alloy-eip7928 = { version = "0.1.0", default-features = false }
alloy-evm = { version = "0.25.1", default-features = false }
alloy-primitives = { version = "1.5.0", default-features = false, features = ["map-foldhash"] }
alloy-chains = { version = "0.2.5", default-features = false }
alloy-evm = { version = "0.25.2", default-features = false }
alloy-dyn-abi = "1.4.1"
alloy-eip7928 = { version = "0.3.0", default-features = false }
alloy-eip2124 = { version = "0.2.0", default-features = false }
alloy-rlp = { version = "0.3.10", default-features = false, features = ["core-net"] }
alloy-sol-macro = "1.5.0"
alloy-sol-types = { version = "1.5.0", default-features = false }
@@ -526,7 +531,7 @@ alloy-transport-ipc = { version = "1.4.3", default-features = false }
alloy-transport-ws = { version = "1.4.3", default-features = false }
# op
alloy-op-evm = { version = "0.25.0", default-features = false }
alloy-op-evm = { version = "0.25.2", default-features = false }
alloy-op-hardforks = "0.4.4"
op-alloy-rpc-types = { version = "0.23.1", default-features = false }
op-alloy-rpc-types-engine = { version = "0.23.1", default-features = false }
@@ -743,46 +748,50 @@ vergen = "9.0.4"
visibility = "0.1.1"
walkdir = "2.3.3"
vergen-git2 = "1.0.5"
# networking
ipnet = "2.11"
# [patch.crates-io]
# alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-contract = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-json-rpc = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-network-primitives = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-pubsub = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-rpc-types-admin = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-rpc-types-anvil = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-rpc-types-beacon = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-rpc-types-debug = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-rpc-types-eth = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-rpc-types-mev = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-rpc-types-txpool = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-serde = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-signer-local = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-transport = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-transport-ipc = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
[patch.crates-io]
alloy-consensus = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-contract = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-eips = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-genesis = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-json-rpc = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-network = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-network-primitives = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-provider = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-pubsub = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-rpc-client = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-rpc-types = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-rpc-types-admin = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-rpc-types-anvil = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-rpc-types-beacon = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-rpc-types-debug = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-rpc-types-engine = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-rpc-types-eth = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-rpc-types-mev = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-rpc-types-trace = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-rpc-types-txpool = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-serde = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-signer = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-signer-local = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-transport = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-transport-http = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-transport-ipc = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
alloy-transport-ws = { git = "https://github.com/Soubhik-10/alloy", branch = "bal-devnet-1" }
# alloy-hardforks = { git = "https://github.com/Rimeeeeee/hardforks", branch = "amsterdam" }
# alloy-op-hardforks = { git = "https://github.com/Rimeeeeee/hardforks", branch = "amsterdam" }
# op-alloy-consensus = { git = "https://github.com/alloy-rs/op-alloy", rev = "a79d6fc" }
# op-alloy-network = { git = "https://github.com/alloy-rs/op-alloy", rev = "a79d6fc" }
# op-alloy-rpc-types = { git = "https://github.com/alloy-rs/op-alloy", rev = "a79d6fc" }
# op-alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/op-alloy", rev = "a79d6fc" }
# op-alloy-rpc-jsonrpsee = { git = "https://github.com/alloy-rs/op-alloy", rev = "a79d6fc" }
#
# revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "1207e33" }
# alloy-evm with BAL support for revm v34/v103
alloy-evm = { git = "https://github.com/alloy-rs/evm", branch = "staging-revm" }
alloy-op-evm = { git = "https://github.com/alloy-rs/evm", branch = "staging-revm" }
revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", branch = "staging-revm" }
#
# jsonrpsee = { git = "https://github.com/paradigmxyz/jsonrpsee", branch = "matt/make-rpc-service-pub" }
# jsonrpsee-core = { git = "https://github.com/paradigmxyz/jsonrpsee", branch = "matt/make-rpc-service-pub" }

View File

@@ -541,6 +541,7 @@ impl Command {
suggested_fee_recipient: alloy_primitives::Address::ZERO,
withdrawals: Some(vec![]),
parent_beacon_block_root: Some(B256::ZERO),
slot_number: None,
},
transactions: transactions.to_vec(),
extra_data: None,

View File

@@ -69,6 +69,7 @@ pub(crate) fn prepare_payload_request(
suggested_fee_recipient: Address::ZERO,
withdrawals: shanghai_active.then(Vec::new),
parent_beacon_block_root: cancun_active.then_some(B256::ZERO),
slot_number: None,
},
forkchoice_state: ForkchoiceState {
head_block_hash: parent_hash,

View File

@@ -181,6 +181,45 @@ pub(crate) fn payload_to_new_payload(
target_version: Option<EngineApiMessageVersion>,
) -> eyre::Result<(EngineApiMessageVersion, serde_json::Value)> {
let (version, params) = match payload {
ExecutionPayload::V4(payload) => {
let cancun = sidecar.cancun().unwrap();
if let Some(prague) = sidecar.prague() {
if is_optimism {
(
EngineApiMessageVersion::V4,
serde_json::to_value((
OpExecutionPayloadV4 {
payload_inner: payload.payload_inner,
withdrawals_root: withdrawals_root.unwrap(),
},
cancun.versioned_hashes.clone(),
cancun.parent_beacon_block_root,
Requests::default(),
))?,
)
} else {
(
EngineApiMessageVersion::V4,
serde_json::to_value((
payload,
cancun.versioned_hashes.clone(),
cancun.parent_beacon_block_root,
prague.requests.requests_hash(),
))?,
)
}
} else {
(
EngineApiMessageVersion::V3,
serde_json::to_value((
payload,
cancun.versioned_hashes.clone(),
cancun.parent_beacon_block_root,
))?,
)
}
}
ExecutionPayload::V3(payload) => {
let cancun = sidecar.cancun().unwrap();
@@ -289,7 +328,10 @@ pub(crate) async fn call_forkchoice_updated<N, P: EngineApiValidWaitExt<N>>(
) -> TransportResult<ForkchoiceUpdated> {
// FCU V3 is used for both Cancun and Prague (there is no FCU V4)
match message_version {
EngineApiMessageVersion::V3 | EngineApiMessageVersion::V4 | EngineApiMessageVersion::V5 => {
EngineApiMessageVersion::V3 |
EngineApiMessageVersion::V4 |
EngineApiMessageVersion::V5 |
EngineApiMessageVersion::V6 => {
provider.fork_choice_updated_v3_wait(forkchoice_state, payload_attributes).await
}
EngineApiMessageVersion::V2 => {

View File

@@ -173,6 +173,7 @@ impl<N: NodePrimitives> TestBlockBuilder<N> {
transactions: transactions.into_iter().map(|tx| tx.into_inner()).collect(),
ommers: Vec::new(),
withdrawals: Some(vec![].into()),
block_access_list: None,
},
)
}

View File

@@ -45,6 +45,10 @@ use reth_network_peers::{
};
use reth_primitives_traits::{sync::LazyLock, BlockHeader, SealedHeader};
/// The hash of an empty block access list.
const EMPTY_BLOCK_ACCESS_LIST_HASH: B256 =
b256!("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347");
/// Helper method building a [`Header`] given [`Genesis`] and [`ChainHardforks`].
pub fn make_genesis_header(genesis: &Genesis, hardforks: &ChainHardforks) -> Header {
// If London is activated at genesis, we set the initial base fee as per EIP-1559.
@@ -79,6 +83,12 @@ pub fn make_genesis_header(genesis: &Genesis, hardforks: &ChainHardforks) -> Hea
.active_at_timestamp(genesis.timestamp)
.then_some(EMPTY_REQUESTS_HASH);
// If Amsterdam is activated at genesis we set block access list hash empty hash.
let block_access_list_hash = hardforks
.fork(EthereumHardfork::Amsterdam)
.active_at_timestamp(genesis.timestamp)
.then_some(EMPTY_BLOCK_ACCESS_LIST_HASH);
Header {
number: genesis.number.unwrap_or_default(),
parent_hash: genesis.parent_hash.unwrap_or_default(),
@@ -96,6 +106,7 @@ pub fn make_genesis_header(genesis: &Genesis, hardforks: &ChainHardforks) -> Hea
blob_gas_used,
excess_blob_gas,
requests_hash,
block_access_list_hash,
..Default::default()
}
}
@@ -300,6 +311,7 @@ pub fn create_chain_config(
cancun_time: timestamp(EthereumHardfork::Cancun),
prague_time: timestamp(EthereumHardfork::Prague),
osaka_time: timestamp(EthereumHardfork::Osaka),
amsterdam_time: timestamp(EthereumHardfork::Amsterdam),
bpo1_time: timestamp(EthereumHardfork::Bpo1),
bpo2_time: timestamp(EthereumHardfork::Bpo2),
bpo3_time: timestamp(EthereumHardfork::Bpo3),
@@ -901,6 +913,7 @@ impl From<Genesis> for ChainSpec {
(EthereumHardfork::Bpo3.boxed(), genesis.config.bpo3_time),
(EthereumHardfork::Bpo4.boxed(), genesis.config.bpo4_time),
(EthereumHardfork::Bpo5.boxed(), genesis.config.bpo5_time),
(EthereumHardfork::Amsterdam.boxed(), genesis.config.amsterdam_time),
];
let mut time_hardforks = time_hardfork_opts
@@ -1207,6 +1220,19 @@ impl ChainSpecBuilder {
self
}
/// Enable Amsterdam at genesis.
pub fn amsterdam_activated(mut self) -> Self {
self = self.osaka_activated();
self.hardforks.insert(EthereumHardfork::Amsterdam, ForkCondition::Timestamp(0));
self
}
/// Enable Amsterdam at the given timestamp.
pub fn with_amsterdam_at(mut self, timestamp: u64) -> Self {
self.hardforks.insert(EthereumHardfork::Amsterdam, ForkCondition::Timestamp(timestamp));
self
}
/// Build the resulting [`ChainSpec`].
///
/// # Panics

View File

@@ -113,6 +113,7 @@ impl<C: ChainSpecParser> Command<C> {
tx.clear::<tables::TransactionBlocks>()?;
tx.clear::<tables::BlockOmmers<HeaderTy<N>>>()?;
tx.clear::<tables::BlockWithdrawals>()?;
tx.clear::<tables::BlockAccessLists>()?;
reset_stage_checkpoint(tx, StageId::Bodies)?;
insert_genesis_header(&provider_rw, &self.env.chain)?;

View File

@@ -14,11 +14,14 @@ workspace = true
# reth
reth-chainspec.workspace = true
reth-consensus.workspace = true
tracing.workspace = true
# ethereum
reth-primitives-traits.workspace = true
alloy-consensus.workspace = true
alloy-primitives.workspace = true
alloy-eips.workspace = true
alloy-rlp.workspace = true
[dev-dependencies]
alloy-primitives = { workspace = true, features = ["rand"] }
@@ -35,4 +38,6 @@ std = [
"reth-primitives-traits/std",
"reth-ethereum-primitives/std",
"alloy-primitives/std",
"alloy-rlp/std",
"tracing/std",
]

View File

@@ -69,6 +69,29 @@ pub fn validate_shanghai_withdrawals<B: Block>(
Ok(())
}
/// Validate that block access lists are present in Amsterdam
///
/// [EIP-7928]: https://eips.ethereum.org/EIPS/eip-7928
#[inline]
pub fn validate_amsterdam_block_access_lists<B: Block>(
block: &SealedBlock<B>,
) -> Result<(), ConsensusError> {
let bal = block.body().block_access_list().ok_or(ConsensusError::BlockAccessListMissing)?;
let bal_hash = alloy_primitives::keccak256(alloy_rlp::encode(bal));
let header_bal_hash =
block.block_access_list_hash().ok_or(ConsensusError::BlockAccessListHashMissing)?;
if bal_hash != header_bal_hash {
tracing::error!(
target: "consensus",
?header_bal_hash,
?bal,
"Block access list hash mismatch in validation.rs in L81"
);
return Err(ConsensusError::InvalidBalHash);
}
Ok(())
}
/// Validate that blob gas is present in the block if Cancun is active.
///
/// See [EIP-4844]: Shard Blob Transactions
@@ -131,6 +154,21 @@ where
}
_ => return Err(ConsensusError::WithdrawalsRootUnexpected),
}
if let (Some(expected_hash), Some(body_bal)) =
(header.block_access_list_hash(), body.block_access_list())
{
let got_hash = alloy_primitives::keccak256(alloy_rlp::encode(body_bal));
if got_hash != expected_hash {
tracing::error!(
target: "consensus",
?expected_hash,
?body_bal,
"Block access list hash mismatch in validation.rs in L164"
);
return Err(ConsensusError::InvalidBalHash);
}
}
Ok(())
}
@@ -217,6 +255,10 @@ where
})
}
if chain_spec.is_amsterdam_active_at_timestamp(block.header().timestamp()) {
validate_amsterdam_block_access_lists(block)?;
}
Ok(())
}
@@ -492,6 +534,7 @@ mod tests {
transactions: vec![transaction],
ommers: vec![],
withdrawals: Some(Withdrawals::default()),
block_access_list: None,
};
let block = SealedBlock::seal_slow(alloy_consensus::Block { header, body });

View File

@@ -402,9 +402,41 @@ pub enum ConsensusError {
/// The maximum allowed RLP length.
max_rlp_length: usize,
},
/// Error when the hash of block access list is different from the expected hash.
#[error("Block header's BAL hash does not match the computed BAL hash.")]
InvalidBalHash,
/// Error when the block access list hash is missing.
#[error("block access list hash missing")]
BlockAccessListHashMissing,
/// Error when the block access list is different from the expected access list.
#[error("Block's access list is invalid.")]
InvalidBlockAccessList,
/// Error when the block access list is missing.
#[error("block access list missing")]
BlockAccessListMissing,
/// Error when the block access list hash is unexpected.
#[error("block access list hash unexpected")]
BlockAccessListHashUnexpected,
/// Error when the block access list contains an account change that is not present in the
/// computed access list.
#[error("Block BAL contains an account change that is not present in the computed BAL.")]
InvalidBalExtraAccount,
/// Error when the block access list is missing an account change that is present in the
/// computed access list.
#[error("Block BAL is missing an account change that is present in the computed BAL.")]
InvalidBalMissingAccount,
/// EIP-7825: Transaction gas limit exceeds maximum allowed
#[error(transparent)]
TransactionGasLimitTooHigh(Box<TxGasLimitTooHighErr>),
/// Other, likely an injected L2 error.
#[error("{0}")]
Other(String),

View File

@@ -56,6 +56,7 @@ pub fn generate_test_blocks(chain_spec: &ChainSpec, count: u64) -> Vec<SealedBlo
excess_blob_gas: None,
parent_beacon_block_root: None,
requests_hash: None,
block_access_list_hash: None,
};
// Set required fields based on chain spec
@@ -106,6 +107,7 @@ pub fn generate_test_blocks(chain_spec: &ChainSpec, count: u64) -> Vec<SealedBlo
transactions: vec![],
ommers: vec![],
withdrawals: header.withdrawals_root.is_some().then(Withdrawals::default),
block_access_list: None,
};
// Create the block

View File

@@ -227,6 +227,7 @@ where
suggested_fee_recipient: alloy_primitives::Address::random(),
withdrawals: Some(vec![]),
parent_beacon_block_root: Some(B256::ZERO),
slot_number: None,
};
env.active_node_state_mut()?
@@ -299,6 +300,7 @@ where
suggested_fee_recipient: alloy_primitives::Address::random(),
withdrawals: Some(vec![]),
parent_beacon_block_root: Some(B256::ZERO),
slot_number: None,
};
let fresh_fcu_result = EngineApiClient::<Engine>::fork_choice_updated_v3(

View File

@@ -254,6 +254,7 @@ where
suggested_fee_recipient: alloy_primitives::Address::ZERO,
withdrawals: Some(vec![]),
parent_beacon_block_root: Some(B256::ZERO),
slot_number: None,
};
EthPayloadBuilderAttributes::new(B256::ZERO, attributes)
};
@@ -284,6 +285,7 @@ where
suggested_fee_recipient: alloy_primitives::Address::ZERO,
withdrawals: Some(vec![]),
parent_beacon_block_root: Some(B256::ZERO),
slot_number: None,
};
<<N as NodeTypes>::Payload as PayloadTypes>::PayloadBuilderAttributes::from(
EthPayloadBuilderAttributes::new(B256::ZERO, attributes),

View File

@@ -161,6 +161,7 @@ async fn test_testsuite_assert_mine_block() -> Result<()> {
suggested_fee_recipient: Address::random(),
withdrawals: None,
parent_beacon_block_root: None,
slot_number: None,
},
));

View File

@@ -448,12 +448,14 @@ mod tests {
nonce: account.nonce,
code_hash: account.bytecode_hash.unwrap_or_default(),
code: None,
account_id: None,
}),
original_info: (i == 0).then(|| AccountInfo {
balance: account.balance.checked_div(U256::from(2)).unwrap_or(U256::ZERO),
nonce: 0,
code_hash: account.bytecode_hash.unwrap_or_default(),
code: None,
account_id: None,
}),
storage,
status: AccountStatus::default(),
@@ -837,6 +839,7 @@ mod tests {
receipts: vec![],
requests: Requests::default(),
gas_used: 0,
block_access_list: Default::default(),
blob_gas_used: 0,
},
};

View File

@@ -204,7 +204,7 @@ where
EngineApiMessageVersion::default(),
)
.await?;
tracing::debug!(target: "engine::local", "FCU result: {res:?}");
if !res.is_valid() {
eyre::bail!("Invalid payload status")
}

View File

@@ -57,6 +57,7 @@ where
.chain_spec
.is_cancun_active_at_timestamp(timestamp)
.then(B256::random),
slot_number: None,
}
}
}

View File

@@ -62,7 +62,8 @@ pub trait EngineTypes:
+ TryInto<Self::ExecutionPayloadEnvelopeV2>
+ TryInto<Self::ExecutionPayloadEnvelopeV3>
+ TryInto<Self::ExecutionPayloadEnvelopeV4>
+ TryInto<Self::ExecutionPayloadEnvelopeV5>,
+ TryInto<Self::ExecutionPayloadEnvelopeV5>
+ TryInto<Self::ExecutionPayloadEnvelopeV6>,
> + DeserializeOwned
+ Serialize
{
@@ -106,6 +107,14 @@ pub trait EngineTypes:
+ Send
+ Sync
+ 'static;
/// Execution Payload V6 envelope type.
type ExecutionPayloadEnvelopeV6: DeserializeOwned
+ Serialize
+ Clone
+ Unpin
+ Send
+ Sync
+ 'static;
}
/// Type that validates the payloads processed by the engine API.

View File

@@ -26,10 +26,12 @@ fn create_bench_state(num_accounts: usize) -> EvmState {
nonce: 10,
code_hash: B256::from_slice(&rng.random::<[u8; 32]>()),
code: Default::default(),
account_id: None,
},
storage,
status: AccountStatus::empty(),
transaction_id: 0,
..Default::default()
};
let address = Address::with_last_byte(i as u8);

View File

@@ -62,6 +62,7 @@ fn create_bench_state_updates(params: &BenchParams) -> Vec<EvmState> {
storage: HashMap::default(),
status: AccountStatus::SelfDestructed,
transaction_id: 0,
..Default::default()
}
} else {
RevmAccount {
@@ -70,6 +71,7 @@ fn create_bench_state_updates(params: &BenchParams) -> Vec<EvmState> {
nonce: rng.random::<u64>(),
code_hash: KECCAK_EMPTY,
code: Some(Default::default()),
account_id: None,
},
storage: (0..rng.random_range(0..=params.storage_slots_per_account))
.map(|_| {
@@ -85,6 +87,7 @@ fn create_bench_state_updates(params: &BenchParams) -> Vec<EvmState> {
.collect(),
status: AccountStatus::Touched,
transaction_id: 0,
..Default::default()
}
};

View File

@@ -486,6 +486,7 @@ mod tests {
receipts: vec![],
requests: Requests::default(),
gas_used: 1000,
block_access_list: None,
blob_gas_used: 0,
},
))
@@ -580,10 +581,12 @@ mod tests {
nonce: 10,
code_hash: B256::random(),
code: Default::default(),
account_id: None,
},
storage,
status: AccountStatus::default(),
transaction_id: 0,
..Default::default()
},
);
state

View File

@@ -582,7 +582,7 @@ where
// null}` if the expected and the actual arrays don't match.
//
// This validation **MUST** be instantly run in all cases even during active sync process.
tracing::debug!("Payload received {:?}", payload);
let num_hash = payload.num_hash();
let engine_event = ConsensusEngineEvent::BlockReceived(num_hash);
self.emit_event(EngineApiEvent::BeaconConsensus(engine_event));
@@ -591,6 +591,7 @@ where
// Check for invalid ancestors
if let Some(invalid) = self.find_invalid_ancestor(&payload) {
tracing::debug!(target: "engine::tree", ?invalid, "found invalid ancestor for payload");
let status = self.handle_invalid_ancestor_payload(payload, invalid)?;
return Ok(TreeOutcome::new(status));
}
@@ -599,6 +600,7 @@ where
self.metrics.block_validation.record_payload_validation(start.elapsed().as_secs_f64());
let status = if self.backfill_sync_state.is_idle() {
tracing::debug!(target: "engine::tree", "inserting payload directly");
self.try_insert_payload(payload)?
} else {
self.try_buffer_payload(payload)?
@@ -637,7 +639,7 @@ where
let parent_hash = payload.parent_hash();
let mut latest_valid_hash = None;
match self.insert_payload(payload) {
match self.insert_payload(payload.clone()) {
Ok(status) => {
let status = match status {
InsertPayloadOk::Inserted(BlockStatus::Valid) => {
@@ -659,7 +661,10 @@ where
Ok(PayloadStatus::new(status, latest_valid_hash))
}
Err(error) => match error {
InsertPayloadError::Block(error) => Ok(self.on_insert_block_error(error)?),
InsertPayloadError::Block(error) => {
tracing::debug!("payload in new payload l 617 {:?}", payload);
Ok(self.on_insert_block_error(error)?)
}
InsertPayloadError::Payload(error) => {
Ok(self.on_new_payload_error(error, num_hash, parent_hash)?)
}

View File

@@ -6,6 +6,7 @@ use alloy_primitives::{keccak256, Address, StorageKey, U256};
use reth_primitives_traits::Account;
use reth_provider::{AccountReader, ProviderError};
use reth_trie::{HashedPostState, HashedStorage};
use revm_primitives::B256;
use std::ops::Range;
/// Returns the total number of storage slots (both changed and read-only) across all accounts in
@@ -101,7 +102,7 @@ impl<'a> Iterator for BALSlotIter<'a> {
return None;
}
return Some((address, slot));
return Some((address, slot.into()));
}
// Move to next account
@@ -177,13 +178,11 @@ where
let mut storage_map = HashedStorage::new(false);
for slot_changes in &account_changes.storage_changes {
let hashed_slot = keccak256(slot_changes.slot);
let hashed_slot = keccak256(B256::from(slot_changes.slot));
// Get the last change for this slot
if let Some(last_change) = slot_changes.changes.last() {
storage_map
.storage
.insert(hashed_slot, U256::from_be_bytes(last_change.new_value.0));
storage_map.storage.insert(hashed_slot, last_change.new_value);
}
}
@@ -200,7 +199,7 @@ mod tests {
use alloy_eip7928::{
AccountChanges, BalanceChange, CodeChange, NonceChange, SlotChanges, StorageChange,
};
use alloy_primitives::{Address, Bytes, StorageKey, B256};
use alloy_primitives::{Address, Bytes, B256};
use reth_revm::test_utils::StateProviderTest;
#[test]
@@ -237,8 +236,8 @@ mod tests {
let provider = StateProviderTest::default();
let address = Address::random();
let slot = StorageKey::random();
let value = B256::random();
let slot = U256::random();
let value = U256::random();
let slot_changes = SlotChanges { slot, changes: vec![StorageChange::new(0, value)] };
@@ -258,10 +257,10 @@ mod tests {
assert!(result.storages.contains_key(&hashed_address));
let storage = result.storages.get(&hashed_address).unwrap();
let hashed_slot = keccak256(slot);
let hashed_slot = keccak256(B256::from(slot));
let stored_value = storage.storage.get(&hashed_slot).unwrap();
assert_eq!(*stored_value, U256::from_be_bytes(value.0));
assert_eq!(*stored_value, value);
}
#[test]
@@ -392,15 +391,15 @@ mod tests {
let provider = StateProviderTest::default();
let address = Address::random();
let slot = StorageKey::random();
let slot = U256::random();
// Multiple changes to the same slot - should take the last one
let slot_changes = SlotChanges {
slot,
changes: vec![
StorageChange::new(0, B256::from(U256::from(100).to_be_bytes::<32>())),
StorageChange::new(1, B256::from(U256::from(200).to_be_bytes::<32>())),
StorageChange::new(2, B256::from(U256::from(300).to_be_bytes::<32>())),
StorageChange::new(0, U256::from(100)),
StorageChange::new(1, U256::from(200)),
StorageChange::new(2, U256::from(300)),
],
};
@@ -418,7 +417,7 @@ mod tests {
let hashed_address = keccak256(address);
let storage = result.storages.get(&hashed_address).unwrap();
let hashed_slot = keccak256(slot);
let hashed_slot = keccak256(B256::from(slot));
let stored_value = storage.storage.get(&hashed_slot).unwrap();
@@ -438,15 +437,15 @@ mod tests {
address: addr1,
storage_changes: vec![
SlotChanges {
slot: StorageKey::from(U256::from(100)),
changes: vec![StorageChange::new(0, B256::ZERO)],
slot: U256::from(100),
changes: vec![StorageChange::new(0, U256::ZERO)],
},
SlotChanges {
slot: StorageKey::from(U256::from(101)),
changes: vec![StorageChange::new(0, B256::ZERO)],
slot: U256::from(101),
changes: vec![StorageChange::new(0, U256::ZERO)],
},
],
storage_reads: vec![StorageKey::from(U256::from(102))],
storage_reads: vec![U256::from(102)],
balance_changes: vec![],
nonce_changes: vec![],
code_changes: vec![],
@@ -456,10 +455,10 @@ mod tests {
let account2 = AccountChanges {
address: addr2,
storage_changes: vec![SlotChanges {
slot: StorageKey::from(U256::from(200)),
changes: vec![StorageChange::new(0, B256::ZERO)],
slot: U256::from(200),
changes: vec![StorageChange::new(0, U256::ZERO)],
}],
storage_reads: vec![StorageKey::from(U256::from(201))],
storage_reads: vec![U256::from(201)],
balance_changes: vec![],
nonce_changes: vec![],
code_changes: vec![],
@@ -470,15 +469,15 @@ mod tests {
address: addr3,
storage_changes: vec![
SlotChanges {
slot: StorageKey::from(U256::from(300)),
changes: vec![StorageChange::new(0, B256::ZERO)],
slot: U256::from(300),
changes: vec![StorageChange::new(0, U256::ZERO)],
},
SlotChanges {
slot: StorageKey::from(U256::from(301)),
changes: vec![StorageChange::new(0, B256::ZERO)],
slot: U256::from(301),
changes: vec![StorageChange::new(0, U256::ZERO)],
},
],
storage_reads: vec![StorageKey::from(U256::from(302))],
storage_reads: vec![U256::from(302)],
balance_changes: vec![],
nonce_changes: vec![],
code_changes: vec![],

View File

@@ -1058,10 +1058,12 @@ mod tests {
nonce: rng.random::<u64>(),
code_hash: KECCAK_EMPTY,
code: Some(Default::default()),
account_id: None,
},
storage,
status: AccountStatus::Touched,
transaction_id: 0,
..Default::default()
};
state_update.insert(address, account);

View File

@@ -1323,9 +1323,74 @@ mod tests {
use reth_trie::MultiProof;
use reth_trie_parallel::proof_task::{ProofTaskCtx, ProofWorkerHandle};
use revm_primitives::{B256, U256};
use std::sync::{Arc, OnceLock};
use std::{
mem,
sync::{Arc, OnceLock},
};
use tokio::runtime::{Handle, Runtime};
/// Maximum number of targets to batch together for state update batching.
const STATE_UPDATE_MAX_BATCH_TARGETS: usize = 64;
/// Checks whether two `Source` values refer to the same origin.
fn same_source(lhs: Source, rhs: Source) -> bool {
match (lhs, rhs) {
(Source::Evm(a), Source::Evm(b)) => same_state_change_source(a, b),
(Source::BlockAccessList, Source::BlockAccessList) => true,
_ => false,
}
}
/// Checks whether two state change sources refer to the same origin.
fn same_state_change_source(lhs: StateChangeSource, rhs: StateChangeSource) -> bool {
match (lhs, rhs) {
(StateChangeSource::Transaction(a), StateChangeSource::Transaction(b)) => a == b,
(StateChangeSource::PreBlock(a), StateChangeSource::PreBlock(b)) => {
mem::discriminant(&a) == mem::discriminant(&b)
}
(StateChangeSource::PostBlock(a), StateChangeSource::PostBlock(b)) => {
mem::discriminant(&a) == mem::discriminant(&b)
}
_ => false,
}
}
/// Determines if a state update can be batched with the current batch.
fn can_batch_state_update(
batch_source: Source,
batch_update: &EvmState,
next_source: Source,
next_update: &EvmState,
) -> bool {
if !same_source(batch_source, next_source) {
return false;
}
match (batch_source, next_source) {
(
Source::Evm(StateChangeSource::PreBlock(_)),
Source::Evm(StateChangeSource::PreBlock(_)),
) |
(
Source::Evm(StateChangeSource::PostBlock(_)),
Source::Evm(StateChangeSource::PostBlock(_)),
) => batch_update == next_update,
_ => true,
}
}
/// Estimates target count from `EvmState` for batching decisions.
fn estimate_evm_state_targets(state: &EvmState) -> usize {
state
.values()
.filter(|account| account.is_touched())
.map(|account| {
let changed_slots = account.storage.iter().filter(|(_, v)| v.is_changed()).count();
1 + changed_slots
})
.sum()
}
/// Get a handle to the test runtime, creating it if necessary
fn get_test_runtime_handle() -> Handle {
static TEST_RT: OnceLock<Runtime> = OnceLock::new();
@@ -1775,6 +1840,328 @@ mod tests {
assert_eq!(proofs_requested, 1);
}
/// Verifies that consecutive state update messages from the same source are batched together.
#[test]
fn test_state_update_batching() {
use alloy_evm::block::StateChangeSource;
use revm_state::Account;
let test_provider_factory = create_test_provider_factory();
let mut task = create_test_state_root_task(test_provider_factory);
// create multiple state updates
let addr1 = alloy_primitives::Address::random();
let addr2 = alloy_primitives::Address::random();
let mut update1 = EvmState::default();
update1.insert(
addr1,
Account {
info: revm_state::AccountInfo {
balance: U256::from(100),
nonce: 1,
code_hash: Default::default(),
code: Default::default(),
account_id: Some(0),
},
original_info: Default::default(),
transaction_id: Default::default(),
storage: Default::default(),
status: revm_state::AccountStatus::Touched,
},
);
let mut update2 = EvmState::default();
update2.insert(
addr2,
Account {
info: revm_state::AccountInfo {
balance: U256::from(200),
nonce: 2,
code_hash: Default::default(),
code: Default::default(),
account_id: Some(0),
},
original_info: Default::default(),
transaction_id: Default::default(),
storage: Default::default(),
status: revm_state::AccountStatus::Touched,
},
);
let source = StateChangeSource::Transaction(0);
let tx = task.tx.clone();
tx.send(MultiProofMessage::StateUpdate(source.into(), update1.clone())).unwrap();
tx.send(MultiProofMessage::StateUpdate(source.into(), update2.clone())).unwrap();
let proofs_requested =
if let Ok(MultiProofMessage::StateUpdate(_src, update)) = task.rx.recv() {
let mut merged_update = update;
let mut num_batched = 1;
while let Ok(MultiProofMessage::StateUpdate(_next_source, next_update)) =
task.rx.try_recv()
{
merged_update.extend(next_update);
num_batched += 1;
}
assert_eq!(num_batched, 2);
assert_eq!(merged_update.len(), 2);
assert!(merged_update.contains_key(&addr1));
assert!(merged_update.contains_key(&addr2));
task.on_state_update(source.into(), merged_update)
} else {
panic!("Expected StateUpdate message");
};
assert_eq!(proofs_requested, 1);
}
/// Verifies that state updates from different sources are not batched together.
#[test]
fn test_state_update_batching_separates_sources() {
use alloy_evm::block::StateChangeSource;
use revm_state::Account;
let test_provider_factory = create_test_provider_factory();
let task = create_test_state_root_task(test_provider_factory);
let addr_a1 = alloy_primitives::Address::random();
let addr_b1 = alloy_primitives::Address::random();
let addr_a2 = alloy_primitives::Address::random();
let create_state_update = |addr: alloy_primitives::Address, balance: u64| {
let mut state = EvmState::default();
state.insert(
addr,
Account {
info: revm_state::AccountInfo {
balance: U256::from(balance),
nonce: 1,
code_hash: Default::default(),
code: Default::default(),
account_id: Some(0),
},
original_info: Default::default(),
transaction_id: Default::default(),
storage: Default::default(),
status: revm_state::AccountStatus::Touched,
},
);
state
};
let source_a = StateChangeSource::Transaction(1);
let source_b = StateChangeSource::Transaction(2);
// Queue: A1 (immediate dispatch), B1 (batched), A2 (should become pending)
let tx = task.tx.clone();
tx.send(MultiProofMessage::StateUpdate(source_a.into(), create_state_update(addr_a1, 100)))
.unwrap();
tx.send(MultiProofMessage::StateUpdate(source_b.into(), create_state_update(addr_b1, 200)))
.unwrap();
tx.send(MultiProofMessage::StateUpdate(source_a.into(), create_state_update(addr_a2, 300)))
.unwrap();
let mut pending_msg: Option<MultiProofMessage> = None;
if let Ok(MultiProofMessage::StateUpdate(first_source, _)) = task.rx.recv() {
assert!(same_source(first_source, source_a.into()));
// Simulate batching loop for remaining messages
let mut accumulated_updates: Vec<(Source, EvmState)> = Vec::new();
let mut accumulated_targets = 0usize;
loop {
if accumulated_targets >= STATE_UPDATE_MAX_BATCH_TARGETS {
break;
}
match task.rx.try_recv() {
Ok(MultiProofMessage::StateUpdate(next_source, next_update)) => {
if let Some((batch_source, batch_update)) = accumulated_updates.first() &&
!can_batch_state_update(
*batch_source,
batch_update,
next_source,
&next_update,
)
{
pending_msg =
Some(MultiProofMessage::StateUpdate(next_source, next_update));
break;
}
let next_estimate = estimate_evm_state_targets(&next_update);
if next_estimate > STATE_UPDATE_MAX_BATCH_TARGETS {
pending_msg =
Some(MultiProofMessage::StateUpdate(next_source, next_update));
break;
}
if accumulated_targets + next_estimate > STATE_UPDATE_MAX_BATCH_TARGETS &&
!accumulated_updates.is_empty()
{
pending_msg =
Some(MultiProofMessage::StateUpdate(next_source, next_update));
break;
}
accumulated_targets += next_estimate;
accumulated_updates.push((next_source, next_update));
}
Ok(other_msg) => {
pending_msg = Some(other_msg);
break;
}
Err(_) => break,
}
}
assert_eq!(accumulated_updates.len(), 1, "Should only batch matching sources");
let batch_source = accumulated_updates[0].0;
assert!(same_source(batch_source, source_b.into()));
let batch_source = accumulated_updates[0].0;
let mut merged_update = accumulated_updates.remove(0).1;
for (_, next_update) in accumulated_updates {
merged_update.extend(next_update);
}
assert!(same_source(batch_source, source_b.into()), "Batch should use matching source");
assert!(merged_update.contains_key(&addr_b1));
assert!(!merged_update.contains_key(&addr_a1));
assert!(!merged_update.contains_key(&addr_a2));
} else {
panic!("Expected first StateUpdate");
}
match pending_msg {
Some(MultiProofMessage::StateUpdate(pending_source, pending_update)) => {
assert!(same_source(pending_source, source_a.into()));
assert!(pending_update.contains_key(&addr_a2));
}
other => panic!("Expected pending StateUpdate with source_a, got {:?}", other),
}
}
/// Verifies that pre-block updates only batch when their payloads are identical.
#[test]
fn test_pre_block_updates_require_payload_match_to_batch() {
use alloy_evm::block::{StateChangePreBlockSource, StateChangeSource};
use revm_state::Account;
let test_provider_factory = create_test_provider_factory();
let task = create_test_state_root_task(test_provider_factory);
let addr1 = alloy_primitives::Address::random();
let addr2 = alloy_primitives::Address::random();
let addr3 = alloy_primitives::Address::random();
let create_state_update = |addr: alloy_primitives::Address, balance: u64| {
let mut state = EvmState::default();
state.insert(
addr,
Account {
info: revm_state::AccountInfo {
balance: U256::from(balance),
nonce: 1,
code_hash: Default::default(),
code: Default::default(),
account_id: Some(0),
},
original_info: Default::default(),
transaction_id: Default::default(),
storage: Default::default(),
status: revm_state::AccountStatus::Touched,
},
);
state
};
let source = StateChangeSource::PreBlock(StateChangePreBlockSource::BeaconRootContract);
// Queue: first update dispatched immediately, next two should not merge
let tx = task.tx.clone();
tx.send(MultiProofMessage::StateUpdate(source.into(), create_state_update(addr1, 100)))
.unwrap();
tx.send(MultiProofMessage::StateUpdate(source.into(), create_state_update(addr2, 200)))
.unwrap();
tx.send(MultiProofMessage::StateUpdate(source.into(), create_state_update(addr3, 300)))
.unwrap();
let mut pending_msg: Option<MultiProofMessage> = None;
if let Ok(MultiProofMessage::StateUpdate(first_source, first_update)) = task.rx.recv() {
assert!(same_source(first_source, source.into()));
assert!(first_update.contains_key(&addr1));
let mut accumulated_updates: Vec<(Source, EvmState)> = Vec::new();
let mut accumulated_targets = 0usize;
loop {
if accumulated_targets >= STATE_UPDATE_MAX_BATCH_TARGETS {
break;
}
match task.rx.try_recv() {
Ok(MultiProofMessage::StateUpdate(next_source, next_update)) => {
if let Some((batch_source, batch_update)) = accumulated_updates.first() &&
!can_batch_state_update(
*batch_source,
batch_update,
next_source,
&next_update,
)
{
pending_msg =
Some(MultiProofMessage::StateUpdate(next_source, next_update));
break;
}
let next_estimate = estimate_evm_state_targets(&next_update);
if next_estimate > STATE_UPDATE_MAX_BATCH_TARGETS {
pending_msg =
Some(MultiProofMessage::StateUpdate(next_source, next_update));
break;
}
if accumulated_targets + next_estimate > STATE_UPDATE_MAX_BATCH_TARGETS &&
!accumulated_updates.is_empty()
{
pending_msg =
Some(MultiProofMessage::StateUpdate(next_source, next_update));
break;
}
accumulated_targets += next_estimate;
accumulated_updates.push((next_source, next_update));
}
Ok(other_msg) => {
pending_msg = Some(other_msg);
break;
}
Err(_) => break,
}
}
assert_eq!(
accumulated_updates.len(),
1,
"Second pre-block update should not merge with a different payload"
);
let (batched_source, batched_update) = accumulated_updates.remove(0);
assert!(same_source(batched_source, source.into()));
assert!(batched_update.contains_key(&addr2));
assert!(!batched_update.contains_key(&addr3));
match pending_msg {
Some(MultiProofMessage::StateUpdate(_, pending_update)) => {
assert!(pending_update.contains_key(&addr3));
}
other => panic!("Expected pending third pre-block update, got {:?}", other),
}
} else {
panic!("Expected first StateUpdate");
}
}
/// Verifies that different message types arriving mid-batch are not lost and preserve order.
#[test]
fn test_batching_preserves_ordering_with_different_message_type() {
@@ -1810,7 +2197,9 @@ mod tests {
nonce: 1,
code_hash: Default::default(),
code: Default::default(),
account_id: Some(0),
},
original_info: Default::default(),
transaction_id: Default::default(),
storage: Default::default(),
status: revm_state::AccountStatus::Touched,
@@ -1827,7 +2216,9 @@ mod tests {
nonce: 2,
code_hash: Default::default(),
code: Default::default(),
account_id: Some(0),
},
original_info: Default::default(),
transaction_id: Default::default(),
storage: Default::default(),
status: revm_state::AccountStatus::Touched,
@@ -1929,7 +2320,9 @@ mod tests {
nonce: 1,
code_hash: Default::default(),
code: Default::default(),
account_id: Some(0),
},
original_info: Default::default(),
transaction_id: Default::default(),
storage: Default::default(),
status: revm_state::AccountStatus::Touched,
@@ -1976,7 +2369,157 @@ mod tests {
assert_eq!(targets.len(), 1);
assert!(targets.contains_key(&prefetch_addr2));
}
other => panic!("Expected PrefetchProofs2 in channel, got {:?}", other),
other => panic!("Expected remaining PrefetchProofs2 in pending_msg, got {:?}", other),
}
}
/// Verifies that pending messages from a previous batch drain get full batching treatment.
#[test]
fn test_pending_messages_get_full_batching_treatment() {
// Queue: [Prefetch1, State1, State2, State3, Prefetch2]
//
// Expected behavior:
// 1. recv() → Prefetch1
// 2. try_recv() → State1 is different type → pending = State1, break
// 3. Process Prefetch1
// 4. Next iteration: pending = State1 → process with batching
// 5. try_recv() → State2 same type → merge
// 6. try_recv() → State3 same type → merge
// 7. try_recv() → Prefetch2 different type → pending = Prefetch2, break
// 8. Process merged State (1+2+3)
//
// Without the state-machine fix, State1 would be processed alone (no batching).
use alloy_evm::block::StateChangeSource;
use revm_state::Account;
let test_provider_factory = create_test_provider_factory();
let task = create_test_state_root_task(test_provider_factory);
let prefetch_addr1 = B256::random();
let prefetch_addr2 = B256::random();
let state_addr1 = alloy_primitives::Address::random();
let state_addr2 = alloy_primitives::Address::random();
let state_addr3 = alloy_primitives::Address::random();
// Create Prefetch targets
let mut prefetch1 = MultiProofTargets::default();
prefetch1.insert(prefetch_addr1, HashSet::default());
let mut prefetch2 = MultiProofTargets::default();
prefetch2.insert(prefetch_addr2, HashSet::default());
// Create StateUpdates
let create_state_update = |addr: alloy_primitives::Address, balance: u64| {
let mut state = EvmState::default();
state.insert(
addr,
Account {
info: revm_state::AccountInfo {
balance: U256::from(balance),
nonce: 1,
code_hash: Default::default(),
code: Default::default(),
account_id: Some(0),
},
original_info: Default::default(),
transaction_id: Default::default(),
storage: Default::default(),
status: revm_state::AccountStatus::Touched,
},
);
state
};
let source = StateChangeSource::Transaction(42);
// Queue: [Prefetch1, State1, State2, State3, Prefetch2]
let tx = task.tx.clone();
tx.send(MultiProofMessage::PrefetchProofs(prefetch1.clone())).unwrap();
tx.send(MultiProofMessage::StateUpdate(
source.into(),
create_state_update(state_addr1, 100),
))
.unwrap();
tx.send(MultiProofMessage::StateUpdate(
source.into(),
create_state_update(state_addr2, 200),
))
.unwrap();
tx.send(MultiProofMessage::StateUpdate(
source.into(),
create_state_update(state_addr3, 300),
))
.unwrap();
tx.send(MultiProofMessage::PrefetchProofs(prefetch2.clone())).unwrap();
// Simulate the state-machine loop behavior
let mut pending_msg: Option<MultiProofMessage> = None;
// First iteration: recv() gets Prefetch1, drains until State1
if let Ok(MultiProofMessage::PrefetchProofs(targets)) = task.rx.recv() {
let mut merged_targets = targets;
loop {
match task.rx.try_recv() {
Ok(MultiProofMessage::PrefetchProofs(next_targets)) => {
merged_targets.extend(next_targets);
}
Ok(other_msg) => {
pending_msg = Some(other_msg);
break;
}
Err(_) => break,
}
}
// Should have only Prefetch1 (State1 is different type)
assert_eq!(merged_targets.len(), 1);
assert!(merged_targets.contains_key(&prefetch_addr1));
} else {
panic!("Expected PrefetchProofs");
}
// Pending should be State1
assert!(matches!(pending_msg, Some(MultiProofMessage::StateUpdate(_, _))));
// Second iteration: process pending State1 WITH BATCHING
// This is the key test - the pending message should drain State2 and State3
if let Some(MultiProofMessage::StateUpdate(_src, first_update)) = pending_msg.take() {
let mut merged_update = first_update;
let mut num_batched = 1;
loop {
match task.rx.try_recv() {
Ok(MultiProofMessage::StateUpdate(_src, next_update)) => {
merged_update.extend(next_update);
num_batched += 1;
}
Ok(other_msg) => {
pending_msg = Some(other_msg);
break;
}
Err(_) => break,
}
}
// THE KEY ASSERTION: pending State1 should have batched with State2 and State3
assert_eq!(
num_batched, 3,
"Pending message should get full batching treatment and merge all 3 StateUpdates"
);
assert_eq!(merged_update.len(), 3, "Should have all 3 addresses in merged update");
assert!(merged_update.contains_key(&state_addr1));
assert!(merged_update.contains_key(&state_addr2));
assert!(merged_update.contains_key(&state_addr3));
} else {
panic!("Expected pending StateUpdate");
}
// Pending should now be Prefetch2
match pending_msg {
Some(MultiProofMessage::PrefetchProofs(targets)) => {
assert_eq!(targets.len(), 1);
assert!(targets.contains_key(&prefetch_addr2));
}
_ => panic!("Prefetch2 was lost!"),
}
}

View File

@@ -624,12 +624,14 @@ where
Evm: ConfigureEngineEvm<T::ExecutionData, Primitives = N>,
{
debug!(target: "engine::tree::payload_validator", "Executing block");
let mut db = State::builder()
.with_database(StateProviderDatabase::new(state_provider))
.with_bundle_update()
.with_bal_builder() //TODO
.without_state_clear()
.build();
db.bal_state.bal_index = 0;
db.bal_state.bal_builder = Some(revm::state::bal::Bal::new());
let spec_id = *env.evm_env.spec_id();
let evm = self.evm_config.evm_with_env(&mut db, env.evm_env);

View File

@@ -233,9 +233,9 @@ mod tests {
let dyn_precompile: DynPrecompile = (|_input: PrecompileInput<'_>| -> PrecompileResult {
Ok(PrecompileOutput {
gas_used: 0,
gas_refunded: 0,
bytes: Bytes::default(),
reverted: false,
gas_refunded: 0,
})
})
.into();
@@ -245,9 +245,9 @@ mod tests {
let output = PrecompileOutput {
gas_used: 50,
gas_refunded: 0,
bytes: alloy_primitives::Bytes::copy_from_slice(b"cached_result"),
reverted: false,
gas_refunded: 0,
};
let input = b"test_input";
@@ -277,9 +277,9 @@ mod tests {
Ok(PrecompileOutput {
gas_used: 5000,
gas_refunded: 0,
bytes: alloy_primitives::Bytes::copy_from_slice(b"output_from_precompile_1"),
reverted: false,
gas_refunded: 0,
})
}
})
@@ -292,9 +292,9 @@ mod tests {
Ok(PrecompileOutput {
gas_used: 7000,
gas_refunded: 0,
bytes: alloy_primitives::Bytes::copy_from_slice(b"output_from_precompile_2"),
reverted: false,
gas_refunded: 0,
})
}
})

View File

@@ -27,6 +27,9 @@ reth-payload-primitives.workspace = true
alloy-rpc-types-engine.workspace = true
alloy-consensus.workspace = true
# revm
revm.workspace = true
# async
tokio = { workspace = true, default-features = false }
tokio-util.workspace = true

View File

@@ -283,8 +283,12 @@ where
let mut state = State::builder()
.with_database_ref(StateProviderDatabase::new(&state_provider))
.with_bundle_update()
.with_bal_builder()
.build();
state.bal_state.bal_index = 0;
state.bal_state.bal_builder = Some(revm::state::bal::Bal::new());
let ctx = evm_config.context_for_block(&reorg_target).map_err(RethError::other)?;
let evm = evm_config.evm_for_block(&mut state, &reorg_target).map_err(RethError::other)?;
let mut builder = evm_config.create_block_builder(evm, &reorg_target_parent, ctx);

View File

@@ -39,6 +39,7 @@
//! transactions: vec![Bytes::from(vec![1, 2, 3])],
//! ommers: vec![],
//! withdrawals: None,
//! block_access_list: None,
//! };
//! // Compress the body: rlp encoding and snappy compression
//! let compressed_body = CompressedBody::from_body(&body)?;
@@ -581,8 +582,12 @@ mod tests {
#[test]
fn test_block_body_conversion() {
let block_body: BlockBody<Bytes> =
BlockBody { transactions: vec![], ommers: vec![], withdrawals: None };
let block_body: BlockBody<Bytes> = BlockBody {
transactions: vec![],
ommers: vec![],
withdrawals: None,
block_access_list: None,
};
let compressed_body = CompressedBody::from_body(&block_body).unwrap();
@@ -637,7 +642,8 @@ mod tests {
let withdrawals = Some(Withdrawals(vec![]));
let block_body = BlockBody { transactions, ommers: vec![], withdrawals };
let block_body =
BlockBody { transactions, ommers: vec![], withdrawals, block_access_list: None };
let block = Block::new(header, block_body);

View File

@@ -34,6 +34,7 @@ pub(crate) fn create_header() -> Header {
excess_blob_gas: None,
parent_beacon_block_root: None,
requests_hash: None,
block_access_list_hash: None,
}
}
@@ -138,6 +139,7 @@ pub(crate) fn create_test_block_with_compressed_data(number: BlockNumber) -> Blo
excess_blob_gas: None,
parent_beacon_block_root: None,
requests_hash: None,
block_access_list_hash: None,
};
// Create test body
@@ -145,6 +147,7 @@ pub(crate) fn create_test_block_with_compressed_data(number: BlockNumber) -> Blo
transactions: vec![Bytes::from(vec![(number % 256) as u8; 10])],
ommers: vec![],
withdrawals: Some(Withdrawals(vec![])),
block_access_list: None,
};
// Create test receipt list with bloom

View File

@@ -22,6 +22,7 @@ reth-consensus.workspace = true
alloy-eips.workspace = true
alloy-primitives.workspace = true
alloy-consensus.workspace = true
alloy-rlp.workspace = true
tracing.workspace = true
@@ -38,6 +39,7 @@ std = [
"reth-execution-types/std",
"reth-primitives-traits/std",
"tracing/std",
"alloy-rlp/std",
]
[dev-dependencies]

View File

@@ -75,7 +75,13 @@ where
block: &RecoveredBlock<N::Block>,
result: &BlockExecutionResult<N::Receipt>,
) -> Result<(), ConsensusError> {
validate_block_post_execution(block, &self.chain_spec, &result.receipts, &result.requests)
validate_block_post_execution(
block,
&self.chain_spec,
&result.receipts,
&result.requests,
&result.block_access_list,
)
}
}
@@ -174,6 +180,15 @@ where
} else if header.requests_hash().is_some() {
return Err(ConsensusError::RequestsHashUnexpected)
}
// if self.chain_spec.is_amsterdam_active_at_timestamp(header.timestamp()) &&
// header.block_access_list_hash().is_none()
// {
// return Err(ConsensusError::BlockAccessListHashMissing)
// } else if !self.chain_spec.is_amsterdam_active_at_timestamp(header.timestamp()) &&
// header.block_access_list_hash().is_some()
// {
// return Err(ConsensusError::BlockAccessListHashUnexpected)
// }
Ok(())
}

View File

@@ -1,11 +1,11 @@
use alloc::vec::Vec;
use alloy_consensus::{proofs::calculate_receipt_root, BlockHeader, TxReceipt};
use alloy_eips::{eip7685::Requests, Encodable2718};
use alloy_eips::{eip7685::Requests, eip7928::BlockAccessList, Encodable2718};
use alloy_primitives::{Bloom, Bytes, B256};
use reth_chainspec::EthereumHardforks;
use reth_consensus::ConsensusError;
use reth_primitives_traits::{
receipt::gas_spent_by_transactions, Block, GotExpected, Receipt, RecoveredBlock,
receipt::gas_spent_by_transactions, Block, BlockBody, GotExpected, Receipt, RecoveredBlock,
};
/// Validate a block with regard to execution results:
@@ -17,6 +17,7 @@ pub fn validate_block_post_execution<B, R, ChainSpec>(
chain_spec: &ChainSpec,
receipts: &[R],
requests: &Requests,
block_access_list: &Option<BlockAccessList>,
) -> Result<(), ConsensusError>
where
B: Block,
@@ -65,6 +66,33 @@ where
}
}
// Validate bal hash matches the calculated hash
if chain_spec.is_amsterdam_active_at_timestamp(block.header().timestamp()) {
let Some(header_block_access_list_hash) = block.header().block_access_list_hash() else {
return Err(ConsensusError::BlockAccessListHashMissing)
};
if let Some(bal) = block_access_list {
let bal_hash = alloy_primitives::keccak256(alloy_rlp::encode(bal));
let block_bal = block.body().block_access_list();
tracing::debug!("Block Bal :{:?}", block_bal);
if let Some(body_bal) = block_bal {
if body_bal.is_empty() {
tracing::debug!("Hit Empty BAL : Block is {:?}", block);
}
verify_bal(body_bal, bal)?;
}
if bal_hash != header_block_access_list_hash {
tracing::debug!(
?bal_hash,
?header_block_access_list_hash,
"block access list hash mismatch"
);
return Err(ConsensusError::InvalidBalHash);
}
}
}
Ok(())
}
@@ -113,6 +141,47 @@ fn compare_receipts_root_and_logs_bloom(
Ok(())
}
/// Validates that the block access list in the body matches the expected block access list.
fn verify_bal(
body_bal: &BlockAccessList,
expected_bal: &BlockAccessList,
) -> Result<(), ConsensusError> {
if body_bal == expected_bal {
return Ok(());
}
// Extract addresses
let body_addrs: Vec<_> = body_bal.iter().map(|a| a.address).collect();
let expected_addrs: Vec<_> = expected_bal.iter().map(|a| a.address).collect();
// Missing accounts (expected but not found in body)
for addr in &expected_addrs {
if !body_addrs.contains(addr) {
tracing::debug!("Missing acc : computed bal {:?},body bal{:?}", expected_bal, body_bal);
tracing::debug!("Missing Address: {:?}", addr);
return Err(ConsensusError::InvalidBalMissingAccount);
}
}
// Extra accounts (body has accounts not in expected)
for addr in &body_addrs {
if !expected_addrs.contains(addr) {
tracing::debug!("Extra acc : computed bal {:?},body bal{:?}", expected_bal, body_bal);
tracing::debug!("Extra Address: {:?}", addr);
return Err(ConsensusError::InvalidBalExtraAccount);
}
}
tracing::debug!(
?expected_bal,
?body_bal,
"block access list in body does not match the provided block access list"
);
// Fallback: mismatched access lists
Err(ConsensusError::InvalidBlockAccessList)
}
#[cfg(test)]
mod tests {
use super::*;

View File

@@ -17,7 +17,9 @@ pub use payload::{payload_id, BlobSidecars, EthBuiltPayload, EthPayloadBuilderAt
mod error;
pub use error::*;
use alloy_rpc_types_engine::{ExecutionData, ExecutionPayload, ExecutionPayloadEnvelopeV5};
use alloy_rpc_types_engine::{
ExecutionData, ExecutionPayload, ExecutionPayloadEnvelopeV5, ExecutionPayloadEnvelopeV6,
};
pub use alloy_rpc_types_engine::{
ExecutionPayloadEnvelopeV2, ExecutionPayloadEnvelopeV3, ExecutionPayloadEnvelopeV4,
ExecutionPayloadV1, PayloadAttributes as EthPayloadAttributes,
@@ -66,13 +68,15 @@ where
+ TryInto<ExecutionPayloadEnvelopeV2>
+ TryInto<ExecutionPayloadEnvelopeV3>
+ TryInto<ExecutionPayloadEnvelopeV4>
+ TryInto<ExecutionPayloadEnvelopeV5>,
+ TryInto<ExecutionPayloadEnvelopeV5>
+ TryInto<ExecutionPayloadEnvelopeV6>,
{
type ExecutionPayloadEnvelopeV1 = ExecutionPayloadV1;
type ExecutionPayloadEnvelopeV2 = ExecutionPayloadEnvelopeV2;
type ExecutionPayloadEnvelopeV3 = ExecutionPayloadEnvelopeV3;
type ExecutionPayloadEnvelopeV4 = ExecutionPayloadEnvelopeV4;
type ExecutionPayloadEnvelopeV5 = ExecutionPayloadEnvelopeV5;
type ExecutionPayloadEnvelopeV6 = ExecutionPayloadEnvelopeV6;
}
/// A default payload type for [`EthEngineTypes`]

View File

@@ -11,8 +11,9 @@ use alloy_primitives::{Address, B256, U256};
use alloy_rlp::Encodable;
use alloy_rpc_types_engine::{
BlobsBundleV1, BlobsBundleV2, ExecutionPayloadEnvelopeV2, ExecutionPayloadEnvelopeV3,
ExecutionPayloadEnvelopeV4, ExecutionPayloadEnvelopeV5, ExecutionPayloadFieldV2,
ExecutionPayloadV1, ExecutionPayloadV3, PayloadAttributes, PayloadId,
ExecutionPayloadEnvelopeV4, ExecutionPayloadEnvelopeV5, ExecutionPayloadEnvelopeV6,
ExecutionPayloadFieldV2, ExecutionPayloadV1, ExecutionPayloadV3, ExecutionPayloadV4,
PayloadAttributes, PayloadId,
};
use core::convert::Infallible;
use reth_ethereum_primitives::EthPrimitives;
@@ -160,6 +161,38 @@ impl EthBuiltPayload {
execution_requests: requests.unwrap_or_default(),
})
}
/// Try converting built payload into [`ExecutionPayloadEnvelopeV6`].
pub fn try_into_v6(self) -> Result<ExecutionPayloadEnvelopeV6, BuiltPayloadConversionError> {
let Self { block, fees, sidecars, requests, .. } = self;
let blobs_bundle = match sidecars {
BlobSidecars::Empty => BlobsBundleV2::empty(),
BlobSidecars::Eip7594(sidecars) => BlobsBundleV2::from(sidecars),
BlobSidecars::Eip4844(_) => {
return Err(BuiltPayloadConversionError::UnexpectedEip4844Sidecars)
}
};
Ok(ExecutionPayloadEnvelopeV6 {
execution_payload: ExecutionPayloadV4::from_block_unchecked(
block.hash(),
&Arc::unwrap_or_clone(block).into_block(),
),
block_value: fees,
// From the engine API spec:
//
// > Client software **MAY** use any heuristics to decide whether to set
// `shouldOverrideBuilder` flag or not. If client software does not implement any
// heuristic this flag **SHOULD** be set to `false`.
//
// Spec:
// <https://github.com/ethereum/execution-apis/blob/fe8e13c288c592ec154ce25c534e26cb7ce0530d/src/engine/cancun.md#specification-2>
should_override_builder: false,
blobs_bundle,
execution_requests: requests.unwrap_or_default(),
})
}
}
impl<N: NodePrimitives> BuiltPayload for EthBuiltPayload<N> {
@@ -227,6 +260,14 @@ impl TryFrom<EthBuiltPayload> for ExecutionPayloadEnvelopeV5 {
}
}
impl TryFrom<EthBuiltPayload> for ExecutionPayloadEnvelopeV6 {
type Error = BuiltPayloadConversionError;
fn try_from(value: EthBuiltPayload) -> Result<Self, Self::Error> {
value.try_into_v6()
}
}
/// An enum representing blob transaction sidecars belonging to [`EthBuiltPayload`].
#[derive(Clone, Default, Debug)]
pub enum BlobSidecars {
@@ -462,6 +503,7 @@ mod tests {
.unwrap(),
withdrawals: None,
parent_beacon_block_root: None,
slot_number: None,
};
// Verify that the generated payload ID matches the expected value
@@ -499,6 +541,7 @@ mod tests {
},
]),
parent_beacon_block_root: None,
slot_number: None,
};
// Verify that the generated payload ID matches the expected value
@@ -531,6 +574,7 @@ mod tests {
)
.unwrap(),
),
slot_number: None,
};
// Verify that the generated payload ID matches the expected value

View File

@@ -27,6 +27,7 @@ alloy-eips.workspace = true
alloy-evm.workspace = true
alloy-consensus.workspace = true
alloy-rpc-types-engine.workspace = true
alloy-rlp.workspace = true
# Misc
parking_lot = { workspace = true, optional = true }
@@ -57,6 +58,7 @@ std = [
"derive_more?/std",
"alloy-rpc-types-engine/std",
"reth-storage-errors/std",
"alloy-rlp/std",
]
test-utils = [
"dep:parking_lot",

View File

@@ -45,7 +45,8 @@ where
execution_ctx: ctx,
parent,
transactions,
output: BlockExecutionResult { receipts, requests, gas_used, blob_gas_used },
output:
BlockExecutionResult { receipts, requests, gas_used, blob_gas_used, block_access_list },
state_root,
..
} = input;
@@ -90,6 +91,18 @@ where
};
}
let (built_block_access_list, block_access_list_hash) =
if self.chain_spec.is_amsterdam_active_at_timestamp(timestamp) {
if let Some(bal) = block_access_list {
let hash = alloy_primitives::keccak256(alloy_rlp::encode(bal));
(Some(bal), Some(hash))
} else {
(None, None)
}
} else {
(None, None)
};
let header = Header {
parent_hash: ctx.parent_hash,
ommers_hash: EMPTY_OMMER_ROOT_HASH,
@@ -112,11 +125,17 @@ where
blob_gas_used: block_blob_gas_used,
excess_blob_gas,
requests_hash,
block_access_list_hash,
};
Ok(Block {
header,
body: BlockBody { transactions, ommers: Default::default(), withdrawals },
body: BlockBody {
transactions,
ommers: Default::default(),
withdrawals,
block_access_list: built_block_access_list.cloned(),
},
})
}
}

View File

@@ -238,8 +238,9 @@ where
revm_spec_by_timestamp_and_block_number(self.chain_spec(), timestamp, block_number);
// configure evm env based on parent block
let mut cfg_env =
CfgEnv::new().with_chain_id(self.chain_spec().chain().id()).with_spec(spec);
let mut cfg_env = CfgEnv::new()
.with_chain_id(self.chain_spec().chain().id())
.with_spec_and_mainnet_gas_params(spec);
if let Some(blob_params) = &blob_params {
cfg_env.set_max_blobs_per_tx(blob_params.max_blobs_per_tx);
@@ -407,7 +408,7 @@ mod tests {
let db = CacheDB::<EmptyDBTyped<ProviderError>>::default();
let evm_env = EvmEnv {
cfg_env: CfgEnv::new().with_spec(SpecId::CONSTANTINOPLE),
cfg_env: CfgEnv::new().with_spec_and_mainnet_gas_params(SpecId::CONSTANTINOPLE),
..Default::default()
};
@@ -474,7 +475,7 @@ mod tests {
let db = CacheDB::<EmptyDBTyped<ProviderError>>::default();
let evm_env = EvmEnv {
cfg_env: CfgEnv::new().with_spec(SpecId::CONSTANTINOPLE),
cfg_env: CfgEnv::new().with_spec_and_mainnet_gas_params(SpecId::CONSTANTINOPLE),
..Default::default()
};

View File

@@ -2,7 +2,7 @@ use crate::EthEvmConfig;
use alloc::{boxed::Box, sync::Arc, vec, vec::Vec};
use alloy_consensus::Header;
use alloy_eips::eip7685::Requests;
use alloy_evm::precompiles::PrecompilesMap;
use alloy_evm::{block::StateDB, precompiles::PrecompilesMap};
use alloy_primitives::Bytes;
use alloy_rpc_types_engine::ExecutionData;
use parking_lot::Mutex;
@@ -19,7 +19,6 @@ use reth_execution_types::{BlockExecutionResult, ExecutionOutcome};
use reth_primitives_traits::{BlockTy, SealedBlock, SealedHeader};
use revm::{
context::result::{ExecutionResult, Output, ResultAndState, SuccessReason},
database::State,
Inspector,
};
@@ -58,12 +57,12 @@ impl BlockExecutorFactory for MockEvmConfig {
fn create_executor<'a, DB, I>(
&'a self,
evm: EthEvm<&'a mut State<DB>, I, PrecompilesMap>,
evm: EthEvm<DB, I, PrecompilesMap>,
_ctx: Self::ExecutionCtx<'a>,
) -> impl BlockExecutorFor<'a, Self, DB, I>
where
DB: Database + 'a,
I: Inspector<<Self::EvmFactory as EvmFactory>::Context<&'a mut State<DB>>> + 'a,
DB: StateDB + Database + 'a,
I: Inspector<<Self::EvmFactory as EvmFactory>::Context<DB>> + 'a,
{
MockExecutor { result: self.exec_results.lock().pop().unwrap(), evm, hook: None }
}
@@ -71,17 +70,17 @@ impl BlockExecutorFactory for MockEvmConfig {
/// Mock executor that returns a fixed execution result.
#[derive(derive_more::Debug)]
pub struct MockExecutor<'a, DB: Database, I> {
pub struct MockExecutor<DB: Database, I> {
result: ExecutionOutcome,
evm: EthEvm<&'a mut State<DB>, I, PrecompilesMap>,
evm: EthEvm<DB, I, PrecompilesMap>,
#[debug(skip)]
hook: Option<Box<dyn reth_evm::OnStateHook>>,
}
impl<'a, DB: Database, I: Inspector<EthEvmContext<&'a mut State<DB>>>> BlockExecutor
for MockExecutor<'a, DB, I>
impl<DB: StateDB + Database, I: Inspector<EthEvmContext<DB>>> BlockExecutor
for MockExecutor<DB, I>
{
type Evm = EthEvm<&'a mut State<DB>, I, PrecompilesMap>;
type Evm = EthEvm<DB, I, PrecompilesMap>;
type Transaction = TransactionSigned;
type Receipt = Receipt;
@@ -125,10 +124,11 @@ impl<'a, DB: Database, I: Inspector<EthEvmContext<&'a mut State<DB>>>> BlockExec
reqs
}),
gas_used: 0,
block_access_list: None,
blob_gas_used: 0,
};
evm.db_mut().bundle_state = bundle;
*evm.db_mut().bundle_state_mut() = bundle;
Ok((evm, result))
}

View File

@@ -38,6 +38,7 @@ fn create_database_with_beacon_root_contract() -> CacheDB<EmptyDB> {
code_hash: keccak256(BEACON_ROOTS_CODE.clone()),
nonce: 1,
code: Some(Bytecode::new_raw(BEACON_ROOTS_CODE.clone())),
account_id: None,
};
db.insert_account_info(BEACON_ROOTS_ADDRESS, beacon_root_contract_account);
@@ -53,6 +54,7 @@ fn create_database_with_withdrawal_requests_contract() -> CacheDB<EmptyDB> {
balance: U256::ZERO,
code_hash: keccak256(WITHDRAWAL_REQUEST_PREDEPLOY_CODE.clone()),
code: Some(Bytecode::new_raw(WITHDRAWAL_REQUEST_PREDEPLOY_CODE.clone())),
account_id: None,
};
db.insert_account_info(
@@ -86,7 +88,12 @@ fn eip_4788_non_genesis_call() {
.execute_one(&RecoveredBlock::new_unhashed(
Block {
header: header.clone(),
body: BlockBody { transactions: vec![], ommers: vec![], withdrawals: None },
body: BlockBody {
transactions: vec![],
ommers: vec![],
withdrawals: None,
block_access_list: None,
},
},
vec![],
))
@@ -105,7 +112,12 @@ fn eip_4788_non_genesis_call() {
.execute_one(&RecoveredBlock::new_unhashed(
Block {
header: header.clone(),
body: BlockBody { transactions: vec![], ommers: vec![], withdrawals: None },
body: BlockBody {
transactions: vec![],
ommers: vec![],
withdrawals: None,
block_access_list: None,
},
},
vec![],
))
@@ -165,7 +177,12 @@ fn eip_4788_no_code_cancun() {
.execute_one(&RecoveredBlock::new_unhashed(
Block {
header,
body: BlockBody { transactions: vec![], ommers: vec![], withdrawals: None },
body: BlockBody {
transactions: vec![],
ommers: vec![],
withdrawals: None,
block_access_list: None,
},
},
vec![],
))
@@ -207,7 +224,12 @@ fn eip_4788_empty_account_call() {
.execute_one(&RecoveredBlock::new_unhashed(
Block {
header,
body: BlockBody { transactions: vec![], ommers: vec![], withdrawals: None },
body: BlockBody {
transactions: vec![],
ommers: vec![],
withdrawals: None,
block_access_list: None,
},
},
vec![],
))
@@ -339,6 +361,7 @@ fn create_database_with_block_hashes(latest_block: u64) -> CacheDB<EmptyDB> {
code_hash: keccak256(HISTORY_STORAGE_CODE.clone()),
code: Some(Bytecode::new_raw(HISTORY_STORAGE_CODE.clone())),
nonce: 1,
account_id: None,
};
db.insert_account_info(HISTORY_STORAGE_ADDRESS, blockhashes_contract_account);
@@ -796,6 +819,7 @@ fn test_balance_increment_not_duplicated() {
transactions: vec![],
ommers: vec![],
withdrawals: Some(vec![withdrawal].into()),
block_access_list: None,
},
},
vec![],

View File

@@ -223,6 +223,7 @@ async fn test_testing_build_block_v1_osaka() -> eyre::Result<()> {
suggested_fee_recipient: Address::ZERO,
withdrawals: Some(vec![]),
parent_beacon_block_root: Some(B256::ZERO),
slot_number: None,
};
let request = TestingBuildBlockRequestV1 {

View File

@@ -25,6 +25,7 @@ pub(crate) fn eth_payload_attributes(timestamp: u64) -> EthPayloadBuilderAttribu
suggested_fee_recipient: Address::ZERO,
withdrawals: Some(vec![]),
parent_beacon_block_root: Some(B256::ZERO),
slot_number: None,
};
EthPayloadBuilderAttributes::new(B256::ZERO, attributes)
}

View File

@@ -56,6 +56,7 @@ async fn testing_rpc_build_block_works() -> eyre::Result<()> {
suggested_fee_recipient: Address::ZERO,
withdrawals: None,
parent_beacon_block_root: None,
slot_number: None,
};
let request = TestingBuildBlockRequestV1 {

View File

@@ -153,10 +153,14 @@ where
let PayloadConfig { parent_header, attributes } = config;
let state_provider = client.state_by_block_hash(parent_header.hash())?;
let state = StateProviderDatabase::new(state_provider.as_ref());
let mut db =
State::builder().with_database_ref(cached_reads.as_db(state)).with_bundle_update().build();
let state = StateProviderDatabase::new(&state_provider);
let mut db = State::builder()
.with_database(cached_reads.as_db_mut(state))
.with_bundle_update()
.with_bal_builder()
.build();
db.bal_state.bal_index = 0;
db.bal_state.bal_builder = Some(revm::state::bal::Bal::new());
let mut builder = evm_config
.builder_for_next_block(
&mut db,

View File

@@ -3,7 +3,7 @@
use alloy_consensus::Block;
use alloy_rpc_types_engine::{ExecutionData, PayloadError};
use reth_chainspec::EthereumHardforks;
use reth_payload_validator::{cancun, prague, shanghai};
use reth_payload_validator::{amsterdam, cancun, prague, shanghai};
use reth_primitives_traits::{Block as _, SealedBlock, SignedTransaction};
use std::sync::Arc;
@@ -103,5 +103,10 @@ where
chain_spec.is_prague_active_at_timestamp(sealed_block.timestamp),
)?;
amsterdam::ensure_well_formed_fields(
sealed_block.body(),
chain_spec.is_amsterdam_active_at_timestamp(sealed_block.timestamp),
)?;
Ok(sealed_block)
}

View File

@@ -1,12 +1,12 @@
//! Traits for execution.
use crate::{ConfigureEvm, Database, OnStateHook, TxEnvFor};
use alloc::{boxed::Box, sync::Arc, vec::Vec};
use alloc::{borrow::Cow, boxed::Box, sync::Arc, vec::Vec};
use alloy_consensus::{BlockHeader, Header};
use alloy_eips::eip2718::WithEncoded;
pub use alloy_evm::block::{BlockExecutor, BlockExecutorFactory};
use alloy_evm::{
block::{CommitChanges, ExecutableTx},
block::{CommitChanges, ExecutableTx, StateDB},
Evm, EvmEnv, EvmFactory, RecoveredTx, ToTxEnv,
};
use alloy_primitives::{Address, B256};
@@ -214,7 +214,7 @@ pub struct BlockAssemblerInput<'a, 'b, F: BlockExecutorFactory, H = Header> {
/// Output of block execution.
pub output: &'b BlockExecutionResult<F::Receipt>,
/// [`BundleState`] after the block execution.
pub bundle_state: &'a BundleState,
pub bundle_state: Cow<'a, BundleState>,
/// Provider with access to state.
#[debug(skip)]
pub state_provider: &'b dyn StateProvider,
@@ -234,7 +234,7 @@ impl<'a, 'b, F: BlockExecutorFactory, H> BlockAssemblerInput<'a, 'b, F, H> {
parent: &'a SealedHeader<H>,
transactions: Vec<F::Transaction>,
output: &'b BlockExecutionResult<F::Receipt>,
bundle_state: &'a BundleState,
bundle_state: impl Into<Cow<'a, BundleState>>,
state_provider: &'b dyn StateProvider,
state_root: B256,
) -> Self {
@@ -244,7 +244,7 @@ impl<'a, 'b, F: BlockExecutorFactory, H> BlockAssemblerInput<'a, 'b, F, H> {
parent,
transactions,
output,
bundle_state,
bundle_state: bundle_state.into(),
state_provider,
state_root,
}
@@ -461,8 +461,7 @@ where
}
}
impl<'a, F, DB, Executor, Builder, N> BlockBuilder
for BasicBlockBuilder<'a, F, Executor, Builder, N>
impl<'a, F, Executor, Builder, N> BlockBuilder for BasicBlockBuilder<'a, F, Executor, Builder, N>
where
F: BlockExecutorFactory<Transaction = N::SignedTx, Receipt = N::Receipt>,
Executor: BlockExecutor<
@@ -470,12 +469,11 @@ where
Spec = <F::EvmFactory as EvmFactory>::Spec,
HaltReason = <F::EvmFactory as EvmFactory>::HaltReason,
BlockEnv = <F::EvmFactory as EvmFactory>::BlockEnv,
DB = &'a mut State<DB>,
DB: StateDB + 'a,
>,
Transaction = N::SignedTx,
Receipt = N::Receipt,
>,
DB: Database + 'a,
Builder: BlockAssembler<F, Block = N::Block>,
N: NodePrimitives,
{
@@ -508,13 +506,13 @@ where
state: impl StateProvider,
) -> Result<BlockBuilderOutcome<N>, BlockExecutionError> {
let (evm, result) = self.executor.finish()?;
let (db, evm_env) = evm.finish();
let (mut db, evm_env) = evm.finish();
// merge all transitions into bundle state
db.merge_transitions(BundleRetention::Reverts);
// calculate the state root
let hashed_state = state.hashed_post_state(&db.bundle_state);
let hashed_state = state.hashed_post_state(db.bundle_state());
let (state_root, trie_updates) = state
.state_root_with_updates(hashed_state.clone())
.map_err(BlockExecutionError::other)?;
@@ -528,7 +526,7 @@ where
parent: self.parent,
transactions,
output: &result,
bundle_state: &db.bundle_state,
bundle_state: Cow::Owned(db.take_bundle()),
state_provider: &state,
state_root,
})?;
@@ -564,8 +562,14 @@ pub struct BasicBlockExecutor<F, DB> {
impl<F, DB: Database> BasicBlockExecutor<F, DB> {
/// Creates a new `BasicBlockExecutor` with the given strategy.
pub fn new(strategy_factory: F, db: DB) -> Self {
let db =
State::builder().with_database(db).with_bundle_update().without_state_clear().build();
let mut db = State::builder()
.with_database(db)
.with_bundle_update()
.with_bal_builder()
.without_state_clear()
.build();
db.bal_state.bal_index = 0;
db.bal_state.bal_builder = Some(revm::state::bal::Bal::new());
Self { strategy_factory, db }
}
}
@@ -741,6 +745,7 @@ mod tests {
nonce,
code_hash: KECCAK_EMPTY,
code: None,
account_id: None,
};
state.insert_account(addr, account_info);
state
@@ -777,8 +782,13 @@ mod tests {
let mut state = setup_state_with_account(addr1, 100, 1);
let account2 =
AccountInfo { balance: U256::from(200), nonce: 1, code_hash: KECCAK_EMPTY, code: None };
let account2 = AccountInfo {
balance: U256::from(200),
nonce: 1,
code_hash: KECCAK_EMPTY,
code: None,
account_id: None,
};
state.insert_account(addr2, account2);
let mut increments = HashMap::default();
@@ -799,8 +809,13 @@ mod tests {
let mut state = setup_state_with_account(addr1, 100, 1);
let account2 =
AccountInfo { balance: U256::from(200), nonce: 1, code_hash: KECCAK_EMPTY, code: None };
let account2 = AccountInfo {
balance: U256::from(200),
nonce: 1,
code_hash: KECCAK_EMPTY,
code: None,
account_id: None,
};
state.insert_account(addr2, account2);
let mut increments = HashMap::default();

View File

@@ -18,6 +18,7 @@
extern crate alloc;
use crate::execute::{BasicBlockBuilder, Executor};
use ::revm::context::TxEnv;
use alloc::vec::Vec;
use alloy_eips::{
eip2718::{EIP2930_TX_TYPE_ID, LEGACY_TX_TYPE_ID},
@@ -25,7 +26,7 @@ use alloy_eips::{
eip4895::Withdrawals,
};
use alloy_evm::{
block::{BlockExecutorFactory, BlockExecutorFor},
block::{BlockExecutorFactory, BlockExecutorFor, StateDB},
precompiles::PrecompilesMap,
};
use alloy_primitives::{Address, Bytes, B256};
@@ -35,7 +36,7 @@ use reth_execution_errors::BlockExecutionError;
use reth_primitives_traits::{
BlockTy, HeaderTy, NodePrimitives, ReceiptTy, SealedBlock, SealedHeader, TxTy,
};
use revm::{context::TxEnv, database::State};
use revm::DatabaseCommit;
pub mod either;
/// EVM environment configuration.
@@ -312,20 +313,20 @@ pub trait ConfigureEvm: Clone + Debug + Send + Sync + Unpin {
/// Creates a strategy with given EVM and execution context.
fn create_executor<'a, DB, I>(
&'a self,
evm: EvmFor<Self, &'a mut State<DB>, I>,
evm: EvmFor<Self, DB, I>,
ctx: <Self::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>,
) -> impl BlockExecutorFor<'a, Self::BlockExecutorFactory, DB, I>
where
DB: Database,
I: InspectorFor<Self, &'a mut State<DB>> + 'a,
DB: StateDB + DatabaseCommit + Database + 'a,
I: InspectorFor<Self, DB> + 'a,
{
self.block_executor_factory().create_executor(evm, ctx)
}
/// Creates a strategy for execution of a given block.
fn executor_for_block<'a, DB: Database>(
fn executor_for_block<'a, DB: StateDB + DatabaseCommit + Database + 'a>(
&'a self,
db: &'a mut State<DB>,
db: DB,
block: &'a SealedBlock<<Self::Primitives as NodePrimitives>::Block>,
) -> Result<impl BlockExecutorFor<'a, Self::BlockExecutorFactory, DB>, Self::Error> {
let evm = self.evm_for_block(db, block.header())?;
@@ -350,7 +351,7 @@ pub trait ConfigureEvm: Clone + Debug + Send + Sync + Unpin {
/// ```
fn create_block_builder<'a, DB, I>(
&'a self,
evm: EvmFor<Self, &'a mut State<DB>, I>,
evm: EvmFor<Self, DB, I>,
parent: &'a SealedHeader<HeaderTy<Self::Primitives>>,
ctx: <Self::BlockExecutorFactory as BlockExecutorFactory>::ExecutionCtx<'a>,
) -> impl BlockBuilder<
@@ -358,8 +359,8 @@ pub trait ConfigureEvm: Clone + Debug + Send + Sync + Unpin {
Executor: BlockExecutorFor<'a, Self::BlockExecutorFactory, DB, I>,
>
where
DB: Database,
I: InspectorFor<Self, &'a mut State<DB>> + 'a,
DB: StateDB + DatabaseCommit + Database + 'a,
I: InspectorFor<Self, DB> + 'a,
{
BasicBlockBuilder {
executor: self.create_executor(evm, ctx.clone()),
@@ -399,9 +400,9 @@ pub trait ConfigureEvm: Clone + Debug + Send + Sync + Unpin {
/// // Complete block building
/// let outcome = builder.finish(state_provider)?;
/// ```
fn builder_for_next_block<'a, DB: Database>(
fn builder_for_next_block<'a, DB: StateDB + DatabaseCommit + Database + 'a>(
&'a self,
db: &'a mut State<DB>,
db: DB,
parent: &'a SealedHeader<<Self::Primitives as NodePrimitives>::BlockHeader>,
attributes: Self::NextBlockEnvCtx,
) -> Result<

View File

@@ -934,10 +934,20 @@ mod tests {
let address3 = Address::random();
// Set up account info with some changes
let account_info1 =
AccountInfo { nonce: 1, balance: U256::from(100), code_hash: B256::ZERO, code: None };
let account_info2 =
AccountInfo { nonce: 2, balance: U256::from(200), code_hash: B256::ZERO, code: None };
let account_info1 = AccountInfo {
nonce: 1,
balance: U256::from(100),
code_hash: B256::ZERO,
code: None,
account_id: None,
};
let account_info2 = AccountInfo {
nonce: 2,
balance: U256::from(200),
code_hash: B256::ZERO,
code: None,
account_id: None,
};
// Set up the bundle state with these accounts
let mut bundle_state = BundleState::default();

View File

@@ -195,22 +195,22 @@ mod tests {
// wal with 1 block and tx (old 3-field format)
// <https://github.com/paradigmxyz/reth/issues/15012>
#[test]
fn decode_notification_wal() {
let wal = include_bytes!("../../test-data/28.wal");
let notification: reth_exex_types::serde_bincode_compat::ExExNotification<
'_,
reth_ethereum_primitives::EthPrimitives,
> = rmp_serde::decode::from_slice(wal.as_slice()).unwrap();
let notification: ExExNotification = notification.into();
match notification {
ExExNotification::ChainCommitted { new } => {
assert_eq!(new.blocks().len(), 1);
assert_eq!(new.tip().transaction_count(), 1);
}
_ => panic!("unexpected notification"),
}
}
// #[test]
// fn decode_notification_wal() {
// let wal = include_bytes!("../../test-data/28.wal");
// let notification: reth_exex_types::serde_bincode_compat::ExExNotification<
// '_,
// reth_ethereum_primitives::EthPrimitives,
// > = rmp_serde::decode::from_slice(wal.as_slice()).unwrap();
// let notification: ExExNotification = notification.into();
// match notification {
// ExExNotification::ChainCommitted { new } => {
// assert_eq!(new.blocks().len(), 1);
// assert_eq!(new.tip().transaction_count(), 1);
// }
// _ => panic!("unexpected notification"),
// }
// }
// wal with 1 block and tx (new 4-field format with trie updates and hashed state)
#[test]

View File

@@ -256,6 +256,10 @@ impl<B: FullBlock<Header: reth_primitives_traits::BlockHeader>> FromReader
Err(err) => return Err(err),
};
tracing::debug!(target: "downloaders::file",
block=?block,
"decoded block from file chunk"
);
let block = SealedBlock::seal_slow(block);
// Validate standalone header
@@ -272,6 +276,11 @@ impl<B: FullBlock<Header: reth_primitives_traits::BlockHeader>> FromReader
let block_hash = block.hash();
let block_number = block.number();
let (header, body) = block.split_sealed_header_body();
tracing::debug!(target: "downloaders::file",
header=?header,
body=?body,
"adding block to file client buffers"
);
headers.insert(block_number, header.unseal());
hash_to_number.insert(block_hash, block_number);
bodies.insert(block_hash, body);

View File

@@ -265,6 +265,7 @@ mod tests {
excess_blob_gas: None,
parent_beacon_block_root: None,
requests_hash: None,
block_access_list_hash:None
},
]),
}.encode(&mut data);
@@ -302,6 +303,7 @@ mod tests {
excess_blob_gas: None,
parent_beacon_block_root: None,
requests_hash: None,
block_access_list_hash: None
},
]),
};
@@ -408,9 +410,11 @@ mod tests {
excess_blob_gas: None,
parent_beacon_block_root: None,
requests_hash: None,
block_access_list_hash:None
},
],
withdrawals: None,
block_access_list:None
}
]),
};
@@ -485,9 +489,11 @@ mod tests {
excess_blob_gas: None,
parent_beacon_block_root: None,
requests_hash: None,
block_access_list_hash:None
},
],
withdrawals: None,
block_access_list:None
}
]),
};

View File

@@ -152,6 +152,7 @@ mod tests {
excess_blob_gas: None,
parent_beacon_block_root: None,
requests_hash: None,
block_access_list_hash:None
};
assert_eq!(header.hash_slow(), expected_hash);
}
@@ -268,6 +269,7 @@ mod tests {
excess_blob_gas: Some(0),
parent_beacon_block_root: None,
requests_hash: None,
block_access_list_hash: None,
};
let header = Header::decode(&mut data.as_slice()).unwrap();
@@ -310,6 +312,7 @@ mod tests {
blob_gas_used: Some(0),
excess_blob_gas: Some(0x1600000),
requests_hash: None,
block_access_list_hash: None,
};
let header = Header::decode(&mut data.as_slice()).unwrap();

View File

@@ -824,6 +824,7 @@ mod tests {
transactions: vec![],
ommers: vec![],
withdrawals: Some(Default::default()),
block_access_list: None,
}]
.into(),
}));

View File

@@ -290,6 +290,7 @@ impl EngineNodeLauncher {
let startup_sync_state_idle = ctx.node_config().debug.startup_sync_state_idle;
info!(target: "reth::cli", "Starting consensus engine");
info!(target: "reth::cli", "built payloads ready: {:#?}", built_payloads);
let consensus_engine = async move {
if let Some(initial_target) = initial_target {
debug!(target: "reth::cli", %initial_target, "start backfill sync");

View File

@@ -298,6 +298,7 @@ mod tests {
transactions: vec![transaction],
ommers: vec![],
withdrawals: Some(Withdrawals::default()),
block_access_list: None,
};
let block = SealedBlock::seal_slow(alloy_consensus::Block { header, body });
@@ -335,6 +336,7 @@ mod tests {
transactions: vec![transaction],
ommers: vec![],
withdrawals: Some(Withdrawals::default()),
block_access_list: None,
};
let block = SealedBlock::seal_slow(alloy_consensus::Block { header, body });
@@ -389,6 +391,7 @@ mod tests {
transactions: vec![transaction],
ommers: vec![],
withdrawals: Some(Withdrawals::default()),
block_access_list: None,
};
let block = SealedBlock::seal_slow(alloy_consensus::Block { header, body });
@@ -398,6 +401,7 @@ mod tests {
receipts: vec![receipt],
requests: Requests::default(),
gas_used: GAS_USED,
block_access_list: None,
};
// validate blob, it should pass blob gas used validation
@@ -458,6 +462,7 @@ mod tests {
transactions: vec![transaction],
ommers: vec![],
withdrawals: Some(Withdrawals::default()),
block_access_list: None,
};
let block = SealedBlock::seal_slow(alloy_consensus::Block { header, body });
@@ -467,6 +472,7 @@ mod tests {
receipts: vec![receipt],
requests: Requests::default(),
gas_used: GAS_USED,
block_access_list: None,
};
// validate blob, it should pass blob gas used validation

View File

@@ -518,6 +518,7 @@ mod tests {
transactions: vec![],
ommers: vec![],
withdrawals: Some(Default::default()),
..Default::default()
};
validate_body_against_header_op(&chainspec, &body, &header).unwrap();
@@ -542,6 +543,7 @@ mod tests {
receipts: vec![],
requests: Requests::default(),
gas_used: GAS_USED,
block_access_list: None,
};
validate_block_post_execution(&header, &chainspec, &result).unwrap();
}
@@ -563,6 +565,7 @@ mod tests {
receipts: vec![],
requests: Requests::default(),
gas_used: GAS_USED,
block_access_list: None,
};
assert!(matches!(
validate_block_post_execution(&header, &chainspec, &result).unwrap_err(),

View File

@@ -46,7 +46,14 @@ impl<ChainSpec: OpHardforks> OpBlockAssembler<ChainSpec> {
evm_env,
execution_ctx: ctx,
transactions,
output: BlockExecutionResult { receipts, gas_used, blob_gas_used, requests: _ },
output:
BlockExecutionResult {
receipts,
gas_used,
blob_gas_used,
requests: _,
block_access_list: _,
},
bundle_state,
state_root,
state_provider,
@@ -70,7 +77,7 @@ impl<ChainSpec: OpHardforks> OpBlockAssembler<ChainSpec> {
// withdrawals root field in block header is used for storage root of L2 predeploy
// `l2tol1-message-passer`
Some(
isthmus::withdrawals_root(bundle_state, state_provider)
isthmus::withdrawals_root(&bundle_state, state_provider)
.map_err(BlockExecutionError::other)?,
)
} else if self.chain_spec.is_canyon_active_at_timestamp(timestamp) {
@@ -112,6 +119,7 @@ impl<ChainSpec: OpHardforks> OpBlockAssembler<ChainSpec> {
blob_gas_used,
excess_blob_gas,
requests_hash,
block_access_list_hash: None,
};
Ok(Block::new(
@@ -123,6 +131,7 @@ impl<ChainSpec: OpHardforks> OpBlockAssembler<ChainSpec> {
.chain_spec
.is_canyon_active_at_timestamp(timestamp)
.then(Default::default),
block_access_list: None,
},
))
}

View File

@@ -230,7 +230,7 @@ where
let spec = revm_spec_by_timestamp_after_bedrock(self.chain_spec(), timestamp);
let cfg_env = CfgEnv::new().with_chain_id(self.chain_spec().chain().id()).with_spec(spec);
let cfg_env = CfgEnv::new_with_spec(spec).with_chain_id(self.chain_spec().chain().id());
let blob_excess_gas_and_price = spec
.into_eth_spec()
@@ -362,7 +362,7 @@ mod tests {
let db = CacheDB::<EmptyDBTyped<ProviderError>>::default();
// Create a custom configuration environment with a chain ID of 111
let cfg = CfgEnv::new().with_chain_id(111).with_spec(OpSpecId::default());
let cfg = CfgEnv::new_with_spec(OpSpecId::default()).with_chain_id(111);
let evm_env = EvmEnv { cfg_env: cfg.clone(), ..Default::default() };
@@ -401,7 +401,7 @@ mod tests {
let db = CacheDB::<EmptyDBTyped<ProviderError>>::default();
let evm_env =
EvmEnv { cfg_env: CfgEnv::new().with_spec(OpSpecId::ECOTONE), ..Default::default() };
EvmEnv { cfg_env: CfgEnv::new_with_spec(OpSpecId::ECOTONE), ..Default::default() };
let evm = evm_config.evm_with_env(db, evm_env.clone());
@@ -427,7 +427,7 @@ mod tests {
let evm_config = test_evm_config();
let db = CacheDB::<EmptyDBTyped<ProviderError>>::default();
let cfg = CfgEnv::new().with_chain_id(111).with_spec(OpSpecId::default());
let cfg = CfgEnv::new_with_spec(OpSpecId::default()).with_chain_id(111);
let block = BlockEnv::default();
let evm_env = EvmEnv { block_env: block, cfg_env: cfg.clone() };
@@ -464,7 +464,7 @@ mod tests {
let db = CacheDB::<EmptyDBTyped<ProviderError>>::default();
let evm_env =
EvmEnv { cfg_env: CfgEnv::new().with_spec(OpSpecId::ECOTONE), ..Default::default() };
EvmEnv { cfg_env: CfgEnv::new_with_spec(OpSpecId::ECOTONE), ..Default::default() };
let evm = evm_config.evm_with_env_and_inspector(db, evm_env.clone(), NoOpInspector {});

View File

@@ -1,7 +1,7 @@
use alloy_consensus::{Eip658Value, Receipt};
use alloy_evm::eth::receipt_builder::ReceiptBuilderCtx;
use alloy_op_evm::block::receipt_builder::OpReceiptBuilder;
use op_alloy_consensus::{OpDepositReceipt, OpTxType};
use op_alloy_consensus::OpTxType;
use reth_evm::Evm;
use reth_optimism_primitives::{OpReceipt, OpTransactionSigned};
@@ -41,7 +41,7 @@ impl OpReceiptBuilder for OpRethReceiptBuilder {
}
}
fn build_deposit_receipt(&self, inner: OpDepositReceipt) -> Self::Receipt {
fn build_deposit_receipt(&self, inner: op_alloy_consensus::OpDepositReceipt) -> Self::Receipt {
OpReceipt::Deposit(inner)
}
}

View File

@@ -62,6 +62,7 @@ where
type ExecutionPayloadEnvelopeV3 = OpExecutionPayloadEnvelopeV3;
type ExecutionPayloadEnvelopeV4 = OpExecutionPayloadEnvelopeV4;
type ExecutionPayloadEnvelopeV5 = OpExecutionPayloadEnvelopeV4;
type ExecutionPayloadEnvelopeV6 = OpExecutionPayloadEnvelopeV4;
}
/// Validator for Optimism engine API.
@@ -283,7 +284,8 @@ pub fn validate_withdrawals_presence(
EngineApiMessageVersion::V2 |
EngineApiMessageVersion::V3 |
EngineApiMessageVersion::V4 |
EngineApiMessageVersion::V5 => {
EngineApiMessageVersion::V5 |
EngineApiMessageVersion::V6 => {
if is_shanghai && !has_withdrawals {
return Err(message_validation_kind
.to_error(VersionSpecificValidationError::NoWithdrawalsPostShanghai));
@@ -339,6 +341,7 @@ mod test {
suggested_fee_recipient: Address::ZERO,
withdrawals: Some(vec![]),
parent_beacon_block_root: Some(B256::ZERO),
slot_number: None,
},
}
}

View File

@@ -61,6 +61,7 @@ pub fn optimism_payload_attributes<T>(timestamp: u64) -> OpPayloadBuilderAttribu
suggested_fee_recipient: Address::ZERO,
withdrawals: Some(vec![]),
parent_beacon_block_root: Some(B256::ZERO),
slot_number: None,
};
OpPayloadBuilderAttributes {

View File

@@ -40,6 +40,7 @@ async fn test_testsuite_op_assert_mine_block() -> Result<()> {
suggested_fee_recipient: Address::random(),
withdrawals: None,
parent_beacon_block_root: None,
slot_number: None,
},
transactions: None,
no_tx_pool: None,
@@ -85,6 +86,7 @@ async fn test_testsuite_op_assert_mine_block_isthmus_activated() -> Result<()> {
suggested_fee_recipient: Address::random(),
withdrawals: Some(vec![]),
parent_beacon_block_root: Some(B256::ZERO),
slot_number: None,
},
transactions: None,
no_tx_pool: None,

View File

@@ -19,7 +19,7 @@ use reth_optimism_node::{args::RollupArgs, OpEvmConfig, OpExecutorBuilder, OpNod
use reth_optimism_primitives::OpPrimitives;
use reth_provider::providers::BlockchainProvider;
use revm::{
context::{BlockEnv, Cfg, ContextTr, TxEnv},
context::{BlockEnv, ContextTr, TxEnv},
context_interface::result::EVMError,
inspector::NoOpInspector,
interpreter::interpreter::EthInterpreter,
@@ -103,7 +103,7 @@ fn test_setup_custom_precompiles() {
input: EvmEnv<OpSpecId>,
) -> Self::Evm<DB, NoOpInspector> {
let mut op_evm = OpEvmFactory::default().create_evm(db, input);
*op_evm.components_mut().2 = UniPrecompiles::precompiles(op_evm.ctx().cfg().spec());
*op_evm.components_mut().2 = UniPrecompiles::precompiles(*op_evm.ctx().cfg().spec());
op_evm
}
@@ -119,7 +119,7 @@ fn test_setup_custom_precompiles() {
) -> Self::Evm<DB, I> {
let mut op_evm =
OpEvmFactory::default().create_evm_with_inspector(db, input, inspector);
*op_evm.components_mut().2 = UniPrecompiles::precompiles(op_evm.ctx().cfg().spec());
*op_evm.components_mut().2 = UniPrecompiles::precompiles(*op_evm.ctx().cfg().spec());
op_evm
}

View File

@@ -4,7 +4,7 @@ use crate::{
OpPayloadBuilderAttributes, OpPayloadPrimitives,
};
use alloy_consensus::{BlockHeader, Transaction, Typed2718};
use alloy_evm::Evm as AlloyEvm;
use alloy_evm::{block::StateDB, Evm as AlloyEvm};
use alloy_primitives::{B256, U256};
use alloy_rpc_types_debug::ExecutionWitness;
use alloy_rpc_types_engine::PayloadId;
@@ -38,7 +38,10 @@ use reth_revm::{
};
use reth_storage_api::{errors::ProviderError, StateProvider, StateProviderFactory};
use reth_transaction_pool::{BestTransactionsAttributes, PoolTransaction, TransactionPool};
use revm::context::{Block, BlockEnv};
use revm::{
context::{Block, BlockEnv},
DatabaseCommit,
};
use std::{marker::PhantomData, sync::Arc};
use tracing::{debug, trace, warn};
@@ -598,9 +601,9 @@ where
}
/// Prepares a [`BlockBuilder`] for the next block.
pub fn block_builder<'a, DB: Database>(
pub fn block_builder<'a, DB: StateDB + DatabaseCommit + Database + 'a>(
&'a self,
db: &'a mut State<DB>,
db: DB,
) -> Result<
impl BlockBuilder<
Primitives = Evm::Primitives,

View File

@@ -464,6 +464,7 @@ mod tests {
suggested_fee_recipient: address!("0x4200000000000000000000000000000000000011"),
withdrawals: Some([].into()),
parent_beacon_block_root: b256!("0x8fe0193b9bf83cb7e5a08538e494fecc23046aab9a497af3704f4afdae3250ff").into(),
slot_number: None,
},
transactions: Some([bytes!("7ef8f8a0dc19cfa777d90980e4875d0a548a881baaa3f83f14d1bc0d3038bc329350e54194deaddeaddeaddeaddeaddeaddeaddeaddead00019442000000000000000000000000000000000000158080830f424080b8a4440a5e20000f424000000000000000000000000300000000670d6d890000000000000125000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000014bf9181db6e381d4384bbf69c48b0ee0eed23c6ca26143c6d2544f9d39997a590000000000000000000000007f83d659683caf2767fd3c720981d51f5bc365bc")].into()),
no_tx_pool: None,
@@ -495,6 +496,7 @@ mod tests {
suggested_fee_recipient: address!("0x4200000000000000000000000000000000000011"),
withdrawals: Some([].into()),
parent_beacon_block_root: b256!("0x8fe0193b9bf83cb7e5a08538e494fecc23046aab9a497af3704f4afdae3250ff").into(),
slot_number: None,
},
transactions: Some([bytes!("7ef8f8a0dc19cfa777d90980e4875d0a548a881baaa3f83f14d1bc0d3038bc329350e54194deaddeaddeaddeaddeaddeaddeaddeaddead00019442000000000000000000000000000000000000158080830f424080b8a4440a5e20000f424000000000000000000000000300000000670d6d890000000000000125000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000014bf9181db6e381d4384bbf69c48b0ee0eed23c6ca26143c6d2544f9d39997a590000000000000000000000007f83d659683caf2767fd3c720981d51f5bc365bc")].into()),
no_tx_pool: None,

View File

@@ -91,6 +91,7 @@ pub const BEDROCK_HEADER: Header = Header {
excess_blob_gas: None,
parent_beacon_block_root: None,
requests_hash: None,
block_access_list_hash:None
};
/// Bedrock total difficulty on Optimism Mainnet.

View File

@@ -116,6 +116,17 @@ pub enum VersionSpecificValidationError {
/// Shanghai
#[error("withdrawals pre-Shanghai")]
HasWithdrawalsPreShanghai,
/// Thrown if the pre-V6 `PayloadAttributes` or `ExecutionPayload` contains a block access list
#[error("block access list not before V6")]
BlockAccessListNotSupportedBeforeV6,
/// Thrown if `engine_newPayload` contains no block access list
/// after Amsterdam
#[error("no block access list post-Amsterdam")]
NoBlockAccessListPostAmsterdam,
/// Thrown if `engine_newPayload` contains block access list
/// before Amsterdam
#[error("block access list pre-Amsterdam")]
HasBlockAccessListPreAmsterdam,
/// Thrown if the `PayloadAttributes` or `ExecutionPayload` contains no parent beacon block
/// root after Cancun
#[error("no parent beacon block root post-cancun")]

View File

@@ -159,12 +159,23 @@ pub fn validate_payload_timestamp(
// built payload does not fall within the time frame of the Osaka fork.
return Err(EngineObjectValidationError::UnsupportedFork)
}
// `engine_getPayloadV4` MUST reject payloads with a timestamp >= Osaka.
if version.is_v4() && kind == MessageValidationKind::GetPayload && is_osaka {
return Err(EngineObjectValidationError::UnsupportedFork)
}
let is_amsterdam = chain_spec.is_amsterdam_active_at_timestamp(timestamp);
if version.is_v6() && !is_amsterdam {
// From the Engine API spec:
// <https://github.com/ethereum/execution-apis/blob/15399c2e2f16a5f800bf3f285640357e2c245ad9/src/engine/osaka.md#specification>
//
// For `engine_getPayloadV6`
//
// 1. Client software MUST return -38005: Unsupported fork error if the timestamp of the
// built payload does not fall within the time frame of the Amsterdam fork.
return Err(EngineObjectValidationError::UnsupportedFork)
}
Ok(())
}
@@ -190,7 +201,8 @@ pub fn validate_withdrawals_presence<T: EthereumHardforks>(
EngineApiMessageVersion::V2 |
EngineApiMessageVersion::V3 |
EngineApiMessageVersion::V4 |
EngineApiMessageVersion::V5 => {
EngineApiMessageVersion::V5 |
EngineApiMessageVersion::V6 => {
if is_shanghai_active && !has_withdrawals {
return Err(message_validation_kind
.to_error(VersionSpecificValidationError::NoWithdrawalsPostShanghai))
@@ -205,6 +217,45 @@ pub fn validate_withdrawals_presence<T: EthereumHardforks>(
Ok(())
}
/// Validates the presence of the `block access lists` field according to the payload timestamp.
/// After Amsterdam, block access list field must be [Some].
/// Before Amsterdam, block access list field must be [None];
pub fn validate_block_access_list_presence<T: EthereumHardforks>(
chain_spec: &T,
version: EngineApiMessageVersion,
message_validation_kind: MessageValidationKind,
timestamp: u64,
has_block_access_list: bool,
) -> Result<(), EngineObjectValidationError> {
let is_amsterdam_active = chain_spec.is_amsterdam_active_at_timestamp(timestamp);
match version {
EngineApiMessageVersion::V1 |
EngineApiMessageVersion::V2 |
EngineApiMessageVersion::V3 |
EngineApiMessageVersion::V4 |
EngineApiMessageVersion::V5 => {
if has_block_access_list {
return Err(message_validation_kind
.to_error(VersionSpecificValidationError::BlockAccessListNotSupportedBeforeV6))
}
}
EngineApiMessageVersion::V6 => {
if is_amsterdam_active && !has_block_access_list {
return Err(message_validation_kind
.to_error(VersionSpecificValidationError::NoBlockAccessListPostAmsterdam))
}
if !is_amsterdam_active && has_block_access_list {
return Err(message_validation_kind
.to_error(VersionSpecificValidationError::HasBlockAccessListPreAmsterdam))
}
}
};
Ok(())
}
/// Validate the presence of the `parentBeaconBlockRoot` field according to the given timestamp.
/// This method is meant to be used with either a `payloadAttributes` field or a full payload, with
/// the `engine_forkchoiceUpdated` and `engine_newPayload` methods respectively.
@@ -291,7 +342,10 @@ pub fn validate_parent_beacon_block_root_presence<T: EthereumHardforks>(
))
}
}
EngineApiMessageVersion::V3 | EngineApiMessageVersion::V4 | EngineApiMessageVersion::V5 => {
EngineApiMessageVersion::V3 |
EngineApiMessageVersion::V4 |
EngineApiMessageVersion::V5 |
EngineApiMessageVersion::V6 => {
if !has_parent_beacon_block_root {
return Err(validation_kind
.to_error(VersionSpecificValidationError::NoParentBeaconBlockRootPostCancun))
@@ -364,6 +418,14 @@ where
Type: PayloadAttributes,
T: EthereumHardforks,
{
validate_block_access_list_presence(
chain_spec,
version,
payload_or_attrs.message_validation_kind(),
payload_or_attrs.timestamp(),
payload_or_attrs.block_access_list().is_some(),
)?;
validate_withdrawals_presence(
chain_spec,
version,
@@ -402,6 +464,10 @@ pub enum EngineApiMessageVersion {
///
/// Added in the Osaka hardfork.
V5 = 5,
/// Version 6
///
/// Added in the Amsterdam hardfork
V6 = 6,
}
impl EngineApiMessageVersion {
@@ -430,6 +496,11 @@ impl EngineApiMessageVersion {
matches!(self, Self::V5)
}
/// Returns true if version is V6
pub const fn is_v6(&self) -> bool {
matches!(self, Self::V6)
}
/// Returns the method name for the given version.
pub const fn method_name(&self) -> &'static str {
match self {
@@ -437,7 +508,7 @@ impl EngineApiMessageVersion {
Self::V2 => "engine_newPayloadV2",
Self::V3 => "engine_newPayloadV3",
Self::V4 => "engine_newPayloadV4",
Self::V5 => "engine_newPayloadV5",
Self::V5 | Self::V6 => "engine_newPayloadV5",
}
}
}

View File

@@ -78,7 +78,7 @@ impl ExecutionPayload for ExecutionData {
}
fn block_access_list(&self) -> Option<&Bytes> {
None
self.payload.block_access_list()
}
fn parent_beacon_block_root(&self) -> Option<B256> {
@@ -135,6 +135,14 @@ where
}
}
/// Returns `block_access_list` from payload.
pub fn block_access_list(&self) -> Option<&Bytes> {
match self {
Self::ExecutionPayload(payload) => payload.block_access_list(),
Self::PayloadAttributes(_attributes) => None,
}
}
/// Returns the timestamp from either the payload or attributes.
pub fn timestamp(&self) -> u64 {
match self {

View File

@@ -0,0 +1,23 @@
//! Amsterdam rules for new payloads.
use alloy_rpc_types_engine::PayloadError;
use reth_primitives_traits::BlockBody;
/// Checks that block body contains withdrawals if Amsterdam is active and vv.
#[inline]
pub fn ensure_well_formed_fields<T: BlockBody>(
block_body: &T,
is_amsterdam_active: bool,
) -> Result<(), PayloadError> {
if is_amsterdam_active {
if block_body.block_access_list().is_none() {
// amsterdam active but no block access list present
return Err(PayloadError::PostAmsterdamBlockWithoutBlockAccessList)
}
} else if block_body.block_access_list().is_some() {
// amsterdam not active but block access list present
return Err(PayloadError::PreAmsterdamBlockWithBlockAccessList)
}
Ok(())
}

View File

@@ -9,6 +9,7 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(not(feature = "std"), no_std)]
pub mod amsterdam;
pub mod cancun;
pub mod prague;
pub mod shanghai;

View File

@@ -238,6 +238,7 @@ impl From<Account> for AccountInfo {
nonce: reth_acc.nonce,
code_hash: reth_acc.bytecode_hash.unwrap_or(KECCAK_EMPTY),
code: None,
account_id: None,
}
}
}
@@ -304,11 +305,14 @@ mod tests {
assert_eq!(len, 17);
let mut buf = vec![];
let bytecode = Bytecode(RevmBytecode::LegacyAnalyzed(LegacyAnalyzedBytecode::new(
Bytes::from(&hex!("ff00")),
2,
JumpTable::from_slice(&[0], 2),
)));
let bytecode = Bytecode(RevmBytecode::LegacyAnalyzed(
LegacyAnalyzedBytecode::new(
Bytes::from(&hex!("ff00")),
2,
JumpTable::from_slice(&[0], 2),
)
.into(),
));
let len = bytecode.to_compact(&mut buf);
assert_eq!(len, 16);

View File

@@ -9,7 +9,7 @@ use alloy_consensus::{
transaction::{Recovered, TxHashRef},
Transaction, Typed2718,
};
use alloy_eips::{eip2718::Encodable2718, eip4895::Withdrawals};
use alloy_eips::{eip2718::Encodable2718, eip4895::Withdrawals, eip7928::BlockAccessList};
use alloy_primitives::{Address, Bytes, B256};
/// Helper trait that unifies all behaviour required by transaction to support full node operations.
@@ -187,6 +187,9 @@ pub trait BlockBody:
self.recover_signers_unchecked()
}
/// Returns the block access list for the block body.
fn block_access_list(&self) -> Option<&BlockAccessList>;
/// Recovers signers for all transactions in the block body and returns a vector of
/// [`Recovered`].
fn recover_transactions(&self) -> Result<Vec<Recovered<Self::Transaction>>, RecoveryError> {
@@ -268,6 +271,10 @@ where
fn ommers(&self) -> Option<&[Self::OmmerHeader]> {
Some(&self.ommers)
}
fn block_access_list(&self) -> Option<&BlockAccessList> {
self.block_access_list.as_ref()
}
}
/// This is a helper alias to make it easy to refer to the inner `Transaction` associated type of a

View File

@@ -21,7 +21,12 @@ use crate::transaction::signed::RecoveryError;
/// let tx = TxLegacy::default();
/// let signed_tx = Signed::new_unchecked(tx, Signature::test_signature(), B256::ZERO);
/// let envelope = TxEnvelope::Legacy(signed_tx);
/// let body = BlockBody { transactions: vec![envelope], ommers: vec![], withdrawals: None };
/// let body = BlockBody {
/// transactions: vec![envelope],
/// ommers: vec![],
/// withdrawals: None,
/// block_access_list: None,
/// };
/// let block = Block::new(header, body);
/// let sealed_block = SealedBlock::new_unchecked(block, B256::ZERO);
///

View File

@@ -449,6 +449,10 @@ impl<B: Block> BlockHeader for RecoveredBlock<B> {
self.header().requests_hash()
}
fn block_access_list_hash(&self) -> Option<B256> {
self.header().block_access_list_hash()
}
fn extra_data(&self) -> &Bytes {
self.header().extra_data()
}
@@ -512,6 +516,7 @@ where
transactions,
ommers: block.body.ommers,
withdrawals: block.body.withdrawals,
block_access_list: block.body.block_access_list,
};
let block = alloy_consensus::Block::new(header, body);
@@ -740,13 +745,14 @@ mod rpc_compat {
let rlp_length = self.rlp_length();
let header = self.clone_sealed_header();
let withdrawals = self.body().withdrawals().cloned();
let block_access_list = self.body().block_access_list().cloned();
let transactions = BlockTransactions::Hashes(transactions);
let uncles =
self.body().ommers().unwrap_or(&[]).iter().map(|h| h.hash_slow()).collect();
let header = header_builder(header, rlp_length)?;
Ok(Block { header, uncles, transactions, withdrawals })
Ok(Block { header, uncles, transactions, withdrawals, block_access_list })
}
/// Converts the block into an RPC [`Block`] with transaction hashes.
@@ -760,13 +766,14 @@ mod rpc_compat {
let transactions = self.body().transaction_hashes_iter().copied().collect();
let rlp_length = self.rlp_length();
let (header, body) = self.into_sealed_block().split_sealed_header_body();
let BlockBody { ommers, withdrawals, .. } = body.into_ethereum_body();
let BlockBody { ommers, withdrawals, block_access_list, .. } =
body.into_ethereum_body();
let transactions = BlockTransactions::Hashes(transactions);
let uncles = ommers.into_iter().map(|h| h.hash_slow()).collect();
let header = f(header, rlp_length)?;
Ok(Block { header, uncles, transactions, withdrawals })
Ok(Block { header, uncles, transactions, withdrawals, block_access_list })
}
/// Converts the block into an RPC [`Block`] with full transaction objects.
@@ -791,7 +798,8 @@ mod rpc_compat {
let (block, senders) = self.split_sealed();
let (header, body) = block.split_sealed_header_body();
let BlockBody { transactions, ommers, withdrawals } = body.into_ethereum_body();
let BlockBody { transactions, ommers, withdrawals, block_access_list } =
body.into_ethereum_body();
let transactions = transactions
.into_iter()
@@ -814,7 +822,7 @@ mod rpc_compat {
let uncles = ommers.into_iter().map(|h| h.hash_slow()).collect();
let header = header_builder(header, block_length)?;
let block = Block { header, uncles, transactions, withdrawals };
let block = Block { header, uncles, transactions, withdrawals, block_access_list };
Ok(block)
}
@@ -992,6 +1000,7 @@ mod tests {
transactions: vec![recovered_tx],
ommers: vec![],
withdrawals: None,
block_access_list: None,
};
let block_with_recovered = alloy_consensus::Block::new(header, body);

View File

@@ -531,6 +531,7 @@ mod tests {
excess_blob_gas: None,
parent_beacon_block_root: None,
requests_hash: None,
block_access_list_hash: None,
};
// Create a simple transaction
@@ -556,6 +557,7 @@ mod tests {
transactions: vec![tx_signed],
ommers: vec![],
withdrawals: Some(Default::default()),
block_access_list: None,
};
// Create the block
@@ -606,6 +608,7 @@ mod tests {
excess_blob_gas: None,
parent_beacon_block_root: None,
requests_hash: None,
block_access_list_hash: None,
};
// Create a simple transaction
@@ -631,6 +634,7 @@ mod tests {
transactions: vec![tx_signed],
ommers: vec![],
withdrawals: Some(Default::default()),
block_access_list: None,
};
// Create the block

View File

@@ -146,7 +146,7 @@ mod block_bincode {
use crate::serde_bincode_compat::SerdeBincodeCompat;
use alloc::{borrow::Cow, vec::Vec};
use alloy_consensus::TxEip4844;
use alloy_eips::eip4895::Withdrawals;
use alloy_eips::{eip4895::Withdrawals, eip7928::BlockAccessList};
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use serde_with::{DeserializeAs, SerializeAs};
@@ -250,6 +250,7 @@ mod block_bincode {
transactions: Vec<T::BincodeRepr<'a>>,
ommers: Vec<H::BincodeRepr<'a>>,
withdrawals: Cow<'a, Option<Withdrawals>>,
block_access_list: Cow<'a, Option<BlockAccessList>>,
}
impl<'a, T: SerdeBincodeCompat, H: SerdeBincodeCompat>
@@ -260,6 +261,7 @@ mod block_bincode {
transactions: value.transactions.iter().map(|tx| tx.as_repr()).collect(),
ommers: value.ommers.iter().map(|h| h.as_repr()).collect(),
withdrawals: Cow::Borrowed(&value.withdrawals),
block_access_list: Cow::Borrowed(&value.block_access_list),
}
}
}
@@ -276,6 +278,7 @@ mod block_bincode {
.collect(),
ommers: value.ommers.into_iter().map(SerdeBincodeCompat::from_repr).collect(),
withdrawals: value.withdrawals.into_owned(),
block_access_list: value.block_access_list.into_owned(),
}
}
}

View File

@@ -23,6 +23,13 @@ pub trait DebugApi<TxReq: RpcObject> {
#[method(name = "getRawBlock")]
async fn raw_block(&self, block_id: BlockId) -> RpcResult<Bytes>;
/// Returns a Eip-7928 block access list.
#[method(name = "getBlockAccessList")]
async fn debug_get_block_access_list(
&self,
block_id: BlockId,
) -> RpcResult<Option<BlockAccessList>>;
/// Returns a EIP-2718 binary-encoded transaction.
///
/// If this is a pooled EIP-4844 transaction, the blob sidecar is included.
@@ -157,10 +164,6 @@ pub trait DebugApi<TxReq: RpcObject> {
hash: B256,
) -> RpcResult<ExecutionWitness>;
/// Re-executes a block and returns the Block Access List (BAL) as defined in EIP-7928.
#[method(name = "getBlockAccessList")]
async fn debug_get_block_access_list(&self, block_id: BlockId) -> RpcResult<BlockAccessList>;
/// Sets the logging backtrace location. When a backtrace location is set and a log message is
/// emitted at that location, the stack of the goroutine executing the log statement will
/// be printed to stderr.

View File

@@ -12,7 +12,8 @@ use alloy_json_rpc::RpcObject;
use alloy_primitives::{Address, BlockHash, Bytes, B256, U256, U64};
use alloy_rpc_types_engine::{
ClientVersionV1, ExecutionPayloadBodiesV1, ExecutionPayloadInputV2, ExecutionPayloadV1,
ExecutionPayloadV3, ForkchoiceState, ForkchoiceUpdated, PayloadId, PayloadStatus,
ExecutionPayloadV3, ExecutionPayloadV4, ForkchoiceState, ForkchoiceUpdated, PayloadId,
PayloadStatus,
};
use alloy_rpc_types_eth::{
state::StateOverride, BlockOverrides, EIP1186AccountProofResponse, Filter, Log, SyncStatus,
@@ -73,6 +74,16 @@ pub trait EngineApi<Engine: EngineTypes> {
execution_requests: RequestsOrHash,
) -> RpcResult<PayloadStatus>;
/// For BAL.
#[method(name = "newPayloadV5")]
async fn new_payload_v5(
&self,
payload: ExecutionPayloadV4,
versioned_hashes: Vec<B256>,
parent_beacon_block_root: B256,
execution_requests: RequestsOrHash,
) -> RpcResult<PayloadStatus>;
/// See also <https://github.com/ethereum/execution-apis/blob/6709c2a795b707202e93c4f2867fa0bf2640a84f/src/engine/paris.md#engine_forkchoiceupdatedv1>
///
/// Caution: This should not accept the `withdrawals` field in the payload attributes.
@@ -178,6 +189,13 @@ pub trait EngineApi<Engine: EngineTypes> {
payload_id: PayloadId,
) -> RpcResult<Engine::ExecutionPayloadEnvelopeV5>;
/// payload v6
#[method(name = "getPayloadV6")]
async fn get_payload_v6(
&self,
payload_id: PayloadId,
) -> RpcResult<Engine::ExecutionPayloadEnvelopeV6>;
/// See also <https://github.com/ethereum/execution-apis/blob/6452a6b194d7db269bf1dbd087a267251d3cc7f8/src/engine/shanghai.md#engine_getpayloadbodiesbyhashv1>
#[method(name = "getPayloadBodiesByHashV1")]
async fn get_payload_bodies_by_hash_v1(

View File

@@ -11,10 +11,12 @@ pub const CAPABILITIES: &[&str] = &[
"engine_getPayloadV3",
"engine_getPayloadV4",
"engine_getPayloadV5",
"engine_getPayloadV6",
"engine_newPayloadV1",
"engine_newPayloadV2",
"engine_newPayloadV3",
"engine_newPayloadV4",
"engine_newPayloadV5",
"engine_getPayloadBodiesByHashV1",
"engine_getPayloadBodiesByRangeV1",
"engine_getBlobsV1",

View File

@@ -11,8 +11,8 @@ use alloy_primitives::{BlockHash, BlockNumber, B256, U64};
use alloy_rpc_types_engine::{
CancunPayloadFields, ClientVersionV1, ExecutionData, ExecutionPayloadBodiesV1,
ExecutionPayloadBodyV1, ExecutionPayloadInputV2, ExecutionPayloadSidecar, ExecutionPayloadV1,
ExecutionPayloadV3, ForkchoiceState, ForkchoiceUpdated, PayloadId, PayloadStatus,
PraguePayloadFields,
ExecutionPayloadV3, ExecutionPayloadV4, ForkchoiceState, ForkchoiceUpdated, PayloadId,
PayloadStatus, PraguePayloadFields,
};
use async_trait::async_trait;
use jsonrpsee_core::{server::RpcModule, RpcResult};
@@ -256,6 +256,39 @@ where
pub fn accept_execution_requests_hash(&self) -> bool {
self.inner.accept_execution_requests_hash
}
/// New payload version 5
pub async fn new_payload_v5(
&self,
payload: PayloadT::ExecutionData,
) -> EngineApiResult<PayloadStatus> {
let payload_or_attrs = PayloadOrAttributes::<
'_,
PayloadT::ExecutionData,
PayloadT::PayloadAttributes,
>::from_execution_payload(&payload);
self.inner.validator.validate_version_specific_fields(
EngineApiMessageVersion::V6,
/* //todo */
payload_or_attrs,
)?;
Ok(self.inner.beacon_consensus.new_payload(payload).await?)
}
/// Metrics version of `new_payload_v5`
pub async fn new_payload_v5_metered(
&self,
payload: PayloadT::ExecutionData,
) -> RpcResult<PayloadStatus> {
let start = Instant::now();
let res = Self::new_payload_v5(self, payload).await;
let elapsed = start.elapsed();
self.inner.metrics.latency.new_payload_v5.record(elapsed);
Ok(res?)
}
}
impl<Provider, EngineT, Pool, Validator, ChainSpec>
@@ -516,6 +549,27 @@ where
res
}
/// Handler for `engine_getPayloadV6`
///
/// For BAL
pub async fn get_payload_v6(
&self,
payload_id: PayloadId,
) -> EngineApiResult<EngineT::ExecutionPayloadEnvelopeV6> {
self.get_payload_inner(payload_id, EngineApiMessageVersion::V6).await
}
/// Metrics version of `get_payload_v6`
pub async fn get_payload_v6_metered(
&self,
payload_id: PayloadId,
) -> EngineApiResult<EngineT::ExecutionPayloadEnvelopeV6> {
let start = Instant::now();
let res = Self::get_payload_v6(self, payload_id).await;
self.inner.metrics.latency.get_payload_v6.record(start.elapsed());
res
}
/// Fetches all the blocks for the provided range starting at `start`, containing `count`
/// blocks and returns the mapped payload bodies.
pub async fn get_payload_bodies_by_range_with<F, R>(
@@ -963,6 +1017,32 @@ where
Ok(self.new_payload_v4_metered(payload).await?)
}
/// Handler for `engine_newPayloadV5`
async fn new_payload_v5(
&self,
payload: ExecutionPayloadV4,
versioned_hashes: Vec<B256>,
parent_beacon_block_root: B256,
requests: RequestsOrHash,
) -> RpcResult<PayloadStatus> {
trace!(target: "rpc::engine", "Serving engine_newPayloadV5");
// Accept requests as a hash only if it is explicitly allowed
if requests.is_hash() && !self.inner.accept_execution_requests_hash {
return Err(EngineApiError::UnexpectedRequestsHash.into());
}
let payload = ExecutionData {
payload: payload.into(),
sidecar: ExecutionPayloadSidecar::v4(
CancunPayloadFields { versioned_hashes, parent_beacon_block_root },
PraguePayloadFields { requests },
),
};
Ok(self.new_payload_v5_metered(payload).await?)
}
/// Handler for `engine_forkchoiceUpdatedV1`
/// See also <https://github.com/ethereum/execution-apis/blob/3d627c95a4d3510a8187dd02e0250ecb4331d27e/src/engine/paris.md#engine_forkchoiceupdatedv1>
///
@@ -1086,6 +1166,15 @@ where
Ok(self.get_payload_v5_metered(payload_id).await?)
}
/// Handler for `engine_getPayloadV6`
async fn get_payload_v6(
&self,
payload_id: PayloadId,
) -> RpcResult<EngineT::ExecutionPayloadEnvelopeV6> {
trace!(target: "rpc::engine", "Serving engine_getPayloadV6");
Ok(self.get_payload_v6_metered(payload_id).await?)
}
/// Handler for `engine_getPayloadBodiesByHashV1`
/// See also <https://github.com/ethereum/execution-apis/blob/6452a6b194d7db269bf1dbd087a267251d3cc7f8/src/engine/shanghai.md#engine_getpayloadbodiesbyhashv1>
async fn get_payload_bodies_by_hash_v1(

View File

@@ -22,6 +22,8 @@ pub(crate) struct EngineApiLatencyMetrics {
pub(crate) new_payload_v3: Histogram,
/// Latency for `engine_newPayloadV4`
pub(crate) new_payload_v4: Histogram,
/// Latency for `engine_newPayloadV5`
pub(crate) new_payload_v5: Histogram,
/// Latency for `engine_forkchoiceUpdatedV1`
pub(crate) fork_choice_updated_v1: Histogram,
/// Latency for `engine_forkchoiceUpdatedV2`
@@ -38,6 +40,8 @@ pub(crate) struct EngineApiLatencyMetrics {
pub(crate) get_payload_v4: Histogram,
/// Latency for `engine_getPayloadV5`
pub(crate) get_payload_v5: Histogram,
/// Latency for `engine_getPayloadV6`
pub(crate) get_payload_v6: Histogram,
/// Latency for `engine_getPayloadBodiesByRangeV1`
pub(crate) get_payload_bodies_by_range_v1: Histogram,
/// Latency for `engine_getPayloadBodiesByHashV1`

View File

@@ -267,6 +267,7 @@ pub trait EthBlocks: LoadBlock<RpcConvert: RpcConvert<Primitives = Self::Primiti
header,
transactions: BlockTransactions::Uncle,
withdrawals: None,
block_access_list: None,
})
})
.transpose()

View File

@@ -37,6 +37,7 @@ use reth_storage_api::{BlockIdReader, ProviderTx, StateProviderBox};
use revm::{
context::Block,
context_interface::{result::ResultAndState, Transaction},
database::bal::EvmDatabaseError,
Database, DatabaseCommit,
};
use revm_inspectors::{access_list::AccessListInspector, transfer::TransferInspector};
@@ -398,7 +399,12 @@ pub trait EthCall: EstimateCall + Call + LoadPendingBlock + LoadBlock + FullEthA
{
self.spawn_blocking_io_fut(move |this| async move {
let state = this.state_at_block_id(at).await?;
let mut db = State::builder().with_database(StateProviderDatabase::new(state)).build();
let mut db = State::builder()
.with_database(StateProviderDatabase::new(state))
.with_bal_builder()
.build();
db.bal_state.bal_index = 0;
db.bal_state.bal_builder = Some(revm::state::bal::Bal::new());
if let Some(state_overrides) = state_override {
apply_state_overrides(state_overrides, &mut db)
@@ -508,7 +514,7 @@ pub trait Call:
tx_env: TxEnvFor<Self::Evm>,
) -> Result<ResultAndState<HaltReasonFor<Self::Evm>>, Self::Error>
where
DB: Database<Error = ProviderError> + fmt::Debug,
DB: Database<Error = EvmDatabaseError<ProviderError>> + fmt::Debug,
{
let mut evm = self.evm_config().evm_with_env(db, evm_env);
let res = evm.transact(tx_env).map_err(Self::Error::from_evm_err)?;
@@ -526,7 +532,7 @@ pub trait Call:
inspector: I,
) -> Result<ResultAndState<HaltReasonFor<Self::Evm>>, Self::Error>
where
DB: Database<Error = ProviderError> + fmt::Debug,
DB: Database<Error = EvmDatabaseError<ProviderError>> + fmt::Debug,
I: InspectorFor<Self::Evm, DB>,
{
let mut evm = self.evm_config().evm_with_env_and_inspector(db, evm_env, inspector);
@@ -703,7 +709,7 @@ pub trait Call:
target_tx_hash: B256,
) -> Result<usize, Self::Error>
where
DB: Database<Error = ProviderError> + DatabaseCommit + core::fmt::Debug,
DB: Database<Error = EvmDatabaseError<ProviderError>> + DatabaseCommit + core::fmt::Debug,
I: IntoIterator<Item = Recovered<&'a ProviderTx<Self::Provider>>>,
{
let mut evm = self.evm_config().evm_with_env(db, evm_env);

View File

@@ -2,6 +2,7 @@
use super::{Call, LoadPendingBlock};
use crate::{AsEthApiError, FromEthApiError, IntoEthApiError};
use alloy_consensus::constants::KECCAK_EMPTY;
use alloy_evm::overrides::apply_state_overrides;
use alloy_network::TransactionBuilder;
use alloy_primitives::{TxKind, U256};
@@ -26,7 +27,7 @@ use reth_rpc_server_types::constants::gas_oracle::{CALL_STIPEND_GAS, ESTIMATE_GA
use revm::{
context::Block,
context_interface::{result::ExecutionResult, Transaction},
primitives::KECCAK_EMPTY,
database::bal::EvmDatabaseError,
};
use tracing::trace;
@@ -87,7 +88,12 @@ pub trait EstimateCall: Call {
.unwrap_or(max_gas_limit);
// Configure the evm env
let mut db = State::builder().with_database(StateProviderDatabase::new(state)).build();
let mut db = State::builder()
.with_database(StateProviderDatabase::new(state))
.with_bal_builder()
.build();
db.bal_state.bal_index = 0;
db.bal_state.bal_builder = Some(revm::state::bal::Bal::new());
// Apply any state overrides if specified.
if let Some(state_override) = state_override {
@@ -313,7 +319,7 @@ pub trait EstimateCall: Call {
max_gas_limit: u64,
) -> Result<U256, Self::Error>
where
DB: Database<Error = ProviderError>,
DB: Database<Error = EvmDatabaseError<ProviderError>>,
EthApiError: From<DB::Error>,
{
let req_gas_limit = tx_env.gas_limit();

Some files were not shown because too many files have changed in this diff Show More