diff --git a/.config/nextest.toml b/.config/nextest.toml index e1d872d3d0..02837bb386 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -20,6 +20,12 @@ retries = 1 filter = 'package(base-action-harness)' slow-timeout = { period = "90s", terminate-after = 2 } +# Asserts which 200 ms block a transaction lands in, so it must not share the host with other +# tests. First matching override wins per setting, so the group and timeouts below still apply. +[[profile.ci.overrides]] +filter = 'binary(early_broadcast)' +threads-required = 'num-test-threads' + # Nextest profiles do not inherit default-profile overrides. Without this, CI # starts every Docker-backed system test at once and the runner gets OOM-killed. [[profile.ci.overrides]] @@ -51,6 +57,11 @@ filter = 'binary(eip8130)' retries = 0 slow-timeout = { period = "5m", terminate-after = 5 } +# See the `ci` profile: wall-clock inclusion assertions need the host to themselves. +[[profile.default.overrides]] +filter = 'binary(early_broadcast)' +threads-required = 'num-test-threads' + [[profile.default.overrides]] filter = 'package(base-system-tests)' test-group = 'system-tests' diff --git a/ACTIVATIONS.md b/ACTIVATIONS.md index 8f548fa19b..481d57989a 100644 --- a/ACTIVATIONS.md +++ b/ACTIVATIONS.md @@ -7,7 +7,7 @@ and refresh the statuses when an activation is announced. Denim and Everest are contract-backed: an L1 upgrade signal (`crates/utilities/upgrade-signal`) can schedule them on a network with no new node release. Zenith can only be set in genesis. -Statuses checked 2026-11-06 against Base `v1.5.4` (`crates/common/chains/src/config.rs`). On both +Statuses checked 2026-11-13 against Base `v1.5.5` (`crates/common/chains/src/config.rs`). On both L1s, `getSchedule()` on the configured `protocol_versions_address` reverts, so no upgrade is scheduled through the signal; the schedules below are the ones in the code. diff --git a/CHANGELOG.sf.md b/CHANGELOG.sf.md index 83ac0228d5..af7458ecd2 100644 --- a/CHANGELOG.sf.md +++ b/CHANGELOG.sf.md @@ -1,3 +1,14 @@ +## v1.5.5-fh3.1 + +### Changed + +* Rebased on upstream Base `v1.5.5`, recommended for Base mainnet and Base Sepolia: it fixes the + `eth_call` latency regression of `v1.5.4`. Uses `streamingfast/reth` `base-v2.5.2.11-fh3.1`; + `firehose-tracer` stays on 5.7.0 and the Firehose block model is unchanged. +* Upstream returns `--engine.memory-block-buffer-target` of `base-reth-node` to 5 blocks (70 in + `v1.5.4`). After an unclean shutdown the node still executes again and emits again the FIRE BLOCK + lines of up to about 70 blocks, now fewer on average. + ## v1.5.4-fh3.1 ### Changed diff --git a/Cargo.lock b/Cargo.lock index 2d1024310a..a3bd3b0a81 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -392,7 +392,7 @@ dependencies = [ [[package]] name = "alloy-evm" version = "0.38.0" -source = "git+https://github.com/streamingfast/evm.git?tag=v0.38.0-sf#0ac393245b50497e8b98adca267d050065203fdb" +source = "git+https://github.com/streamingfast/evm.git?rev=0ac393245b50497e8b98adca267d050065203fdb#0ac393245b50497e8b98adca267d050065203fdb" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -2046,7 +2046,7 @@ dependencies = [ [[package]] name = "audit-archiver" -version = "1.5.4" +version = "1.5.5" dependencies = [ "anyhow", "audit-archiver-lib", @@ -2063,7 +2063,7 @@ dependencies = [ [[package]] name = "audit-archiver-lib" -version = "1.5.4" +version = "1.5.5" dependencies = [ "anyhow", "async-trait", @@ -2833,7 +2833,7 @@ dependencies = [ [[package]] name = "base" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-chains", "axum 0.8.9", @@ -2877,7 +2877,7 @@ dependencies = [ [[package]] name = "base-acceptance" -version = "1.5.4" +version = "1.5.5" dependencies = [ "chrono", "clap", @@ -2893,7 +2893,7 @@ dependencies = [ [[package]] name = "base-acceptance-cli" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-acceptance", "clap", @@ -2902,7 +2902,7 @@ dependencies = [ [[package]] name = "base-action-harness" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -2969,7 +2969,7 @@ dependencies = [ [[package]] name = "base-balance-monitor" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-network 2.4.1", "alloy-node-bindings", @@ -2982,7 +2982,7 @@ dependencies = [ [[package]] name = "base-batcher-admin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-batcher-core", "base-runtime", @@ -2996,7 +2996,7 @@ dependencies = [ [[package]] name = "base-batcher-cli" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "alloy-signer-local 2.4.1", @@ -3018,7 +3018,7 @@ dependencies = [ [[package]] name = "base-batcher-core" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -3043,7 +3043,7 @@ dependencies = [ [[package]] name = "base-batcher-encoder" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -3069,7 +3069,7 @@ dependencies = [ [[package]] name = "base-batcher-service" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-node-bindings", "alloy-primitives", @@ -3111,7 +3111,7 @@ dependencies = [ [[package]] name = "base-batcher-source" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -3129,7 +3129,7 @@ dependencies = [ [[package]] name = "base-blobs" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-eips 2.4.1", "alloy-primitives", @@ -3140,7 +3140,7 @@ dependencies = [ [[package]] name = "base-builder-bin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-builder-cli", "base-builder-core", @@ -3159,7 +3159,7 @@ dependencies = [ [[package]] name = "base-builder-cli" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "base-builder-core", @@ -3179,7 +3179,7 @@ dependencies = [ [[package]] name = "base-builder-core" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-contract", @@ -3309,7 +3309,7 @@ dependencies = [ [[package]] name = "base-builder-metering" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "base-builder-core", @@ -3322,19 +3322,23 @@ dependencies = [ [[package]] name = "base-builder-multiplex" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", + "alloy-network 2.4.1", "alloy-primitives", "alloy-provider", + "alloy-rpc-client", "alloy-rpc-types-engine", "base-builder-core", "base-common-chains", "base-common-consensus", "base-common-genesis", "base-common-network", + "base-common-rpc-types", "base-common-rpc-types-engine", + "base-consensus-engine", "base-execution-chainspec", "base-execution-evm", "base-execution-firehose", @@ -3342,6 +3346,8 @@ dependencies = [ "base-execution-rpc", "base-node-core", "base-node-runner", + "base-protocol", + "base-test-utils", "eyre", "futures", "metrics", @@ -3358,14 +3364,17 @@ dependencies = [ "reth-payload-primitives", "reth-provider", "reth-tasks", + "serde_json", + "tempfile", "thiserror 2.0.19", "tokio", "tracing", + "url", ] [[package]] name = "base-builder-publish" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-metrics", "base-ring-buffer", @@ -3385,7 +3394,7 @@ dependencies = [ [[package]] name = "base-bundles" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -3401,7 +3410,7 @@ dependencies = [ [[package]] name = "base-challenger" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -3446,7 +3455,7 @@ dependencies = [ [[package]] name = "base-challenger-bin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-challenger", "base-cli-utils", @@ -3457,7 +3466,7 @@ dependencies = [ [[package]] name = "base-challenger-e2e" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-node-bindings", @@ -3485,7 +3494,7 @@ dependencies = [ [[package]] name = "base-challenger-e2e-bin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-challenger-e2e", "tokio", @@ -3495,7 +3504,7 @@ dependencies = [ [[package]] name = "base-cli-utils" -version = "1.5.4" +version = "1.5.5" dependencies = [ "backtrace", "base-metrics", @@ -3522,7 +3531,7 @@ dependencies = [ [[package]] name = "base-common-chains" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-chains", "alloy-eips 2.4.1", @@ -3537,7 +3546,7 @@ dependencies = [ [[package]] name = "base-common-consensus" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -3574,7 +3583,7 @@ dependencies = [ [[package]] name = "base-common-eip8130" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -3584,7 +3593,7 @@ dependencies = [ [[package]] name = "base-common-evm" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -3615,7 +3624,7 @@ dependencies = [ [[package]] name = "base-common-evm2" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -3634,7 +3643,7 @@ dependencies = [ [[package]] name = "base-common-flashblocks" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", @@ -3652,7 +3661,7 @@ dependencies = [ [[package]] name = "base-common-flz" -version = "1.5.4" +version = "1.5.5" dependencies = [ "criterion", "hex-literal 1.1.0", @@ -3662,7 +3671,7 @@ dependencies = [ [[package]] name = "base-common-genesis" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-chains", "alloy-consensus 2.4.1", @@ -3684,7 +3693,7 @@ dependencies = [ [[package]] name = "base-common-l1-fees" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "base-common-flz", @@ -3693,7 +3702,7 @@ dependencies = [ [[package]] name = "base-common-network" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-network 2.4.1", @@ -3710,7 +3719,7 @@ dependencies = [ [[package]] name = "base-common-precompiles" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-evm", "alloy-primitives", @@ -3728,7 +3737,7 @@ dependencies = [ [[package]] name = "base-common-rpc-types" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -3755,7 +3764,7 @@ dependencies = [ [[package]] name = "base-common-rpc-types-engine" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -3778,7 +3787,7 @@ dependencies = [ [[package]] name = "base-common-signer" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -3798,7 +3807,7 @@ dependencies = [ [[package]] name = "base-comp" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-common-genesis", "base-protocol", @@ -3809,7 +3818,7 @@ dependencies = [ [[package]] name = "base-consensus" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-cli-utils", "base-consensus-cli", @@ -3818,7 +3827,7 @@ dependencies = [ [[package]] name = "base-consensus-cli" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-chains", "alloy-genesis", @@ -3832,6 +3841,7 @@ dependencies = [ "base-common-chains", "base-common-genesis", "base-common-network", + "base-common-rpc-types-engine", "base-consensus-derive", "base-consensus-disc", "base-consensus-gossip", @@ -3867,7 +3877,7 @@ dependencies = [ [[package]] name = "base-consensus-derive" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -3898,7 +3908,7 @@ dependencies = [ [[package]] name = "base-consensus-disc" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-rlp", "backon", @@ -3921,7 +3931,7 @@ dependencies = [ [[package]] name = "base-consensus-engine" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -3968,7 +3978,7 @@ dependencies = [ [[package]] name = "base-consensus-gossip" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-chains", "alloy-consensus 2.4.1", @@ -4008,7 +4018,7 @@ dependencies = [ [[package]] name = "base-consensus-node" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-chains", "alloy-consensus 2.4.1", @@ -4085,7 +4095,7 @@ dependencies = [ [[package]] name = "base-consensus-peers" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -4110,7 +4120,7 @@ dependencies = [ [[package]] name = "base-consensus-providers" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -4148,7 +4158,7 @@ dependencies = [ [[package]] name = "base-consensus-rpc" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-eips 2.4.1", "alloy-primitives", @@ -4177,7 +4187,7 @@ dependencies = [ [[package]] name = "base-consensus-safedb" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-eips 2.4.1", "alloy-primitives", @@ -4193,7 +4203,7 @@ dependencies = [ [[package]] name = "base-consensus-sources" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "alloy-rpc-client", @@ -4215,7 +4225,7 @@ dependencies = [ [[package]] name = "base-consensus-upgrades" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-eips 2.4.1", "alloy-primitives", @@ -4227,7 +4237,7 @@ dependencies = [ [[package]] name = "base-execution-chainspec" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-chains", "alloy-consensus 2.4.1", @@ -4252,7 +4262,7 @@ dependencies = [ [[package]] name = "base-execution-cli" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -4331,7 +4341,7 @@ dependencies = [ [[package]] name = "base-execution-consensus" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-chains", "alloy-consensus 2.4.1", @@ -4364,7 +4374,7 @@ dependencies = [ [[package]] name = "base-execution-eip8130" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -4383,7 +4393,7 @@ dependencies = [ [[package]] name = "base-execution-eip8130-rpc" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -4412,7 +4422,7 @@ dependencies = [ [[package]] name = "base-execution-eip8130-rpc-node" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-eips 2.4.1", "alloy-genesis", @@ -4437,7 +4447,7 @@ dependencies = [ [[package]] name = "base-execution-evm" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -4469,7 +4479,7 @@ dependencies = [ [[package]] name = "base-execution-exex" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -4495,7 +4505,7 @@ dependencies = [ [[package]] name = "base-execution-firehose" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-evm", @@ -4514,7 +4524,7 @@ dependencies = [ [[package]] name = "base-execution-payload-builder" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -4566,12 +4576,13 @@ dependencies = [ "serde", "serde_json", "thiserror 2.0.19", + "tokio", "tracing", ] [[package]] name = "base-execution-rpc" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -4648,7 +4659,7 @@ dependencies = [ [[package]] name = "base-execution-trie" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -4702,7 +4713,7 @@ dependencies = [ [[package]] name = "base-execution-txpool" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -4756,7 +4767,7 @@ dependencies = [ [[package]] name = "base-firehose-flashblocks" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -4801,7 +4812,7 @@ dependencies = [ [[package]] name = "base-firehose-prestate" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-genesis", "base-common-chains", @@ -4819,7 +4830,7 @@ dependencies = [ [[package]] name = "base-firehose-tests" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -4850,7 +4861,7 @@ dependencies = [ [[package]] name = "base-flashblocks" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -4908,7 +4919,7 @@ dependencies = [ [[package]] name = "base-flashblocks-node" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-contract", @@ -4965,7 +4976,7 @@ dependencies = [ [[package]] name = "base-health" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-transport-http", "async-trait", @@ -4987,7 +4998,7 @@ dependencies = [ [[package]] name = "base-jwt" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "alloy-provider", @@ -5003,7 +5014,7 @@ dependencies = [ [[package]] name = "base-l1-head" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "alloy-provider", @@ -5017,7 +5028,7 @@ dependencies = [ [[package]] name = "base-load-tester-bin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-network 2.4.1", "alloy-primitives", @@ -5038,7 +5049,7 @@ dependencies = [ [[package]] name = "base-load-tests" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -5081,7 +5092,7 @@ dependencies = [ [[package]] name = "base-metering" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -5127,7 +5138,7 @@ dependencies = [ [[package]] name = "base-metrics" -version = "1.5.4" +version = "1.5.5" dependencies = [ "ctor", "metrics", @@ -5137,7 +5148,7 @@ dependencies = [ [[package]] name = "base-node-core" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -5214,7 +5225,7 @@ dependencies = [ [[package]] name = "base-node-runner" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-eips 2.4.1", "alloy-genesis", @@ -5266,7 +5277,7 @@ dependencies = [ [[package]] name = "base-observability-events" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "base-metrics", @@ -5285,7 +5296,7 @@ dependencies = [ [[package]] name = "base-optimism-rpc" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-eips 2.4.1", "alloy-network 2.4.1", @@ -5298,7 +5309,7 @@ dependencies = [ [[package]] name = "base-precompile-macros" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "proc-macro2", @@ -5308,7 +5319,7 @@ dependencies = [ [[package]] name = "base-precompile-storage" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-evm", "alloy-primitives", @@ -5324,7 +5335,7 @@ dependencies = [ [[package]] name = "base-proof" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -5362,7 +5373,7 @@ dependencies = [ [[package]] name = "base-proof-client" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-evm", @@ -5385,7 +5396,7 @@ dependencies = [ [[package]] name = "base-proof-contracts" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-contract", "alloy-primitives", @@ -5403,7 +5414,7 @@ dependencies = [ [[package]] name = "base-proof-driver" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-evm", @@ -5423,7 +5434,7 @@ dependencies = [ [[package]] name = "base-proof-executor" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -5457,7 +5468,7 @@ dependencies = [ [[package]] name = "base-proof-host" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -5500,7 +5511,7 @@ dependencies = [ [[package]] name = "base-proof-mpt" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -5521,7 +5532,7 @@ dependencies = [ [[package]] name = "base-proof-preimage" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "async-channel", @@ -5535,7 +5546,7 @@ dependencies = [ [[package]] name = "base-proof-primitives" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-chains", "alloy-eips 2.4.1", @@ -5553,7 +5564,7 @@ dependencies = [ [[package]] name = "base-proof-rpc" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-eips 2.4.1", "alloy-network 2.4.1", @@ -5582,7 +5593,7 @@ dependencies = [ [[package]] name = "base-proof-submission" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -5598,11 +5609,11 @@ dependencies = [ [[package]] name = "base-proof-succinct-elfs" -version = "1.5.4" +version = "1.5.5" [[package]] name = "base-proof-succinct-scripts" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "anyhow", @@ -5618,7 +5629,7 @@ dependencies = [ [[package]] name = "base-proof-tee-nitro-enclave" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-chains", "alloy-eips 2.4.1", @@ -5651,7 +5662,7 @@ dependencies = [ [[package]] name = "base-proof-tee-nitro-host" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-genesis", "alloy-primitives", @@ -5683,7 +5694,7 @@ dependencies = [ [[package]] name = "base-proof-tee-nitro-verifier" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -5700,7 +5711,7 @@ dependencies = [ [[package]] name = "base-proof-tee-registrar" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -5742,7 +5753,7 @@ dependencies = [ [[package]] name = "base-proof-tee-registrar-bin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "alloy-signer-local 2.4.1", @@ -5760,7 +5771,7 @@ dependencies = [ [[package]] name = "base-proof-worker" -version = "1.5.4" +version = "1.5.5" dependencies = [ "async-trait", "backon", @@ -5776,7 +5787,7 @@ dependencies = [ [[package]] name = "base-proof-zk-backend" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -5811,7 +5822,7 @@ dependencies = [ [[package]] name = "base-proof-zk-host" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "async-trait", @@ -5828,7 +5839,7 @@ dependencies = [ [[package]] name = "base-proof-zk-utils" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -5865,7 +5876,7 @@ dependencies = [ [[package]] name = "base-proof-zk-witness" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -5900,7 +5911,7 @@ dependencies = [ [[package]] name = "base-proofs-extension" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-execution-exex", "base-execution-rpc", @@ -5917,7 +5928,7 @@ dependencies = [ [[package]] name = "base-proposer" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -5959,7 +5970,7 @@ dependencies = [ [[package]] name = "base-proposer-bin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-cli-utils", "base-proposer", @@ -5971,7 +5982,7 @@ dependencies = [ [[package]] name = "base-protocol" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloc-no-stdlib", "alloy-consensus 2.4.1", @@ -6007,7 +6018,7 @@ dependencies = [ [[package]] name = "base-prover-nitro-enclave" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-proof-tee-nitro-enclave", "eyre", @@ -6016,7 +6027,7 @@ dependencies = [ [[package]] name = "base-prover-nitro-host" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "base-cli-utils", @@ -6038,7 +6049,7 @@ dependencies = [ [[package]] name = "base-prover-service" -version = "1.5.4" +version = "1.5.5" dependencies = [ "anyhow", "base-prover-service-db", @@ -6056,7 +6067,7 @@ dependencies = [ [[package]] name = "base-prover-service-bin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-cli-utils", "base-prover-service", @@ -6073,7 +6084,7 @@ dependencies = [ [[package]] name = "base-prover-service-client" -version = "1.5.4" +version = "1.5.5" dependencies = [ "async-trait", "backon", @@ -6090,7 +6101,7 @@ dependencies = [ [[package]] name = "base-prover-service-db" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "anyhow", @@ -6109,7 +6120,7 @@ dependencies = [ [[package]] name = "base-prover-service-protocol" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "base-proof-primitives", @@ -6122,7 +6133,7 @@ dependencies = [ [[package]] name = "base-prover-zk-host" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-cli-utils", "base-proof-worker", @@ -6142,7 +6153,7 @@ dependencies = [ [[package]] name = "base-reth-cli" -version = "1.5.4" +version = "1.5.5" dependencies = [ "anyhow", "base-common-chains", @@ -6161,7 +6172,7 @@ dependencies = [ [[package]] name = "base-reth-node" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-cli-utils", "base-common-genesis", @@ -6185,18 +6196,18 @@ dependencies = [ [[package]] name = "base-retry" -version = "1.5.4" +version = "1.5.5" dependencies = [ "backon", ] [[package]] name = "base-ring-buffer" -version = "1.5.4" +version = "1.5.5" [[package]] name = "base-roxy" -version = "1.5.4" +version = "1.5.5" dependencies = [ "anyhow", "axum 0.8.9", @@ -6210,7 +6221,7 @@ dependencies = [ [[package]] name = "base-roxy-bin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "anyhow", "base-cli-utils", @@ -6223,7 +6234,7 @@ dependencies = [ [[package]] name = "base-runtime" -version = "1.5.4" +version = "1.5.5" dependencies = [ "futures", "rand 0.9.5", @@ -6235,7 +6246,7 @@ dependencies = [ [[package]] name = "base-shadow-indexer" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -6269,7 +6280,7 @@ dependencies = [ [[package]] name = "base-shadow-indexer-db" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -6286,7 +6297,7 @@ dependencies = [ [[package]] name = "base-shadow-metrics" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -6305,7 +6316,7 @@ dependencies = [ [[package]] name = "base-shadow-metrics-bin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "anyhow", "axum 0.8.9", @@ -6320,7 +6331,7 @@ dependencies = [ [[package]] name = "base-sidecrush" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-provider", "alloy-rpc-types-eth 2.4.1", @@ -6333,7 +6344,7 @@ dependencies = [ [[package]] name = "base-sidecrush-bin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-sidecrush", "cadence", @@ -6345,7 +6356,7 @@ dependencies = [ [[package]] name = "base-snapshotter" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-eips 2.4.1", "alloy-provider", @@ -6372,7 +6383,7 @@ dependencies = [ [[package]] name = "base-snapshotter-bin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "anyhow", "aws-config", @@ -6389,7 +6400,7 @@ dependencies = [ [[package]] name = "base-snark-e2e" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "alloy-provider", @@ -6412,7 +6423,7 @@ dependencies = [ [[package]] name = "base-snark-e2e-bin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-snark-e2e", "tokio", @@ -6422,7 +6433,7 @@ dependencies = [ [[package]] name = "base-system-tests" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -6528,7 +6539,7 @@ dependencies = [ [[package]] name = "base-telemetry-bin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "anyhow", "base-cli-utils", @@ -6542,7 +6553,7 @@ dependencies = [ [[package]] name = "base-telemetry-service" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "anyhow", @@ -6572,7 +6583,7 @@ dependencies = [ [[package]] name = "base-test-utils" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-contract", @@ -6592,7 +6603,7 @@ dependencies = [ [[package]] name = "base-trusted-proxy" -version = "1.5.4" +version = "1.5.5" dependencies = [ "http 1.4.2", "ipnet", @@ -6602,7 +6613,7 @@ dependencies = [ [[package]] name = "base-tx-forwarding" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -6638,7 +6649,7 @@ dependencies = [ [[package]] name = "base-tx-manager" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -6661,6 +6672,7 @@ dependencies = [ "futures", "humantime", "metrics", + "mockall", "proptest", "rayon", "rstest", @@ -6673,7 +6685,7 @@ dependencies = [ [[package]] name = "base-txpool-rpc" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -6709,7 +6721,7 @@ dependencies = [ [[package]] name = "base-txpool-tracing" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -6745,7 +6757,7 @@ dependencies = [ [[package]] name = "base-upgrade-signal" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-json-rpc 2.4.1", "alloy-primitives", @@ -6777,7 +6789,7 @@ dependencies = [ [[package]] name = "base-witness-diff" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-primitives", "alloy-provider", @@ -6803,7 +6815,7 @@ checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" [[package]] name = "base-zk-benchmarks" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-eips 2.4.1", "alloy-primitives", @@ -6821,7 +6833,7 @@ dependencies = [ [[package]] name = "base-zk-benchmarks-bin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-cli-utils", "base-load-tests", @@ -6834,7 +6846,7 @@ dependencies = [ [[package]] name = "base-zk-fork-dispute" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-node-bindings", "alloy-primitives", @@ -6862,7 +6874,7 @@ dependencies = [ [[package]] name = "base-zk-fork-dispute-bin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "base-cli-utils", "base-zk-fork-dispute", @@ -6929,7 +6941,7 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "basectl" -version = "1.5.4" +version = "1.5.5" dependencies = [ "anyhow", "basectl-cli", @@ -6941,7 +6953,7 @@ dependencies = [ [[package]] name = "basectl-cli" -version = "1.5.4" +version = "1.5.5" dependencies = [ "alloy-consensus 2.4.1", "alloy-contract", @@ -16262,7 +16274,7 @@ checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" [[package]] name = "reth-basic-payload-builder" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -16289,7 +16301,7 @@ dependencies = [ [[package]] name = "reth-chain-state" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -16320,7 +16332,7 @@ dependencies = [ [[package]] name = "reth-chainspec" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-chains", "alloy-consensus 2.4.1", @@ -16340,7 +16352,7 @@ dependencies = [ [[package]] name = "reth-cli" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-genesis", "clap", @@ -16353,7 +16365,7 @@ dependencies = [ [[package]] name = "reth-cli-commands" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-chains", "alloy-consensus 2.4.1", @@ -16442,7 +16454,7 @@ dependencies = [ [[package]] name = "reth-cli-runner" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "reth-tasks", "tokio", @@ -16452,7 +16464,7 @@ dependencies = [ [[package]] name = "reth-cli-util" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-eips 2.4.1", "alloy-primitives", @@ -16503,7 +16515,7 @@ dependencies = [ [[package]] name = "reth-config" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "eyre", "humantime-serde", @@ -16520,7 +16532,7 @@ dependencies = [ [[package]] name = "reth-consensus" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eip7928 0.4.5", @@ -16534,7 +16546,7 @@ dependencies = [ [[package]] name = "reth-consensus-common" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -16547,7 +16559,7 @@ dependencies = [ [[package]] name = "reth-consensus-debug-client" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -16572,7 +16584,7 @@ dependencies = [ [[package]] name = "reth-db" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-primitives", "derive_more 2.1.1", @@ -16601,7 +16613,7 @@ dependencies = [ [[package]] name = "reth-db-api" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -16627,7 +16639,7 @@ dependencies = [ [[package]] name = "reth-db-common" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-genesis", @@ -16657,7 +16669,7 @@ dependencies = [ [[package]] name = "reth-db-models" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-eips 2.4.1", "alloy-primitives", @@ -16672,7 +16684,7 @@ dependencies = [ [[package]] name = "reth-discv4" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -16697,7 +16709,7 @@ dependencies = [ [[package]] name = "reth-discv5" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -16721,7 +16733,7 @@ dependencies = [ [[package]] name = "reth-dns-discovery" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-primitives", "dashmap", @@ -16745,7 +16757,7 @@ dependencies = [ [[package]] name = "reth-downloaders" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -16780,7 +16792,7 @@ dependencies = [ [[package]] name = "reth-e2e-test-utils" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -16837,7 +16849,7 @@ dependencies = [ [[package]] name = "reth-ecies" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "aes", "alloy-primitives", @@ -16864,7 +16876,7 @@ dependencies = [ [[package]] name = "reth-engine-local" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -16887,7 +16899,7 @@ dependencies = [ [[package]] name = "reth-engine-primitives" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -16914,7 +16926,7 @@ dependencies = [ [[package]] name = "reth-engine-tree" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eip7928 0.4.5", @@ -16971,7 +16983,7 @@ dependencies = [ [[package]] name = "reth-engine-util" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -17001,7 +17013,7 @@ dependencies = [ [[package]] name = "reth-era" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -17019,7 +17031,7 @@ dependencies = [ [[package]] name = "reth-era-downloader" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-primitives", "bytes", @@ -17035,7 +17047,7 @@ dependencies = [ [[package]] name = "reth-era-utils" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -17059,7 +17071,7 @@ dependencies = [ [[package]] name = "reth-errors" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "reth-consensus", "reth-execution-errors", @@ -17070,7 +17082,7 @@ dependencies = [ [[package]] name = "reth-eth-wire" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-chains", "alloy-primitives", @@ -17099,7 +17111,7 @@ dependencies = [ [[package]] name = "reth-eth-wire-types" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-chains", "alloy-consensus 2.4.1", @@ -17125,7 +17137,7 @@ dependencies = [ [[package]] name = "reth-ethereum-consensus" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -17141,7 +17153,7 @@ dependencies = [ [[package]] name = "reth-ethereum-engine-primitives" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-eips 2.4.1", "alloy-primitives", @@ -17157,7 +17169,7 @@ dependencies = [ [[package]] name = "reth-ethereum-forks" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-eip2124", "alloy-hardforks 0.4.7", @@ -17171,7 +17183,7 @@ dependencies = [ [[package]] name = "reth-ethereum-payload-builder" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -17201,7 +17213,7 @@ dependencies = [ [[package]] name = "reth-ethereum-primitives" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -17215,7 +17227,7 @@ dependencies = [ [[package]] name = "reth-etl" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "rayon", "reth-db-api", @@ -17225,7 +17237,7 @@ dependencies = [ [[package]] name = "reth-evm" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eip7928 0.4.5", @@ -17251,7 +17263,7 @@ dependencies = [ [[package]] name = "reth-evm-ethereum" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -17271,7 +17283,7 @@ dependencies = [ [[package]] name = "reth-execution-cache" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-primitives", "fixed-cache", @@ -17289,7 +17301,7 @@ dependencies = [ [[package]] name = "reth-execution-errors" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-evm", "alloy-primitives", @@ -17302,7 +17314,7 @@ dependencies = [ [[package]] name = "reth-execution-types" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -17321,7 +17333,7 @@ dependencies = [ [[package]] name = "reth-exex" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -17359,7 +17371,7 @@ dependencies = [ [[package]] name = "reth-exex-test-utils" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-eips 2.4.1", "eyre", @@ -17391,7 +17403,7 @@ dependencies = [ [[package]] name = "reth-exex-types" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-eips 2.4.1", "alloy-primitives", @@ -17405,7 +17417,7 @@ dependencies = [ [[package]] name = "reth-firehose" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eip7928 0.4.5", @@ -17434,7 +17446,7 @@ dependencies = [ [[package]] name = "reth-firehose-tests" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -17461,7 +17473,7 @@ dependencies = [ [[package]] name = "reth-fs-util" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "serde", "serde_json", @@ -17471,7 +17483,7 @@ dependencies = [ [[package]] name = "reth-invalid-block-hooks" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -17497,7 +17509,7 @@ dependencies = [ [[package]] name = "reth-ipc" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "bytes", "futures", @@ -17517,7 +17529,7 @@ dependencies = [ [[package]] name = "reth-libmdbx" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "bitflags 2.13.1", "byteorder", @@ -17534,7 +17546,7 @@ dependencies = [ [[package]] name = "reth-mdbx-sys" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "bindgen 0.72.1", "cc", @@ -17543,7 +17555,7 @@ dependencies = [ [[package]] name = "reth-metrics" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "futures", "libc", @@ -17557,7 +17569,7 @@ dependencies = [ [[package]] name = "reth-net-banlist" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-primitives", "ipnet", @@ -17566,7 +17578,7 @@ dependencies = [ [[package]] name = "reth-net-nat" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "futures-util", "if-addrs 0.14.0", @@ -17580,7 +17592,7 @@ dependencies = [ [[package]] name = "reth-network" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -17639,7 +17651,7 @@ dependencies = [ [[package]] name = "reth-network-api" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -17664,7 +17676,7 @@ dependencies = [ [[package]] name = "reth-network-p2p" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eip7928 0.4.5", @@ -17688,7 +17700,7 @@ dependencies = [ [[package]] name = "reth-network-peers" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -17703,7 +17715,7 @@ dependencies = [ [[package]] name = "reth-network-types" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-eip2124", "humantime-serde", @@ -17717,7 +17729,7 @@ dependencies = [ [[package]] name = "reth-nippy-jar" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "anyhow", "bincode 1.3.3", @@ -17734,7 +17746,7 @@ dependencies = [ [[package]] name = "reth-node-api" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-rpc-types-engine", "eyre", @@ -17758,7 +17770,7 @@ dependencies = [ [[package]] name = "reth-node-builder" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -17827,7 +17839,7 @@ dependencies = [ [[package]] name = "reth-node-core" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -17882,7 +17894,7 @@ dependencies = [ [[package]] name = "reth-node-ethereum" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -17931,7 +17943,7 @@ dependencies = [ [[package]] name = "reth-node-ethstats" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -17955,7 +17967,7 @@ dependencies = [ [[package]] name = "reth-node-events" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -17979,7 +17991,7 @@ dependencies = [ [[package]] name = "reth-node-metrics" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "bytes", "eyre", @@ -18008,7 +18020,7 @@ dependencies = [ [[package]] name = "reth-node-types" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "reth-chainspec", "reth-db-api", @@ -18020,7 +18032,7 @@ dependencies = [ [[package]] name = "reth-payload-builder" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -18044,7 +18056,7 @@ dependencies = [ [[package]] name = "reth-payload-builder-primitives" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "pin-project", "reth-payload-primitives", @@ -18056,7 +18068,7 @@ dependencies = [ [[package]] name = "reth-payload-primitives" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -18079,7 +18091,7 @@ dependencies = [ [[package]] name = "reth-payload-util" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -18089,7 +18101,7 @@ dependencies = [ [[package]] name = "reth-payload-validator" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-rpc-types-engine", @@ -18132,7 +18144,7 @@ dependencies = [ [[package]] name = "reth-provider" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eip7928 0.4.5", @@ -18182,7 +18194,7 @@ dependencies = [ [[package]] name = "reth-prune" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -18209,7 +18221,7 @@ dependencies = [ [[package]] name = "reth-prune-types" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-primitives", "arbitrary", @@ -18225,7 +18237,7 @@ dependencies = [ [[package]] name = "reth-revm" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -18240,7 +18252,7 @@ dependencies = [ [[package]] name = "reth-rpc" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-dyn-abi", @@ -18316,7 +18328,7 @@ dependencies = [ [[package]] name = "reth-rpc-api" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-eips 2.4.1", "alloy-genesis", @@ -18346,7 +18358,7 @@ dependencies = [ [[package]] name = "reth-rpc-builder" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-network 2.4.1", "alloy-provider", @@ -18389,7 +18401,7 @@ dependencies = [ [[package]] name = "reth-rpc-convert" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-evm", @@ -18409,7 +18421,7 @@ dependencies = [ [[package]] name = "reth-rpc-engine-api" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-eips 2.4.1", "alloy-primitives", @@ -18440,7 +18452,7 @@ dependencies = [ [[package]] name = "reth-rpc-eth-api" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-dyn-abi", @@ -18487,7 +18499,7 @@ dependencies = [ [[package]] name = "reth-rpc-eth-types" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-chains", "alloy-consensus 2.4.1", @@ -18538,7 +18550,7 @@ dependencies = [ [[package]] name = "reth-rpc-layer" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-rpc-types-engine", "http 1.4.2", @@ -18552,7 +18564,7 @@ dependencies = [ [[package]] name = "reth-rpc-server-types" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-eips 2.4.1", "alloy-primitives", @@ -18583,7 +18595,7 @@ dependencies = [ [[package]] name = "reth-stages" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -18634,7 +18646,7 @@ dependencies = [ [[package]] name = "reth-stages-api" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-eips 2.4.1", "alloy-primitives", @@ -18662,7 +18674,7 @@ dependencies = [ [[package]] name = "reth-stages-types" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-primitives", "arbitrary", @@ -18676,7 +18688,7 @@ dependencies = [ [[package]] name = "reth-static-file" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-primitives", "parking_lot", @@ -18696,7 +18708,7 @@ dependencies = [ [[package]] name = "reth-static-file-types" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-primitives", "clap", @@ -18711,7 +18723,7 @@ dependencies = [ [[package]] name = "reth-storage-api" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eip7928 0.4.5", @@ -18737,7 +18749,7 @@ dependencies = [ [[package]] name = "reth-storage-errors" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-eips 2.4.1", "alloy-primitives", @@ -18754,7 +18766,7 @@ dependencies = [ [[package]] name = "reth-storage-overlay" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-eips 2.4.1", "alloy-primitives", @@ -18781,7 +18793,7 @@ dependencies = [ [[package]] name = "reth-tasks" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "crossbeam-utils", "dashmap", @@ -18802,7 +18814,7 @@ dependencies = [ [[package]] name = "reth-testing-utils" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -18818,7 +18830,7 @@ dependencies = [ [[package]] name = "reth-tokio-util" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "tokio", "tokio-stream", @@ -18828,7 +18840,7 @@ dependencies = [ [[package]] name = "reth-tracing" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "clap", "eyre", @@ -18848,7 +18860,7 @@ dependencies = [ [[package]] name = "reth-tracing-otlp" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "base64 0.22.1", "clap", @@ -18867,7 +18879,7 @@ dependencies = [ [[package]] name = "reth-transaction-pool" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -18910,7 +18922,7 @@ dependencies = [ [[package]] name = "reth-trie" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-eips 2.4.1", @@ -18936,7 +18948,7 @@ dependencies = [ [[package]] name = "reth-trie-common" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-consensus 2.4.1", "alloy-primitives", @@ -18963,7 +18975,7 @@ dependencies = [ [[package]] name = "reth-trie-db" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-primitives", "reth-db-api", @@ -18979,7 +18991,7 @@ dependencies = [ [[package]] name = "reth-trie-parallel" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-evm", "alloy-primitives", @@ -19003,7 +19015,7 @@ dependencies = [ [[package]] name = "reth-trie-sparse" version = "2.5.2" -source = "git+https://github.com/streamingfast/reth.git?tag=base-v2.5.2.11-fh3.1#9f9f5efa18eaa89b8ea23ed8c15c47b1a76bafb2" +source = "git+https://github.com/streamingfast/reth.git?rev=24849d77dd91f190abdb6257366ef2d62dd63f55#24849d77dd91f190abdb6257366ef2d62dd63f55" dependencies = [ "alloy-primitives", "alloy-trie", @@ -24169,7 +24181,7 @@ dependencies = [ [[package]] name = "websocket-proxy" -version = "1.5.4" +version = "1.5.5" dependencies = [ "axum 0.8.9", "backoff", @@ -24191,7 +24203,7 @@ dependencies = [ [[package]] name = "websocket-proxy-bin" -version = "1.5.4" +version = "1.5.5" dependencies = [ "axum 0.8.9", "base-cli-utils", diff --git a/Cargo.toml b/Cargo.toml index 992108faa1..b59cde7eee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "1.5.4" +version = "1.5.5" edition = "2024" rust-version = "1.96" license = "MIT" @@ -640,8 +640,8 @@ notify = "8.2" governor = "0.7" # Firehose tracer (defined by the streamingfast reth fork, release/base-2.x branch). -reth-firehose = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-firehose-tests = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } +reth-firehose = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-firehose-tests = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 firehose-tracer = "5.7.0" # Shared tracing-regression framework (capture / invariants / projection / golden). @@ -653,77 +653,77 @@ firehose-tracer-prestate = "5.7.0" [patch.crates-io] # SF fork of alloy-evm that routes system calls (EIP-4788, EIP-2935, etc.) through the # Inspector, so Firehose tracing observes them. Must match the patch in streamingfast/reth. -alloy-evm = { git = "https://github.com/streamingfast/evm.git", tag = "v0.38.0-sf" } +alloy-evm = { git = "https://github.com/streamingfast/evm.git", rev = "0ac393245b50497e8b98adca267d050065203fdb" } # v0.38.0-sf [patch."https://github.com/base/reth"] -reth-basic-payload-builder = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-chain-state = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-chainspec = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-cli = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-cli-commands = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-cli-runner = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-cli-util = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-consensus = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-consensus-common = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-db = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-db-api = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-db-common = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-db-models = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-discv4 = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-discv5 = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-e2e-test-utils = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-ecies = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-engine-primitives = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-engine-tree = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-errors = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-eth-wire = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-eth-wire-types = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-ethereum-forks = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-ethereum-primitives = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-evm = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-evm-ethereum = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-execution-cache = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-execution-errors = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-execution-types = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-exex = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-exex-test-utils = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-ipc = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-net-nat = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-network = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-network-api = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-network-p2p = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-network-peers = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-node-api = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-node-builder = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-node-core = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-node-ethereum = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-node-metrics = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-payload-builder = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-payload-builder-primitives = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-payload-primitives = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-payload-util = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-payload-validator = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-provider = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-prune-types = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-revm = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-rpc = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-rpc-api = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-rpc-convert = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-rpc-engine-api = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-rpc-eth-api = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-rpc-eth-types = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-rpc-layer = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-rpc-server-types = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-stages-types = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-storage-api = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-storage-errors = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-tasks = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-testing-utils = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-tokio-util = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-tracing = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-tracing-otlp = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-transaction-pool = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-trie = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-trie-common = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-trie-db = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } -reth-trie-parallel = { git = "https://github.com/streamingfast/reth.git", tag = "base-v2.5.2.11-fh3.1" } +reth-basic-payload-builder = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-chain-state = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-chainspec = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-cli = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-cli-commands = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-cli-runner = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-cli-util = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-consensus = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-consensus-common = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-db = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-db-api = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-db-common = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-db-models = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-discv4 = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-discv5 = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-e2e-test-utils = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-ecies = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-engine-primitives = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-engine-tree = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-errors = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-eth-wire = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-eth-wire-types = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-ethereum-forks = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-ethereum-primitives = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-evm = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-evm-ethereum = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-execution-cache = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-execution-errors = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-execution-types = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-exex = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-exex-test-utils = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-ipc = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-net-nat = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-network = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-network-api = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-network-p2p = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-network-peers = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-node-api = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-node-builder = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-node-core = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-node-ethereum = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-node-metrics = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-payload-builder = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-payload-builder-primitives = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-payload-primitives = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-payload-util = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-payload-validator = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-provider = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-prune-types = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-revm = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-rpc = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-rpc-api = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-rpc-convert = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-rpc-engine-api = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-rpc-eth-api = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-rpc-eth-types = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-rpc-layer = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-rpc-server-types = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-stages-types = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-storage-api = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-storage-errors = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-tasks = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-testing-utils = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-tokio-util = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-tracing = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-tracing-otlp = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-transaction-pool = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-trie = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-trie-common = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-trie-db = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 +reth-trie-parallel = { git = "https://github.com/streamingfast/reth.git", rev = "24849d77dd91f190abdb6257366ef2d62dd63f55" } # base-v2.5.2.11-fh3.1 diff --git a/actions/harness/src/sequencer/driver.rs b/actions/harness/src/sequencer/driver.rs index 6dd6919b43..06e07dc537 100644 --- a/actions/harness/src/sequencer/driver.rs +++ b/actions/harness/src/sequencer/driver.rs @@ -284,6 +284,7 @@ impl L2Sequencer { unsafe_payload_gossip_client: ActionUnsafePayloadGossipClient, sealer: None, pending_stop: None, + payload_ready: None, }; self.admin_api_tx = Some(admin_api_tx); diff --git a/bin/base/src/commands/sequencer.rs b/bin/base/src/commands/sequencer.rs index de80342c23..f8834cd65c 100644 --- a/bin/base/src/commands/sequencer.rs +++ b/bin/base/src/commands/sequencer.rs @@ -145,6 +145,7 @@ impl SequencerCommand { let consensus_cancellation = CancellationToken::new(); let consensus_exit = consensus_args.start_with_options( ConsensusNodeStartOptions::new(rollup_config) + .with_payload_ready(launched.payload_ready) .with_overrides(ConsensusNodeOverrides::embedded_execution( l2_engine_rpc, upgrade_signal_l1_rpc, diff --git a/crates/batcher/cli/README.md b/crates/batcher/cli/README.md index a9933f1523..ce6f8fd22c 100644 --- a/crates/batcher/cli/README.md +++ b/crates/batcher/cli/README.md @@ -56,8 +56,10 @@ their highest. For calldata configurations, `--no-force-blobs-when-throttling` disables the throttle-driven blob override. `--network-timeout` bounds the RPC calls to L1, the sequencers and the parity validator, so an endpoint that stops answering -never blocks the batcher. The corresponding environment variables use the -`BASE_BATCHER_` prefix. +never blocks the batcher. `--min-tip-cap` and `--min-basefee` set, in gwei, the +lowest L1 priority fee and base fee the batcher prices its transactions with, +in place of lower values from the L1 node (default 0, no minimum). The +corresponding environment variables use the `BASE_BATCHER_` prefix. ## Shadow mode diff --git a/crates/batcher/cli/src/cli.rs b/crates/batcher/cli/src/cli.rs index d09baaeddd..1db63752f1 100644 --- a/crates/batcher/cli/src/cli.rs +++ b/crates/batcher/cli/src/cli.rs @@ -165,6 +165,29 @@ pub struct BatcherArgs { )] pub publish_retry_delay: Duration, + /// Minimum L1 priority fee per gas (in gwei). Accepts decimal strings (e.g. `0.01`). + /// + /// Used in place of the tip the L1 node suggests when that one is lower. + #[arg( + long = "min-tip-cap", + default_value = "0", + env = "BASE_BATCHER_MIN_TIP_CAP", + value_parser = base_tx_manager::GweiParser::parse_value + )] + pub min_tip_cap: u128, + + /// Minimum L1 base fee (in gwei) the fee cap is computed from. Accepts decimal strings + /// (e.g. `0.25`). + /// + /// Used in place of the base fee of the latest L1 block when that one is lower. + #[arg( + long = "min-basefee", + default_value = "0", + env = "BASE_BATCHER_MIN_BASEFEE", + value_parser = base_tx_manager::GweiParser::parse_value + )] + pub min_basefee: u128, + /// DA backlog in estimated compressed bytes from which the batcher throttles, lowering the /// DA limits it pushes to the `--sequencer-urls` endpoints. #[arg( @@ -378,6 +401,8 @@ impl BatcherArgs { resubmission_timeout: Duration::from_secs(self.resubmission_timeout_secs), publish_max_retries: self.publish_max_retries, publish_retry_delay: self.publish_retry_delay, + min_tip_cap: self.min_tip_cap, + min_basefee: self.min_basefee, throttle: if self.no_throttle { None } else { @@ -547,6 +572,8 @@ mod tests { assert!(!config.stopped); assert!(!config.wait_node_sync); assert_eq!(config.network_timeout, Duration::from_secs(10)); + assert_eq!(config.min_tip_cap, 0); + assert_eq!(config.min_basefee, 0); assert_eq!(config.throttle_strategy, ThrottleStrategy::Quadratic); assert_eq!(config.encoder_config.da_type, base_batcher_encoder::DaType::Blob); @@ -597,6 +624,10 @@ mod tests { "7", "--publish-retry-delay", "3s", + "--min-tip-cap", + "0.01", + "--min-basefee", + "1.5", "--max-channel-duration", "10", "--sub-safety-margin", @@ -646,6 +677,8 @@ mod tests { assert_eq!(config.encoder_config.brotli_level, base_batcher_encoder::BrotliLevel::Brotli5); assert_eq!(config.publish_max_retries, 7); assert_eq!(config.publish_retry_delay, Duration::from_secs(3)); + assert_eq!(config.min_tip_cap, 10_000_000); + assert_eq!(config.min_basefee, 1_500_000_000); assert_eq!(config.encoder_config.max_channel_duration, 10); assert_eq!(config.encoder_config.sub_safety_margin, 4); assert_eq!(config.max_pending_transactions, 4); diff --git a/crates/batcher/encoder/README.md b/crates/batcher/encoder/README.md index 8212147c31..f096a84472 100644 --- a/crates/batcher/encoder/README.md +++ b/crates/batcher/encoder/README.md @@ -15,8 +15,11 @@ reaches it. blob can emit while the channel is still open. Artifacts are immutable after creation. A soft-target or protocol-limit close retains the same channel's partial compressed tail until its L1 deadline or an explicit flush releases it. -`max_blobs_per_tx` only controls how many blobs are grouped into a transaction; -it does not close channels. +A transaction carries consecutive ready blobs up to and including the first one +that holds a channel's last frame, and at most `max_blobs_per_tx`. The safe head +moves only once a channel's last frame is on L1, so the earlier blobs of a +channel wait to go out with it, or until they fill a transaction, instead of +each taking its own. `max_blobs_per_tx` does not close channels. Channel-close metric `reason` labels: `soft_target`, `protocol_limit`, `timeout`, `flush`, `discard`. diff --git a/crates/batcher/encoder/src/artifact.rs b/crates/batcher/encoder/src/artifact.rs index 3891c0cd24..10331abf00 100644 --- a/crates/batcher/encoder/src/artifact.rs +++ b/crates/batcher/encoder/src/artifact.rs @@ -115,11 +115,6 @@ impl DaArtifacts { id } - /// Returns whether any artifact is available for a new submission. - pub fn has_ready(&self) -> bool { - self.artifacts.iter().any(|artifact| artifact.state == ArtifactState::Ready) - } - /// Returns the number of ready blob artifacts. pub fn ready_blob_count(&self) -> usize { self.ready() @@ -134,8 +129,15 @@ impl DaArtifacts { /// Leases the next ready artifacts as one transaction-sized submission. /// - /// Consecutive ready blobs are packed into one transaction, up to - /// `max_blobs`. A calldata artifact is always leased on its own. + /// A calldata artifact is always leased on its own. Consecutive ready blobs + /// are packed into one transaction up to and including the first one that + /// holds a channel's last frame, and at most `max_blobs`. The safe head + /// moves only once a channel's last frame is on L1, so sending its earlier + /// blobs ahead in their own transactions gains nothing. Until one of these + /// bounds is reached, or a calldata artifact in any state ends the run, + /// nothing is leased. A calldata artifact stays in the ledger until its + /// channel is safe, which needs the blobs before it, so a requeued run keeps + /// the same cut. pub fn lease( &mut self, submission_id: SubmissionId, @@ -144,10 +146,10 @@ impl DaArtifacts { let first_ready = self.artifacts.iter().position(|artifact| artifact.state == ArtifactState::Ready)?; - Some(match self.artifacts[first_ready].payload { + match self.artifacts[first_ready].payload { DaArtifactPayload::Blob(_) => self.lease_blobs(first_ready, max_blobs, submission_id), - DaArtifactPayload::Calldata(_) => self.lease_calldata(first_ready, submission_id), - }) + DaArtifactPayload::Calldata(_) => Some(self.lease_calldata(first_ready, submission_id)), + } } /// Returns whether every listed artifact is still leased to a submission. @@ -231,23 +233,35 @@ impl DaArtifacts { self.artifacts.iter_mut().filter(|artifact| artifact_ids.contains(&artifact.id)) } - /// Leases consecutive ready blobs as one transaction. + /// Leases consecutive ready blobs as one transaction, once the run is complete. fn lease_blobs( &mut self, first_ready: usize, maximum: usize, submission_id: SubmissionId, - ) -> (BatchSubmission, Vec) { - let indexes: Vec<_> = self - .artifacts - .iter() - .enumerate() - .skip(first_ready) - .filter(|(_, artifact)| artifact.state == ArtifactState::Ready) - .take_while(|(_, artifact)| matches!(artifact.payload, DaArtifactPayload::Blob(_))) - .take(maximum) - .map(|(index, _)| index) - .collect(); + ) -> Option<(BatchSubmission, Vec)> { + let mut artifacts = self.artifacts.iter().enumerate().skip(first_ready); + let mut indexes = Vec::new(); + let complete = loop { + let Some((index, artifact)) = artifacts.next() else { + break false; + }; + // No later blob may join the run ahead of a calldata frame, whatever its state, so + // a requeued run keeps the same cut. + let DaArtifactPayload::Blob(payload) = &artifact.payload else { + break true; + }; + if artifact.state != ArtifactState::Ready { + continue; + } + indexes.push(index); + if indexes.len() == maximum || payload.frames().iter().any(|frame| frame.is_last) { + break true; + } + }; + if !complete { + return None; + } let payloads = indexes .iter() @@ -264,7 +278,7 @@ impl DaArtifacts { self.artifacts[index].state = ArtifactState::Pending; } - (BatchSubmission::blobs(submission_id, payloads), artifact_ids) + Some((BatchSubmission::blobs(submission_id, payloads), artifact_ids)) } /// Leases one ready calldata frame as one transaction. @@ -301,9 +315,95 @@ mod tests { const FIRST: ChannelId = [1; 16]; const SECOND: ChannelId = [2; 16]; - fn blob() -> DaArtifactPayload { - let frame = Frame { id: FIRST, number: 0, data: Vec::new(), is_last: true }; - DaArtifactPayload::Blob(BlobPayload::new(vec![Arc::new(frame)])) + const MAX_BLOBS: usize = 6; + + fn frame(id: ChannelId, is_last: bool) -> Arc { + Arc::new(Frame { id, number: 0, data: Vec::new(), is_last }) + } + + /// A blob carrying one frame of channel `id`. + fn blob(id: ChannelId, is_last: bool) -> DaArtifactPayload { + DaArtifactPayload::Blob(BlobPayload::new(vec![frame(id, is_last)])) + } + + /// The artifacts the next lease takes, if any. + fn lease(artifacts: &mut DaArtifacts) -> Option> { + artifacts.lease(SubmissionId(0), MAX_BLOBS).map(|(_, artifact_ids)| artifact_ids) + } + + /// A transaction ends at the first blob holding a channel's last frame, so the blobs after + /// it, from a channel still open, wait. + #[test] + fn a_transaction_ends_at_a_channel_end() { + let mut artifacts = DaArtifacts::new(); + let first = artifacts.push(blob(FIRST, false), vec![FIRST]); + let end = artifacts.push(blob(FIRST, true), vec![FIRST, SECOND]); + artifacts.push(blob(SECOND, false), vec![SECOND]); + + assert_eq!(lease(&mut artifacts), Some(vec![first, end])); + assert_eq!(lease(&mut artifacts), None); + } + + /// Blobs without a channel end are leased only once they fill a transaction. + #[test] + fn blobs_without_a_channel_end_wait_for_a_full_transaction() { + let mut artifacts = DaArtifacts::new(); + let mut ids: Vec<_> = + (1..MAX_BLOBS).map(|_| artifacts.push(blob(FIRST, false), vec![FIRST])).collect(); + assert_eq!(lease(&mut artifacts), None); + + ids.push(artifacts.push(blob(FIRST, false), vec![FIRST])); + + assert_eq!(lease(&mut artifacts), Some(ids)); + } + + /// A requeued transaction is leased again as it was, without the newer blobs after it. + #[test] + fn a_requeued_transaction_follows_the_same_rule() { + let mut artifacts = DaArtifacts::new(); + artifacts.push(blob(FIRST, false), vec![FIRST]); + artifacts.push(blob(FIRST, true), vec![FIRST]); + let leased = lease(&mut artifacts).expect("the channel's blobs"); + artifacts.push(blob(SECOND, false), vec![SECOND]); + + artifacts.requeue(&leased); + + assert_eq!(lease(&mut artifacts), Some(leased)); + assert_eq!(lease(&mut artifacts), None); + } + + /// A calldata frame ends the blob run before it, since no later blob may land ahead of it, so + /// those blobs go out without a channel end. + #[test] + fn calldata_ends_the_blob_run_before_it() { + let mut artifacts = DaArtifacts::new(); + let blob = artifacts.push(blob(FIRST, false), vec![FIRST]); + let calldata = artifacts.push(DaArtifactPayload::Calldata(frame(FIRST, true)), vec![FIRST]); + + assert_eq!(lease(&mut artifacts), Some(vec![blob])); + assert_eq!(lease(&mut artifacts), Some(vec![calldata])); + } + + /// A blob run cut by calldata keeps its cut once the calldata is leased or confirmed, so the + /// requeued blobs go out again as the same transaction instead of waiting for more output. + #[test] + fn a_run_cut_by_calldata_keeps_its_cut_when_requeued() { + for confirm_calldata in [false, true] { + let mut artifacts = DaArtifacts::new(); + artifacts.push(blob(FIRST, false), vec![FIRST]); + artifacts.push(DaArtifactPayload::Calldata(frame(FIRST, true)), vec![FIRST]); + let blobs = lease(&mut artifacts).expect("the blobs before the calldata"); + let calldata = lease(&mut artifacts).expect("the calldata"); + artifacts.push(blob(SECOND, false), vec![SECOND]); + if confirm_calldata { + artifacts.confirm(&calldata); + } + + artifacts.requeue(&blobs); + + assert_eq!(lease(&mut artifacts), Some(blobs)); + assert_eq!(lease(&mut artifacts), None); + } } /// Pruning a channel removes it from every artifact and drops the artifacts left with no @@ -312,8 +412,8 @@ mod tests { #[test] fn prune_channels_drops_artifacts_left_without_a_channel() { let mut artifacts = DaArtifacts::new(); - artifacts.push(blob(), vec![FIRST, SECOND]); - artifacts.push(blob(), vec![FIRST]); + artifacts.push(blob(FIRST, true), vec![FIRST, SECOND]); + artifacts.push(blob(FIRST, true), vec![FIRST]); artifacts.prune_channels(&[FIRST]); diff --git a/crates/batcher/encoder/src/config.rs b/crates/batcher/encoder/src/config.rs index 7df62db836..e771200681 100644 --- a/crates/batcher/encoder/src/config.rs +++ b/crates/batcher/encoder/src/config.rs @@ -46,8 +46,9 @@ pub struct EncoderConfig { /// Maximum blobs packed into one L1 transaction. /// - /// This controls transaction packing and does not close channels. It cannot - /// exceed [`Self::MAX_BLOBS_PER_TX`]. + /// This controls transaction packing and does not close channels: blobs + /// that do not hold a channel's last frame wait until this many are ready. + /// It cannot exceed [`Self::MAX_BLOBS_PER_TX`]. /// /// Default: 6. pub max_blobs_per_tx: usize, diff --git a/crates/batcher/encoder/src/egress.rs b/crates/batcher/encoder/src/egress.rs index a3d818d989..daf803006b 100644 --- a/crates/batcher/encoder/src/egress.rs +++ b/crates/batcher/encoder/src/egress.rs @@ -109,7 +109,10 @@ impl DaEgress { !channel.is_open() && available == 0 && !terminal_pending } - /// Builds and leases one transaction-sized submission. + /// Leases one transaction-sized submission, building artifacts from `channels` only when + /// the ready ones cannot be leased yet. + /// + /// Retries are older than any artifact built here, so they go out first. pub fn next_submission( &mut self, channels: &mut VecDeque, @@ -118,17 +121,17 @@ impl DaEgress { max_blobs_per_tx: usize, id: SubmissionId, ) -> Option { - if !self.artifacts.has_ready() { - self.build_ready_artifacts(channels, da_type, l1_head, max_blobs_per_tx); - } - - let (submission, artifact_ids) = self.artifacts.lease(id, max_blobs_per_tx)?; + let (submission, artifact_ids) = + self.artifacts.lease(id, max_blobs_per_tx).or_else(|| { + self.build_ready_artifacts(channels, da_type, l1_head, max_blobs_per_tx); + self.artifacts.lease(id, max_blobs_per_tx) + })?; self.pending.insert(id, artifact_ids); Some(submission) } - /// Materializes ready artifacts only when no retry is already waiting. + /// Materializes ready artifacts, up to one transaction of blobs or one calldata frame. fn build_ready_artifacts( &mut self, channels: &mut VecDeque, @@ -487,6 +490,51 @@ mod tests { assert_eq!(submission.blob_count(), 2); } + /// The blobs of an open channel go out once they fill a transaction. The rest wait, ready but + /// not leased, while later output is still framed into blobs: the output the close flushes + /// fills more transactions, and the last blobs go out with the channel's last frame once its + /// short tail is released at the deadline. + #[test] + fn an_open_channel_fills_transactions_until_its_tail_is_released() { + let max_blobs = 6; + let channel = open_channel_with_output(FIRST, (max_blobs + 1) * DaEgress::BLOB_CAPACITY); + let mut channels = VecDeque::from([channel]); + let mut egress = DaEgress::new(); + + let full = egress + .next_submission(&mut channels, DaType::Blob, 0, max_blobs, SubmissionId(0)) + .expect("a full transaction"); + assert_eq!(full.blob_count(), max_blobs); + assert!(frames(&full).iter().all(|&(id, is_last)| id == FIRST && !is_last)); + + assert!( + egress + .next_submission(&mut channels, DaType::Blob, 0, max_blobs, SubmissionId(1)) + .is_none() + ); + let waiting = egress.artifacts().ready_blob_count(); + assert!((1..max_blobs).contains(&waiting), "{waiting} blobs wait"); + + channels[0].close().unwrap(); + let mut id = 1; + while let Some(full) = + egress.next_submission(&mut channels, DaType::Blob, 9, max_blobs, SubmissionId(id)) + { + assert_eq!(full.blob_count(), max_blobs); + assert!(frames(&full).iter().all(|&(_, is_last)| !is_last), "the tail waits"); + id += 1; + } + let waiting = egress.artifacts().ready_blob_count(); + let tail = egress + .next_submission(&mut channels, DaType::Blob, 10, max_blobs, SubmissionId(id)) + .expect("the waiting blobs and the tail at the deadline"); + + assert_eq!(tail.blob_count(), waiting + 1); + assert_eq!(frames(&tail).last(), Some(&(FIRST, true))); + assert!(channels[0].framing_complete()); + assert_eq!(egress.artifacts().ready_blob_count(), 0); + } + /// Confirming a submission reports the channels it carried and ends its lease, so a second /// confirmation reports nothing. #[test] diff --git a/crates/batcher/encoder/tests/encoder/common.rs b/crates/batcher/encoder/tests/encoder/common.rs index 320cbb936d..566b39d0f5 100644 --- a/crates/batcher/encoder/tests/encoder/common.rs +++ b/crates/batcher/encoder/tests/encoder/common.rs @@ -64,9 +64,9 @@ impl SubmissionFixture { } } -/// Two channels sharing a blob, on an encoder that closes each channel on its first block. -/// The first channel fills a blob on its own, then its tail and the second channel share the -/// next one. +/// Two channels sharing a blob, on an encoder that closes each channel on its first block and +/// sends each blob in its own transaction (`max_blobs_per_tx` of 1). The first channel fills a +/// blob on its own, then its tail and the second channel share the next one. #[derive(Debug)] pub struct SharedBlob { /// The two blocks, one per channel. @@ -101,42 +101,6 @@ impl SharedBlob { } } -/// Two channels retried in one transaction. The first channel's only blob and the second -/// channel's tail are requeued together once the second channel's two full blobs went out. -#[derive(Debug)] -pub struct SharedRetry { - /// The two blocks, one per channel. - pub blocks: Vec, - /// The two full blobs of the second channel. - pub full_blobs: BatchSubmission, - /// The transaction carrying the first channel's blob and the second channel's tail. - pub retry: BatchSubmission, -} - -impl SharedRetry { - /// Feed the two blocks to an encoder built with - /// [`one_channel_per_block(2)`](EncoderFixture::one_channel_per_block), and requeue the two - /// submissions that come back in one transaction. - pub fn encode(encoder: &mut BatchEncoder) -> Self { - let first_block = BlockFixture::block(B256::ZERO, 1, 0); - let second_block = - BlockFixture::block(first_block.header.hash_slow(), 2, THREE_BLOB_PAYLOAD); - encoder.add_block(first_block.clone()).unwrap(); - let [first] = <[_; 1]>::try_from(encoder.encode_and_drain().unwrap()).unwrap(); - encoder.add_block(second_block.clone()).unwrap(); - let mut second = encoder.encode_and_drain().unwrap(); - assert_eq!(second.len(), 2, "two full blobs, then the tail"); - let tail = second.pop().expect("the tail"); - let full_blobs = second.pop().expect("the full blobs"); - - encoder.requeue(first.id); - encoder.requeue(tail.id); - let retry = encoder.next_submission().expect("the retry"); - assert_eq!(retry.blob_count(), 2, "one transaction carries both channels"); - Self { blocks: vec![first_block, second_block], full_blobs, retry } - } -} - /// An open channel that has handed out its first submission, fed blocks of /// [`MULTI_BLOB_PAYLOAD`] one at a time until the encoder released output. #[derive(Debug)] diff --git a/crates/batcher/encoder/tests/encoder/reconcile.rs b/crates/batcher/encoder/tests/encoder/reconcile.rs index 22f3ce2e80..a69bd60aa7 100644 --- a/crates/batcher/encoder/tests/encoder/reconcile.rs +++ b/crates/batcher/encoder/tests/encoder/reconcile.rs @@ -250,7 +250,11 @@ fn reconcile_reports_a_confirmed_channel_derivation_skipped() { /// the same frames, pruned tail included, and derivation reads both channels from what landed. #[test] fn shared_blob_keeps_serving_the_remaining_channel_after_a_prune() { - let config = EncoderConfig { compressed_size_target: Some(1), ..EncoderConfig::default() }; + let config = EncoderConfig { + compressed_size_target: Some(1), + max_blobs_per_tx: 1, + ..EncoderConfig::default() + }; let fixture = EncoderFixture::new(config); let mut encoder = fixture.encoder(); let shared = SharedBlob::encode(&mut encoder); diff --git a/crates/batcher/encoder/tests/encoder/replay.rs b/crates/batcher/encoder/tests/encoder/replay.rs index 6bc8d0a8de..1441fd3f7e 100644 --- a/crates/batcher/encoder/tests/encoder/replay.rs +++ b/crates/batcher/encoder/tests/encoder/replay.rs @@ -8,7 +8,7 @@ use rstest::rstest; use crate::common::{ BlockFixture, CHANNEL_TIMEOUT, EncoderFixture, MULTI_BLOB_PAYLOAD, MULTI_FRAME_PAYLOAD, - SharedBlob, SharedRetry, SubmissionFixture, + SharedBlob, SubmissionFixture, }; /// A complete channel whose confirmations are more than the timeout apart, in either order, is @@ -129,42 +129,6 @@ fn replay_includes_the_channel_sharing_a_blob() { assert_eq!(fixture.derive(&replay).concat(), BlockFixture::batches(&shared.blocks)); } -/// Replaying a channel also replays the channel whose retried blob shares a transaction with -/// its retried tail, because a transaction lands whole. Confirming the replay clears the backlog. -#[test] -fn replay_includes_the_channel_sharing_a_transaction() { - let fixture = EncoderFixture::one_channel_per_block(2); - let mut encoder = fixture.encoder(); - let shared = SharedRetry::encode(&mut encoder); - - // The second channel's window closes with its tail, hence the retry, still in flight. - encoder.confirm(shared.full_blobs.id, 1); - encoder.advance_l1_head(1 + CHANNEL_TIMEOUT + 1); - - let replay = encoder.encode_and_drain().unwrap(); - assert_eq!(fixture.derive(&replay).concat(), BlockFixture::batches(&shared.blocks)); - for submission in &replay { - encoder.confirm(submission.id, 5); - } - assert_eq!(encoder.da_backlog_bytes(), 0); -} - -/// A transaction that landed no longer ties its channels together, so replaying one of them -/// leaves the other, fully confirmed, alone. -#[test] -fn a_landed_transaction_does_not_pull_its_other_channel_into_a_replay() { - let fixture = EncoderFixture::one_channel_per_block(2); - let mut encoder = fixture.encoder(); - let shared = SharedRetry::encode(&mut encoder); - - // The second channel's window closes with its full blobs still in flight. - encoder.confirm(shared.retry.id, 1); - encoder.advance_l1_head(1 + CHANNEL_TIMEOUT + 1); - - let replay = encoder.encode_and_drain().unwrap(); - assert_eq!(fixture.derive(&replay).concat(), BlockFixture::batches(&shared.blocks[1..])); -} - /// Replaying a channel discards every later channel too, but not the earlier ones that landed /// in time, which stay confirmed. The submissions of the discarded channels are forgotten, so /// requeuing them sends nothing. diff --git a/crates/batcher/service/src/config.rs b/crates/batcher/service/src/config.rs index ae9abb148d..c297f4c5c2 100644 --- a/crates/batcher/service/src/config.rs +++ b/crates/batcher/service/src/config.rs @@ -62,6 +62,12 @@ pub struct BatcherConfig { pub publish_max_retries: usize, /// Delay between those retries. pub publish_retry_delay: Duration, + /// Minimum L1 priority fee per gas (in wei), used in place of the tip the L1 node suggests + /// when that one is lower. + pub min_tip_cap: u128, + /// Minimum L1 base fee (in wei) the fee cap is computed from, used in place of the base fee + /// of the latest L1 block when that one is lower. + pub min_basefee: u128, /// DA throttle configuration, `None` to disable the throttle. /// /// Must be `None` when [`shadow`](Self::shadow) is set. @@ -125,6 +131,8 @@ impl Default for BatcherConfig { resubmission_timeout: Duration::from_secs(48), publish_max_retries: 10, publish_retry_delay: Duration::from_secs(1), + min_tip_cap: 0, + min_basefee: 0, throttle: Some(ThrottleConfig::default()), throttle_strategy: ThrottleStrategy::Quadratic, check_recent_txs_depth: 0, @@ -146,6 +154,8 @@ impl BatcherConfig { resubmission_timeout: self.resubmission_timeout, publish_max_retries: self.publish_max_retries, publish_retry_delay: self.publish_retry_delay, + min_tip_cap: self.min_tip_cap, + min_basefee: self.min_basefee, network_timeout: self.network_timeout, ..TxManagerConfig::default() } @@ -212,6 +222,8 @@ mod tests { resubmission_timeout: Duration::from_secs(30), publish_max_retries: 7, publish_retry_delay: Duration::from_secs(2), + min_tip_cap: 10_000_000, + min_basefee: 250_000_000, network_timeout: Duration::from_secs(4), ..BatcherConfig::default() }; @@ -223,6 +235,8 @@ mod tests { resubmission_timeout: Duration::from_secs(30), publish_max_retries: 7, publish_retry_delay: Duration::from_secs(2), + min_tip_cap: 10_000_000, + min_basefee: 250_000_000, network_timeout: Duration::from_secs(4), ..TxManagerConfig::default() } diff --git a/crates/builder/cli/src/args.rs b/crates/builder/cli/src/args.rs index 6152909efb..7adab28838 100644 --- a/crates/builder/cli/src/args.rs +++ b/crates/builder/cli/src/args.rs @@ -588,6 +588,17 @@ mod tests { assert_eq!(convert(args).manifest_precheck_enabled, enabled); } + /// The existing size flag still maps to the shared builder configuration. + #[test] + fn max_uncompressed_block_size_flag_maps_to_config() { + assert_eq!(convert(Args::default()).max_uncompressed_block_size, None); + + let parsed = + CommandParser::parse_from(["builder", "--builder.max-uncompressed-block-size", "1000"]); + let config = convert(parsed.args); + assert_eq!(config.max_uncompressed_block_size, Some(1_000)); + } + #[test] fn manifest_precheck_accepts_explicit_false() { let parsed = diff --git a/crates/builder/multiplex/Cargo.toml b/crates/builder/multiplex/Cargo.toml index 8e5a029db9..b8f1d86081 100644 --- a/crates/builder/multiplex/Cargo.toml +++ b/crates/builder/multiplex/Cargo.toml @@ -20,6 +20,7 @@ base-common-chains.workspace = true base-execution-evm.workspace = true base-execution-firehose.workspace = true base-execution-chainspec.workspace = true +base-common-rpc-types-engine.workspace = true base-execution-payload-builder.workspace = true # reth @@ -53,16 +54,25 @@ eyre.workspace = true thiserror.workspace = true [dev-dependencies] +url.workspace = true +tempfile.workspace = true +serde_json.workspace = true alloy-provider.workspace = true alloy-eips.workspace = true +alloy-network.workspace = true +alloy-rpc-client.workspace = true alloy-primitives.workspace = true alloy-rpc-types-engine.workspace = true +base-protocol.workspace = true +base-test-utils.workspace = true base-common-genesis.workspace = true +base-common-rpc-types.workspace = true +base-consensus-engine.workspace = true base-common-consensus = { workspace = true, features = ["reth"] } base-common-network.workspace = true -base-common-rpc-types-engine.workspace = true base-execution-chainspec.workspace = true base-execution-rpc = { workspace = true, features = ["client"] } +base-node-runner = { workspace = true, features = ["test-utils"] } metrics-exporter-prometheus.workspace = true reth-db.workspace = true reth-ipc.workspace = true diff --git a/crates/builder/multiplex/README.md b/crates/builder/multiplex/README.md index ca3ad63639..745fdd103a 100644 --- a/crates/builder/multiplex/README.md +++ b/crates/builder/multiplex/README.md @@ -12,4 +12,7 @@ Runs Base flashblocks and Base basic payload builders in parallel behind a singl - with basic-only mode enabled, starts only the basic payload builder for operation after the cutover is complete, - defaults cutover mode to disabled so startup behavior is identical to plain - `FlashblocksServiceBuilder`. + `FlashblocksServiceBuilder`, +- passes the runner's frozen-payload notification channel to the basic payload builder, so a + unified sequencer can seal a Denim block as soon as it freezes. Flashblocks builds send no + notifications. diff --git a/crates/builder/multiplex/src/service_builder.rs b/crates/builder/multiplex/src/service_builder.rs index a5dedde9f6..d9a0dfbe06 100644 --- a/crates/builder/multiplex/src/service_builder.rs +++ b/crates/builder/multiplex/src/service_builder.rs @@ -1,4 +1,5 @@ use base_builder_core::{BuilderConfig, FlashblocksServiceBuilder, NodeBounds, PoolBounds}; +use base_common_rpc_types_engine::PayloadReady; use base_execution_evm::BaseEvmConfig; use base_execution_firehose::OpFirehoseEvmConfig; use base_execution_payload_builder::config::BaseBuilderConfig; @@ -17,7 +18,7 @@ use reth_node_builder::{ }; use reth_payload_builder::{PayloadBuilderHandle, PayloadBuilderService}; use reth_provider::CanonStateSubscriptions; -use tokio::sync::mpsc; +use tokio::sync::{broadcast, mpsc}; use tracing::{error, info}; use crate::{HealthState, MultiplexRouter, RoutingConfig}; @@ -31,12 +32,19 @@ pub struct MultiplexingServiceBuilder { pub routing_config: RoutingConfig, /// Whether to run only the basic payload builder. pub basic_only: bool, + /// Optional notifications for frozen sequencer payloads from the basic payload builder. + pub payload_ready: Option>, } impl MultiplexingServiceBuilder { /// Creates a new multiplexing service builder. pub fn new(builder_config: BuilderConfig) -> Self { - Self { builder_config, routing_config: RoutingConfig::default(), basic_only: false } + Self { + builder_config, + routing_config: RoutingConfig::default(), + basic_only: false, + payload_ready: None, + } } /// Configures multiplexer runtime config. @@ -67,6 +75,7 @@ impl MultiplexingServiceBuilder { BaseBuilderConfig { da_config: self.builder_config.da_config.clone(), gas_limit_config: self.builder_config.gas_limit_config.clone(), + max_uncompressed_block_size: self.builder_config.max_uncompressed_block_size, manifest_precheck_enabled: self.builder_config.manifest_precheck_enabled, predicate_eval_hard_cutoff: self.builder_config.predicate_eval_hard_cutoff, predicate_bucket_ordered_threshold: self @@ -116,7 +125,8 @@ where evm_config.inner.clone(), self.native_payload_config(builder_config.state_provider_metrics), ) - .with_task_executor(ctx.task_executor().clone()); + .with_task_executor(ctx.task_executor().clone()) + .with_payload_ready(self.payload_ready.clone()); let payload_config = ctx.config().builder.clone(); let payload_job_config = BasicPayloadJobGeneratorConfig::default() @@ -200,7 +210,8 @@ impl BasePayloadServiceBuilder for MultiplexingServiceBuilder { BaseConsensusBuilder, >; - fn build_components(self, base_node: &BaseNode) -> Self::ComponentsBuilder { + fn build_components(mut self, base_node: &BaseNode) -> Self::ComponentsBuilder { + self.payload_ready = base_node.payload_ready.clone(); base_node.components::().payload(self) } } @@ -214,6 +225,21 @@ mod tests { use super::*; + /// Both cutover and basic-only builds retain the shared uncompressed byte cap. + #[test] + fn native_payload_config_forwards_max_uncompressed_block_size() { + for limit in [None, Some(0), Some(1_000)] { + for basic_only in [false, true] { + let config = BuilderConfig { + max_uncompressed_block_size: limit, + ..BuilderConfig::default() + }; + let service = MultiplexingServiceBuilder::new(config).with_basic_only(basic_only); + assert_eq!(service.native_payload_config(false).max_uncompressed_block_size, limit); + } + } + } + #[test] fn native_payload_config_preserves_metering_provider_and_rejection_cache() { let builder_config = BuilderConfig::default(); diff --git a/crates/builder/multiplex/tests/in_process_smoke.rs b/crates/builder/multiplex/tests/in_process_smoke.rs index 9b9a4c5e91..07b46b00da 100644 --- a/crates/builder/multiplex/tests/in_process_smoke.rs +++ b/crates/builder/multiplex/tests/in_process_smoke.rs @@ -243,10 +243,20 @@ async fn payload_builder_modes_match_flashblocks_baseline() -> eyre::Result<()> assert_eq!(baseline_head.header.hash, multiplex_head.header.hash, "genesis mismatch"); - let wall_clock = - std::time::SystemTime::now().duration_since(std::time::SystemTime::UNIX_EPOCH)?; + // Build on the last legacy block slot before Denim rather than on wall-clock time. Denim + // activated on mainnet, so wall-clock timestamps now produce post-Denim attributes, which the + // engine rejects unless they carry the BaseTime update deposit at tx[1] and follow the + // deterministic 200ms cadence. These smoke nodes build a single legacy block, so anchor the + // timestamp to the final pre-Denim slot: past every scheduled fork (so withdrawals and the + // Jovian base-fee fields are expected) and exactly one legacy interval before Denim + // activation. Keep this anchor below activation — do not add slack past it, or the test + // quietly starts depending on post-Denim attribute handling. + let schedule = BaseChainSpec::mainnet() + .denim_timestamp_schedule() + .expect("mainnet Denim schedule must be valid") + .expect("mainnet must schedule Denim"); let build_timestamp = - std::cmp::max(baseline_head.header.timestamp + 2, wall_clock.as_secs() + 2); + schedule.denim_activation_timestamp - schedule.legacy_block_interval.get(); let baseline_block = build_new_block(&baseline_provider, &baseline.auth_ipc_path, build_timestamp).await?; let disabled_block = diff --git a/crates/builder/multiplex/tests/payload_ready.rs b/crates/builder/multiplex/tests/payload_ready.rs new file mode 100644 index 0000000000..d9f98c0846 --- /dev/null +++ b/crates/builder/multiplex/tests/payload_ready.rs @@ -0,0 +1,344 @@ +//! Real-node coverage for the unified sequencer's native-builder frozen-payload channel. +//! +//! These tests use the production runner and payload service, MDBX, the real transaction pool +//! and EVM, HTTP transaction submission, and the Engine API over IPC, as the unified sequencer +//! reaches it. The test drives the CL's FCU/getPayload/newPayload sequence; L1 derivation, +//! conductor, and P2P gossip are not started. + +use std::{net::TcpListener, sync::Arc, time::Duration}; + +use alloy_eips::{BlockNumberOrTag, Encodable2718}; +use alloy_network::ReceiptResponse; +use alloy_primitives::{B64, B256, Bytes, U256}; +use alloy_provider::{Provider, RootProvider}; +use alloy_rpc_client::RpcClient; +use alloy_rpc_types_engine::{ForkchoiceState, JwtSecret, PayloadAttributes, PayloadId}; +use base_builder_core::BuilderConfig; +use base_builder_multiplex::MultiplexingServiceBuilder; +use base_common_consensus::JovianExtraData; +use base_common_network::{Base, BaseEngineApi}; +use base_common_rpc_types::BaseTransactionRequest; +use base_common_rpc_types_engine::{ + BaseExecutionPayloadEnvelopeV4, BasePayloadAttributes, PayloadReady, +}; +use base_consensus_engine::BaseEngineClient; +use base_execution_chainspec::BaseChainSpec; +use base_node_core::args::RollupArgs; +use base_node_runner::{BaseNodeRunner, LaunchedBaseNode, test_utils::L1_BLOCK_INFO_DEPOSIT_TX}; +use base_protocol::BaseTimeUpdateTx; +use base_test_utils::{Account, build_test_genesis}; +use eyre::{Result, eyre}; +use reth_db::{ClientVersion, init_db, mdbx::DatabaseArguments}; +use reth_node_builder::{NodeBuilder, NodeConfig}; +use reth_node_core::args::{DatadirArgs, NetworkArgs, RpcServerArgs}; +use reth_tasks::Runtime; +use serde_json::json; +use tempfile::TempDir; +use tokio::{sync::broadcast::error::TryRecvError, time::timeout}; +use url::Url; + +const TEST_TIMEOUT: Duration = Duration::from_secs(30); +const RPC_TIMEOUT: Duration = Duration::from_secs(5); + +/// Owns an actual execution node, including the production native payload service. +struct NativeNode { + launched: LaunchedBaseNode, + rpc: RootProvider, + engine: RootProvider, + chain_spec: Arc, + runtime: Runtime, + _datadir: TempDir, +} + +impl NativeNode { + /// Launches with the native builder selected for every block: the Denim cutover picks it + /// once Denim is active, and basic-only mode picks it before Denim, where the cutover + /// would select Flashblocks. + async fn launch(denim: bool) -> Result { + base_node_runner::test_utils::init_silenced_tracing(); + let mut genesis = build_test_genesis(); + if denim { + genesis.config.extra_fields.insert("base".into(), json!({ "denim": 0 })); + } + let params = BaseChainSpec::from_genesis(genesis.clone()) + .base_fee_params_at_timestamp(genesis.timestamp); + genesis.extra_data = JovianExtraData::encode(B64::ZERO, params, 0)?; + let chain_spec = Arc::new(BaseChainSpec::from_genesis(genesis)); + let datadir = tempfile::tempdir()?; + let mut network = NetworkArgs::default().with_unused_ports(); + network.discovery.disable_discovery = true; + let mut rpc = RpcServerArgs::default().with_unused_ports().with_http().with_auth_ipc(); + rpc.http_api = Some("eth".parse()?); + rpc.auth_ipc_path = datadir.path().join("engine.ipc").to_string_lossy().into_owned(); + let engine_url = Url::from_file_path(&rpc.auth_ipc_path) + .map_err(|()| eyre!("engine IPC path is not absolute"))?; + let config = NodeConfig::new(Arc::clone(&chain_spec)) + .with_network(network) + .with_rpc(rpc) + .with_unused_ports() + .with_datadir_args(DatadirArgs { + datadir: datadir.path().to_string_lossy().parse()?, + ..Default::default() + }); + let db = init_db( + config.datadir().db(), + DatabaseArguments::new(ClientVersion::default()) + .with_geometry_max_size(Some(100 * 1024 * 1024)), + )?; + let runtime = Runtime::test(); + // The cutover runs the Flashblocks builder beside the native one, and it binds this port. + let mut builder_config = BuilderConfig::default(); + builder_config + .flashblocks_ws_addr + .set_port(TcpListener::bind("127.0.0.1:0")?.local_addr()?.port()); + // This is the same service selection and runner handoff as `base sequencer`. + // Do not attach a sender directly to the builder: that would bypass the wiring under test. + let launched = BaseNodeRunner::new(RollupArgs::default()) + .with_service_builder( + MultiplexingServiceBuilder::new(builder_config) + .with_cutover_enabled(denim) + .with_basic_only(!denim), + ) + .launch(NodeBuilder::new(config).with_database(db).with_launch_context(runtime.clone())) + .await?; + let address = launched + .handle + .node + .rpc_server_handle() + .http_local_addr() + .ok_or_else(|| eyre!("HTTP RPC did not bind"))?; + let rpc = + RootProvider::new(RpcClient::builder().http(format!("http://{address}").parse()?)); + // The JWT is unused over IPC: socket permissions control access. + let engine = BaseEngineClient::>::rpc_client::( + engine_url, + JwtSecret::random(), + ) + .await?; + Ok(Self { launched, rpc, engine, chain_spec, runtime, _datadir: datadir }) + } + + /// Starts a real build from the canonical parent, with the scheduled system deposits. + async fn start_build(&self, no_tx_pool: bool) -> Result<(PayloadReady, Vec)> { + let parent = self + .rpc + .get_block_by_number(BlockNumberOrTag::Latest) + .await? + .ok_or_else(|| eyre!("canonical parent missing"))?; + let number = parent.header.number + 1; + let mut deposits = vec![L1_BLOCK_INFO_DEPOSIT_TX]; + let timestamp = if let Some(schedule) = self.chain_spec.denim_timestamp_schedule()? { + let (seconds, millis) = schedule.block_timestamp_parts(number); + deposits + .push(BaseTimeUpdateTx::new(millis)?.into_deposit_tx(number).encoded_2718().into()); + seconds + } else { + parent.header.timestamp + 2 + }; + let params = self.chain_spec.base_fee_params_at_timestamp(timestamp); + let attributes = BasePayloadAttributes { + payload_attributes: PayloadAttributes { + timestamp, + prev_randao: B256::ZERO, + suggested_fee_recipient: parent.header.beneficiary, + withdrawals: Some(vec![]), + parent_beacon_block_root: Some(B256::ZERO), + ..Default::default() + }, + transactions: Some(deposits.clone()), + no_tx_pool: Some(no_tx_pool), + gas_limit: Some(parent.header.gas_limit), + eip_1559_params: Some(B64::from( + ((params.max_change_denominator as u64) << 32) + | params.elasticity_multiplier as u64, + )), + min_base_fee: parent.header.base_fee_per_gas, + }; + let parent_hash = parent.header.hash; + let response = self + .engine + .fork_choice_updated_v3( + ForkchoiceState { + head_block_hash: parent_hash, + safe_block_hash: parent_hash, + finalized_block_hash: parent_hash, + }, + Some(attributes), + ) + .await?; + assert!(response.payload_status.status.is_valid()); + let payload_id = response.payload_id.ok_or_else(|| eyre!("FCU did not start a build"))?; + Ok((PayloadReady { payload_id, parent_hash }, deposits)) + } + + async fn ready(&mut self, expected: PayloadReady) -> Result<()> { + assert_eq!(timeout(RPC_TIMEOUT, self.launched.payload_ready.recv()).await??, expected); + Ok(()) + } + + async fn payload(&self, id: PayloadId) -> Result { + Ok(timeout(RPC_TIMEOUT, self.engine.get_payload_v4(id)).await??) + } + + /// Imports the retrieved payload and waits for its canonical RPC view, without fixed sleeps. + async fn insert(&self, envelope: BaseExecutionPayloadEnvelopeV4) -> Result { + let payload = &envelope.execution_payload.payload_inner.payload_inner.payload_inner; + let hash = payload.block_hash; + let parent_hash = payload.parent_hash; + let status = self + .engine + .new_payload_v4(envelope.execution_payload, envelope.parent_beacon_block_root) + .await?; + assert!(status.status.is_valid(), "retrieved payload rejected: {status:?}"); + let response = self + .engine + .fork_choice_updated_v3( + ForkchoiceState { + head_block_hash: hash, + safe_block_hash: parent_hash, + finalized_block_hash: parent_hash, + }, + None, + ) + .await?; + assert!(response.payload_status.status.is_valid()); + timeout(RPC_TIMEOUT, async { + loop { + let block = self.rpc.get_block_by_number(BlockNumberOrTag::Latest).await?.unwrap(); + if block.header.hash == hash { + break; + } + tokio::task::yield_now().await; + } + Ok::<_, eyre::Report>(()) + }) + .await??; + Ok(hash) + } + + async fn shutdown(self) -> Result<()> { + timeout(RPC_TIMEOUT, self.runtime.initiate_graceful_shutdown()?.ignore_guard()).await?; + self.launched.handle.node_exit_future.await?; + Ok(()) + } +} + +/// Signs a deterministic, funded ETH transfer rather than fabricating a pool entry or receipt. +fn transfer(nonce: u64, value: u64) -> Result<(Bytes, B256)> { + Account::Alice.sign_txn_request( + BaseTransactionRequest::default() + .to(Account::Bob.address()) + .nonce(nonce) + .value(U256::from(value)), + ) +} + +#[tokio::test(flavor = "multi_thread")] +async fn native_frozen_payload_includes_pool_tx_and_defers_post_freeze_arrival() -> Result<()> { + timeout(TEST_TIMEOUT, async { + let mut node = NativeNode::launch(true).await?; + let initial_balance = node.rpc.get_balance(Account::Bob.address()).await?; + let (first_raw, first_hash) = transfer(0, 123)?; + let pending = node.rpc.send_raw_transaction(&first_raw).await?; + assert_eq!(*pending.tx_hash(), first_hash); + let (first_ready, mut expected_transactions) = node.start_build(false).await?; + node.ready(first_ready).await?; + + // A transaction accepted after the ready signal must not alter the frozen block. + let (late_raw, late_hash) = transfer(1, 456)?; + let pending = node.rpc.send_raw_transaction(&late_raw).await?; + assert_eq!(*pending.tx_hash(), late_hash); + let first = node.payload(first_ready.payload_id).await?; + expected_transactions.push(first_raw); + assert_eq!( + first.execution_payload.payload_inner.payload_inner.payload_inner.transactions, + expected_transactions + ); + assert_eq!(node.launched.payload_ready.try_recv(), Err(TryRecvError::Empty)); + let first_block_hash = node.insert(first).await?; + let receipt = + node.rpc.get_transaction_receipt(first_hash).await?.expect("first transfer receipt"); + assert!(receipt.status()); + assert_eq!(receipt.block_hash(), Some(first_block_hash)); + assert_eq!( + node.rpc.get_balance(Account::Bob.address()).await?, + initial_balance + U256::from(123) + ); + assert_eq!(node.rpc.get_transaction_count(Account::Alice.address()).await?, 1); + assert!(node.rpc.get_transaction_receipt(late_hash).await?.is_none()); + + let (next_ready, mut expected_transactions) = node.start_build(false).await?; + assert_eq!(next_ready.parent_hash, first_block_hash); + assert_ne!(next_ready.payload_id, first_ready.payload_id); + node.ready(next_ready).await?; + let second = node.payload(next_ready.payload_id).await?; + expected_transactions.push(late_raw); + assert_eq!( + second.execution_payload.payload_inner.payload_inner.payload_inner.transactions, + expected_transactions + ); + let second_block_hash = node.insert(second).await?; + let receipt = + node.rpc.get_transaction_receipt(late_hash).await?.expect("late transfer receipt"); + assert!(receipt.status()); + assert_eq!(receipt.block_hash(), Some(second_block_hash)); + assert_eq!( + node.rpc.get_balance(Account::Bob.address()).await?, + initial_balance + U256::from(579) + ); + assert_eq!(node.rpc.get_transaction_count(Account::Alice.address()).await?, 2); + assert_eq!(node.launched.payload_ready.try_recv(), Err(TryRecvError::Empty)); + node.shutdown().await + }) + .await? +} + +#[tokio::test(flavor = "multi_thread")] +async fn native_replay_ignores_pool_without_signalling_ready() -> Result<()> { + timeout(TEST_TIMEOUT, async { + let mut node = NativeNode::launch(true).await?; + let initial_balance = node.rpc.get_balance(Account::Bob.address()).await?; + let (raw, hash) = transfer(0, 123)?; + let pending = node.rpc.send_raw_transaction(&raw).await?; + assert_eq!(*pending.tx_hash(), hash); + let (ready, deposits) = node.start_build(true).await?; + // getPayload joins the real build. Any notification would be sent before it returns, + // so absence is checked without a sleep or a race with an unfinished build. + let payload = node.payload(ready.payload_id).await?; + assert_eq!( + payload.execution_payload.payload_inner.payload_inner.payload_inner.transactions, + deposits + ); + assert_eq!(node.launched.payload_ready.try_recv(), Err(TryRecvError::Empty)); + node.insert(payload).await?; + assert!(node.rpc.get_transaction_receipt(hash).await?.is_none()); + assert_eq!(node.rpc.get_balance(Account::Bob.address()).await?, initial_balance); + node.shutdown().await + }) + .await? +} + +#[tokio::test(flavor = "multi_thread")] +async fn native_pre_denim_build_includes_pool_without_signalling_ready() -> Result<()> { + timeout(TEST_TIMEOUT, async { + let mut node = NativeNode::launch(false).await?; + let (raw, hash) = transfer(0, 123)?; + let pending = node.rpc.send_raw_transaction(&raw).await?; + assert_eq!(*pending.tx_hash(), hash); + let (ready, mut expected_transactions) = node.start_build(false).await?; + let payload = node.payload(ready.payload_id).await?; + expected_transactions.push(raw); + assert_eq!( + payload.execution_payload.payload_inner.payload_inner.payload_inner.transactions, + expected_transactions + ); + assert_eq!(node.launched.payload_ready.try_recv(), Err(TryRecvError::Empty)); + let block_hash = node.insert(payload).await?; + let receipt = + node.rpc.get_transaction_receipt(hash).await?.expect("legacy transfer receipt"); + assert!(receipt.status()); + assert_eq!(receipt.block_hash(), Some(block_hash)); + node.shutdown().await + }) + .await? +} diff --git a/crates/common/observability-events/src/event.rs b/crates/common/observability-events/src/event.rs index ce6613cbae..06cca794fc 100644 --- a/crates/common/observability-events/src/event.rs +++ b/crates/common/observability-events/src/event.rs @@ -136,6 +136,9 @@ pub enum TransactionEventType { #[serde(rename = "TXPOOL_BUILDER_FORWARD_SUCCESS")] TxpoolBuilderForwardSuccess, /// Txpool failed to forward a transaction to the builder. + /// + /// No longer emitted: the receiving builder journals the same rejection as + /// [`Self::TxpoolValidatedInsertRejected`]. Retained so historical events remain readable. #[serde(rename = "TXPOOL_BUILDER_FORWARD_FAILURE")] TxpoolBuilderForwardFailure, /// Txpool dropped a queued builder forward for a transaction. diff --git a/crates/common/rpc-types-engine/src/lib.rs b/crates/common/rpc-types-engine/src/lib.rs index 76203974d0..2f2c96a5f3 100644 --- a/crates/common/rpc-types-engine/src/lib.rs +++ b/crates/common/rpc-types-engine/src/lib.rs @@ -13,6 +13,9 @@ extern crate alloc; mod attributes; pub use attributes::BasePayloadAttributes; +mod payload_ready; +pub use payload_ready::PayloadReady; + mod envelope; pub use envelope::{ BaseExecutionPayloadEnvelope, ExecutionData, MAX_DECOMPRESSED_ENVELOPE_BYTES, diff --git a/crates/common/rpc-types-engine/src/payload_ready.rs b/crates/common/rpc-types-engine/src/payload_ready.rs new file mode 100644 index 0000000000..d26de63148 --- /dev/null +++ b/crates/common/rpc-types-engine/src/payload_ready.rs @@ -0,0 +1,14 @@ +use alloy_primitives::B256; +use alloy_rpc_types_engine::PayloadId; + +/// An execution-layer notification that a sequencer payload has finished building and is frozen. +/// +/// This in-process hint does not replace `getPayload`. Consumers must match both identifiers +/// against their active build and retain their normal seal deadline if a notification is lost. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct PayloadReady { + /// The frozen payload's Engine API identifier. + pub payload_id: PayloadId, + /// The parent the payload was built on, for rejecting stale notifications after a reset. + pub parent_hash: B256, +} diff --git a/crates/consensus/cli/Cargo.toml b/crates/consensus/cli/Cargo.toml index a557941891..2a5e06c162 100644 --- a/crates/consensus/cli/Cargo.toml +++ b/crates/consensus/cli/Cargo.toml @@ -15,6 +15,7 @@ workspace = true # workspace base-cli-utils.workspace = true base-common-network.workspace = true +base-common-rpc-types-engine.workspace = true base-jwt = { workspace = true, features = ["engine-validation"] } base-upgrade-signal = { workspace = true, features = ["metrics"] } diff --git a/crates/consensus/cli/src/node.rs b/crates/consensus/cli/src/node.rs index 07a1d4f84a..2a8a8c7bf4 100644 --- a/crates/consensus/cli/src/node.rs +++ b/crates/consensus/cli/src/node.rs @@ -7,6 +7,7 @@ use alloy_rpc_types_engine::JwtSecret; use base_cli_utils::{LogConfig, RuntimeManager}; use base_common_chains::ChainConfig; use base_common_genesis::RollupConfig; +use base_common_rpc_types_engine::PayloadReady; use base_consensus_node::{ EngineConfig, L1ConfigBuilder, NodeMode, NodeOperatingMode, RollupNode, RollupNodeBuilder, UpgradeSignalBuilderConfig, @@ -19,6 +20,7 @@ use clap::Args; use eyre::Context; use reth_node_core::args::TraceArgs; use strum::IntoEnumIterator; +use tokio::sync::broadcast; use tokio_util::sync::CancellationToken; use tracing::{error, info, warn}; use url::Url; @@ -116,7 +118,7 @@ impl ConsensusNodeCommand { } /// Options used to start a consensus rollup node. -#[derive(Debug, Clone)] +#[derive(Debug)] pub struct ConsensusNodeStartOptions { /// Rollup configuration for the node. pub rollup_config: RollupConfig, @@ -126,6 +128,8 @@ pub struct ConsensusNodeStartOptions { pub cancellation: CancellationToken, /// Startup behavior for contract-backed upgrade signal application. pub upgrade_signal_startup_mode: UpgradeSignalStartupMode, + /// Optional frozen-payload hints from an embedded execution node. + pub payload_ready: Option>, } impl ConsensusNodeStartOptions { @@ -136,9 +140,15 @@ impl ConsensusNodeStartOptions { overrides: ConsensusNodeOverrides::default(), cancellation: CancellationToken::new(), upgrade_signal_startup_mode: UpgradeSignalStartupMode::ReadAndApply, + payload_ready: None, } } + /// Enables early sealing of matching frozen payloads from embedded execution. + pub fn with_payload_ready(self, receiver: broadcast::Receiver) -> Self { + Self { payload_ready: Some(receiver), ..self } + } + /// Sets caller-supplied endpoint overrides. pub fn with_overrides(self, overrides: ConsensusNodeOverrides) -> Self { Self { overrides, ..self } @@ -661,16 +671,17 @@ impl ConsensusNodeArgs { overrides, cancellation, upgrade_signal_startup_mode, + payload_ready, } = options; - self.build_rollup_node_with_overrides_and_upgrade_signal_startup( - rollup_config, - overrides, - upgrade_signal_startup_mode, - ) - .await? - .start_with_cancellation(cancellation) - .await - .map_err(|e| { + let mut node = self + .build_rollup_node_with_overrides_and_upgrade_signal_startup( + rollup_config, + overrides, + upgrade_signal_startup_mode, + ) + .await?; + node.payload_ready = payload_ready; + node.start_with_cancellation(cancellation).await.map_err(|e| { error!(target: "rollup_node", error = %e, "Failed to start rollup node service"); eyre::eyre!(e) }) diff --git a/crates/consensus/service/src/actors/mod.rs b/crates/consensus/service/src/actors/mod.rs index 9f53b00749..3dac2d8ec0 100644 --- a/crates/consensus/service/src/actors/mod.rs +++ b/crates/consensus/service/src/actors/mod.rs @@ -64,12 +64,12 @@ pub use sequencer::{ Conductor, ConductorClient, ConductorError, DelayedL1OriginSelectorProvider, L1OriginSelector, L1OriginSelectorError, L1OriginSelectorProvider, OriginSelector, PayloadBuilder, PayloadSealer, PendingStopSender, PoolActivation, PrefetchedChainProvider, PrefetchedChainProviderError, - PreparedL1Origin, QueuedSequencerEngineClient, RecoveryModeGuard, ResetResponder, - ScheduledTicker, SealState, SealStepError, SealStepOutcome, SequencerActor, - SequencerActorError, SequencerAdminQuery, SequencerConfig, SequencerEngineClient, - SequencerEngineRequestCoordinator, SequencerEngineState, SequencerKind, ShadowCycle, - ShadowFunding, ShadowReconciliationGate, ShadowReconciliationTask, ShadowSequencingState, - UnsealedPayloadHandle, + PreparedL1Origin, QueuedSequencerEngineClient, ReadyHintDropReason, RecoveryModeGuard, + ResetResponder, ScheduledTicker, SealState, SealStepError, SealStepOutcome, SealTrigger, + SequencerActor, SequencerActorError, SequencerAdminQuery, SequencerConfig, + SequencerEngineClient, SequencerEngineRequestCoordinator, SequencerEngineState, SequencerKind, + ShadowCycle, ShadowFunding, ShadowReconciliationGate, ShadowReconciliationTask, + ShadowSequencingState, UnsealedPayloadHandle, }; #[cfg(test)] pub use sequencer::{MockConductor, MockOriginSelector, MockSequencerEngineClient}; diff --git a/crates/consensus/service/src/actors/sequencer/actor.rs b/crates/consensus/service/src/actors/sequencer/actor.rs index b4f2f0d529..e47170dcef 100644 --- a/crates/consensus/service/src/actors/sequencer/actor.rs +++ b/crates/consensus/service/src/actors/sequencer/actor.rs @@ -8,12 +8,13 @@ use std::{ use alloy_primitives::B256; use async_trait::async_trait; use base_common_genesis::RollupConfig; +use base_common_rpc_types_engine::PayloadReady; use base_consensus_derive::AttributesBuilder; use base_consensus_rpc::SequencerAdminAPIError; use base_protocol::{L2BlockInfo, to_system_config_from_payload}; use tokio::{ select, - sync::{mpsc, oneshot}, + sync::{broadcast, mpsc, oneshot}, task::JoinError, time::Interval, }; @@ -26,13 +27,13 @@ use crate::{ SequencerEngineClient, engine::{EngineClientError, EngineClientResult}, sequencer::{ - BuildPipelineState, ScheduledTicker, ShadowSequencingState, + BuildPipelineState, ReadyHintDropReason, ScheduledTicker, ShadowSequencingState, build::{BuildOutcome, PayloadBuilder, UnsealedPayloadHandle}, conductor::Conductor, error::SequencerActorError, l1_origin::OriginSelector, recovery::RecoveryModeGuard, - seal::{PayloadSealer, SealStepError, SealStepOutcome}, + seal::{PayloadSealer, SealStepError, SealStepOutcome, SealTrigger}, shadow_funding::ShadowFunding, }, }, @@ -78,8 +79,8 @@ pub struct SequencerActor< pub recovery_mode: RecoveryModeGuard, /// The rollup configuration. pub rollup_config: Arc, - /// Fixed offset into each subsecond slot at which the sealed payload is requested from - /// the engine once Denim is active. See [`SequencerConfig::seal_offset`]. + /// Fallback offset for requesting a Denim payload if no matching frozen-payload hint arrives. + /// See [`SequencerConfig::seal_offset`]. /// /// [`SequencerConfig::seal_offset`]: crate::SequencerConfig::seal_offset pub seal_offset: Duration, @@ -91,6 +92,8 @@ pub struct SequencerActor< /// Stashed response sender for a pending `stop_sequencer` call that is waiting /// for the in-flight seal pipeline to complete before responding. pub pending_stop: Option, + /// Optional frozen-payload hints from the embedded EL; the seal ticker remains the fallback. + pub payload_ready: Option>, } impl< @@ -316,7 +319,7 @@ where *shadow = Some(ShadowSequencingState::new(canonical_head)?); if self.is_active { let outcome = self.builder.build_on(canonical_head, self.shadow_funding).await?; - Self::apply_eager_build_outcome(outcome, pipeline, build_ticker); + self.apply_eager_build_outcome(outcome, pipeline, build_ticker); } else { pipeline.next_payload_to_seal = None; } @@ -345,9 +348,9 @@ where .inspect_err(|_| self.cancellation_token.cancel()) } - /// Wall-clock time at which `block_number` should be sealed. + /// Wall-clock deadline for sealing `block_number` if it has not already frozen. /// - /// Denim-active blocks seal at a fixed offset into their 200ms slot, computed as + /// Denim-active blocks fall back to a fixed offset into their 200ms slot, computed as /// `T_N − (interval − seal_offset)` so the first Denim block still seals relative to /// its own timestamp. The target ignores how long the previous seal took: lateness /// shrinks the current build window instead of shifting the schedule. @@ -379,6 +382,22 @@ where self.block_seal_target(block_number.saturating_add(1), last_seal_duration) } + /// Wall-clock time `handle`'s build was scheduled to start: its parent's timestamp. + pub fn slot_start(&self, handle: &UnsealedPayloadHandle) -> SystemTime { + let parent_number = handle.attributes_with_parent.parent().block_info.number; + UNIX_EPOCH + + Duration::from_millis(self.rollup_config.l2_block_timestamp_millis(parent_number)) + } + + /// Records how long after its scheduled start `handle`'s build was requested from the engine. + pub fn record_build_start(&self, handle: &UnsealedPayloadHandle) { + let offset = handle + .build_requested_at + .duration_since(self.slot_start(handle)) + .unwrap_or(Duration::ZERO); + Metrics::sequencer_build_start_offset_seconds().record(offset); + } + /// Handles one admin API query received while the main loop is running, applying any /// resulting shadow-cycle reset and active-state bookkeeping. async fn handle_admin_query_tick( @@ -437,7 +456,7 @@ where .reconcile(head)?; if self.is_active { let outcome = self.builder.build_on(head, self.shadow_funding).await?; - Self::apply_eager_build_outcome(outcome, pipeline, build_ticker); + self.apply_eager_build_outcome(outcome, pipeline, build_ticker); } } // The gate is not ready until every canonical P2P payload has arrived. Back off one @@ -539,12 +558,14 @@ where /// Stores a build started outside the normal ticker path, scheduling only outcomes that need /// another attempt. A ready payload keeps the ticker target already owned by the caller. fn apply_eager_build_outcome( + &self, outcome: BuildOutcome, pipeline: &mut BuildPipelineState, build_ticker: &mut ScheduledTicker, ) { match outcome { BuildOutcome::Ready(payload) => { + self.record_build_start(&payload); build_ticker.reset_l1_origin_retry_budget(); pipeline.next_payload_to_seal = Some(payload); } @@ -564,6 +585,7 @@ where ) { match outcome { BuildOutcome::Ready(payload) => { + self.record_build_start(&payload); let target = self.block_seal_target(payload.block_number(), pipeline.last_seal_duration); build_ticker.reset_l1_origin_retry_budget(); @@ -602,8 +624,16 @@ where ) -> Result<(), SequencerActorError> { let handle = pipeline.next_payload_to_seal.take().expect("caller checked Some"); let handle_block_number = handle.block_number(); + let payload_id = handle.payload_id; + let trigger = if handle.frozen { SealTrigger::ReadyHint } else { SealTrigger::Deadline }; + let request_offset = + SystemTime::now().duration_since(self.slot_start(&handle)).unwrap_or(Duration::ZERO); match self.try_seal_handle(handle).await? { Some((new_sealer, dur)) => { + Metrics::sequencer_seals_total(trigger.as_str()).increment(1); + Metrics::sequencer_get_payload_offset_seconds(trigger.as_str()) + .record(request_offset); + pipeline.sealed_payload_id = Some(payload_id); pipeline.last_seal_duration = dur; self.sealer = Some(new_sealer); let target = @@ -634,6 +664,66 @@ where Ok(()) } + /// Wakes the seal ticker only for a frozen payload belonging to the active Denim build, and + /// counts every other hint by the reason it was dropped. + pub fn handle_payload_ready( + &self, + ready: PayloadReady, + pipeline: &mut BuildPipelineState, + build_ticker: &mut ScheduledTicker, + ) { + match self.ready_hint_drop_reason(ready, pipeline) { + Some(reason) => { + Metrics::sequencer_payload_ready_hints_dropped_total(reason.as_str()).increment(1); + } + None => { + if let Some(handle) = &mut pipeline.next_payload_to_seal { + handle.frozen = true; + } + build_ticker.reset_immediately(); + } + } + } + + /// Returns why `ready` cannot seal the active build, or `None` if it matches that build. + pub fn ready_hint_drop_reason( + &self, + ready: PayloadReady, + pipeline: &BuildPipelineState, + ) -> Option { + if self.sealer.is_some() { + return Some(ReadyHintDropReason::AlreadySealing); + } + if !self.is_active { + return Some(ReadyHintDropReason::Inactive); + } + let active_build = pipeline + .next_payload_to_seal + .as_ref() + .filter(|handle| handle.payload_id == ready.payload_id); + let Some(handle) = active_build else { + // Only a hint that matches no active build can have lost the race to the deadline: + // a rebuild of the last sealed block reuses its payload id and must still seal early. + return Some(if pipeline.sealed_payload_id == Some(ready.payload_id) { + ReadyHintDropReason::AlreadySealing + } else if pipeline.next_payload_to_seal.is_none() { + ReadyHintDropReason::NoBuild + } else { + ReadyHintDropReason::PayloadIdMismatch + }); + }; + if ready.parent_hash != handle.attributes_with_parent.parent().block_info.hash { + return Some(ReadyHintDropReason::ParentMismatch); + } + if !self + .rollup_config + .is_denim_active(self.rollup_config.l2_block_timestamp(handle.block_number())) + { + return Some(ReadyHintDropReason::PreDenim); + } + None + } + /// Dispatches one build-ticker tick to whichever of the three build states is active: /// a queued child build gated on its parent's timestamp, an in-flight payload ready to seal, /// or neither, in which case a fresh build is started on the current unsafe head. @@ -753,6 +843,24 @@ where result, ).await?; } + ready = async { + match self.payload_ready.as_mut() { + Some(receiver) => receiver.recv().await, + None => std::future::pending().await, + } + }, if self.sealer.is_none() => { + match ready { + Ok(ready) => self.handle_payload_ready(ready, &mut pipeline, &mut build_ticker), + Err(broadcast::error::RecvError::Lagged(skipped)) => { + Metrics::sequencer_payload_ready_hints_dropped_total( + ReadyHintDropReason::Lagged.as_str(), + ) + .increment(skipped); + debug!(target: "sequencer", skipped, "Lagged frozen-payload hints; seal deadline remains active"); + } + Err(broadcast::error::RecvError::Closed) => self.payload_ready = None, + } + } // Tick is gated on `self.sealer.is_none()` to make the ticker and sealer arms // mutually exclusive. In catch-up mode reset_immediately() fires every tick, // making the ticker Poll::Ready at the same time as the sealer's step().await @@ -803,21 +911,32 @@ mod tests { use alloy_primitives::{B256, Sealed}; use alloy_rpc_types_engine::{ForkchoiceUpdated, PayloadId, PayloadStatus, PayloadStatusEnum}; use base_common_consensus::{BaseBlock, BaseTxEnvelope, TxDeposit}; - use base_common_genesis::{ChainGenesis, RollupConfig, SystemConfig, UpgradeConfig}; + use base_common_genesis::{ + BaseUpgradeConfig, ChainGenesis, RollupConfig, SystemConfig, UpgradeConfig, + }; use base_common_rpc_types_engine::{ BaseExecutionPayload, BaseExecutionPayloadEnvelope, BasePayloadAttributes, }; use base_consensus_derive::test_utils::TestAttributesBuilder; use base_consensus_engine::{Engine, test_utils::TestEngineStateBuilder}; - use base_protocol::{BlockInfo, L1BlockInfoBedrock}; + use base_protocol::{AttributesWithParent, BlockInfo, L1BlockInfoBedrock}; + use futures::FutureExt; + #[cfg(feature = "metrics")] + use metrics_util::{ + CompositeKey, + debugging::{DebugValue, DebuggingRecorder}, + }; use rstest::rstest; use tokio::sync::watch; use super::*; + #[cfg(feature = "metrics")] + use crate::L1OriginSelectorError; use crate::{ EngineActorRequest, EngineProcessor, EngineRequestReceiver, MockConductor, - MockEngineDerivationClient, MockOriginSelector, MockUnsafePayloadGossipClient, - QueuedSequencerEngineClient, SequencerEngineRequestCoordinator, + MockEngineDerivationClient, MockOriginSelector, MockSequencerEngineClient, + MockUnsafePayloadGossipClient, QueuedSequencerEngineClient, + SequencerEngineRequestCoordinator, actors::sequencer::tests::test_actor, test_utils::{EngineClientCall, FakeEngineClient, ScriptedForkchoiceResponse}, }; @@ -854,6 +973,7 @@ mod tests { unsafe_payload_gossip_client: MockUnsafePayloadGossipClient::new(), sealer: None, pending_stop: None, + payload_ready: None, }; let actor = tokio::spawn(actor.start(())); let EngineActorRequest::ResetRequest(reset) = @@ -1012,6 +1132,7 @@ mod tests { unsafe_payload_gossip_client: gossip, sealer: None, pending_stop: None, + payload_ready: None, }; let actor = tokio::spawn(actor.start(())); if during_backoff { @@ -1054,6 +1175,535 @@ mod tests { } } + #[cfg(feature = "metrics")] + type RecordedMetric = + (CompositeKey, Option, Option, DebugValue); + + /// Returns what was recorded for the `base_node` metric `name` carrying `label`, if anything. + #[cfg(feature = "metrics")] + fn recorded<'a>( + metrics: &'a [RecordedMetric], + name: &str, + label: (&str, &str), + ) -> Option<&'a DebugValue> { + metrics + .iter() + .find(|(key, ..)| { + key.key().name() == format!("base_node.{name}") + && key.key().labels().any(|l| (l.key(), l.value()) == label) + }) + .map(|(.., value)| value) + } + + /// Returns the samples of a histogram recorded exactly once per label. + #[cfg(feature = "metrics")] + fn recorded_samples(metrics: &[RecordedMetric], name: &str, label: (&str, &str)) -> Vec { + match recorded(metrics, name, label) { + Some(DebugValue::Histogram(samples)) => { + samples.iter().map(|sample| sample.into_inner()).collect() + } + other => panic!("expected a {name} histogram for {label:?}, got {other:?}"), + } + } + + #[rstest] + #[case("ready", true)] + #[case("lagged", true)] + #[case("closed", false)] + #[case("missing", false)] + #[tokio::test(start_paused = true)] + async fn actor_receives_ready_hints_or_uses_deadline( + #[case] delivery: &'static str, + #[case] early: bool, + ) { + #[cfg(feature = "metrics")] + let recorder = DebuggingRecorder::new(); + #[cfg(feature = "metrics")] + let snapshotter = recorder.snapshotter(); + #[cfg(feature = "metrics")] + let _metrics_guard = metrics::set_default_local_recorder(&recorder); + + let mut actor = test_actor(); + let future = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() + 10; + let config = Arc::new(RollupConfig { + genesis: ChainGenesis { l2_time: future, ..Default::default() }, + block_time: 2, + upgrades: UpgradeConfig { + base: BaseUpgradeConfig { denim: Some(0), ..Default::default() }, + ..Default::default() + }, + ..Default::default() + }); + actor.rollup_config = Arc::clone(&config); + actor.builder.rollup_config = config; + let mut attributes = BasePayloadAttributes::default(); + attributes.payload_attributes.timestamp = future; + actor.builder.attributes_builder.attributes = vec![Ok(attributes)]; + actor + .builder + .origin_selector + .expect_next_l1_origin() + .times(1) + .return_once(|_| Ok(BlockInfo::default())); + let (tx, rx) = broadcast::channel(1); + actor.payload_ready = Some(rx); + let keepalive = (delivery == "missing").then(|| tx.clone()); + let (built_tx, built_rx) = oneshot::channel(); + let (sealed_tx, mut sealed_rx) = oneshot::channel(); + let cancel = actor.cancellation_token.clone(); + let mut engine = MockSequencerEngineClient::new(); + engine.expect_reset_engine_forkchoice().times(1).return_once(|_| Ok(())); + engine.expect_get_unsafe_head().times(2).returning(|| Ok(L2BlockInfo::default())); + engine.expect_start_build_block().times(1).return_once(move |attributes| { + let id = PayloadId::new([7; 8]); + let ready = + PayloadReady { payload_id: id, parent_hash: attributes.parent().block_info.hash }; + if delivery == "ready" || delivery == "lagged" { + tx.send(ready).unwrap(); + if delivery == "lagged" { + tx.send(ready).unwrap(); + } + } + // Notify before FCU returns: the actor must retain this fast-build signal. + built_tx.send(()).unwrap(); + Ok(id) + }); + engine.expect_get_sealed_payload().times(1).return_once(move |id, _| { + assert_eq!(id, PayloadId::new([7; 8])); + sealed_tx.send(()).unwrap(); + cancel.cancel(); + Ok(valid_sealer().0.envelope) + }); + let engine = Arc::new(engine); + actor.engine_client = Arc::clone(&engine); + actor.builder.engine_client = engine; + let task = tokio::spawn(actor.start(())); + built_rx.await.unwrap(); + let first = tokio::time::timeout(Duration::from_secs(1), &mut sealed_rx).await; + if early { + first.expect("ready hint must fetch before the seal deadline").unwrap(); + } else { + assert!(first.is_err(), "no hint must preserve the scheduled seal"); + tokio::time::timeout(Duration::from_secs(20), sealed_rx).await.unwrap().unwrap(); + } + task.await.unwrap().unwrap(); + drop(keepalive); + + #[cfg(feature = "metrics")] + { + let metrics = snapshotter.snapshot().into_vec(); + let (trigger, other) = + if early { ("ready_hint", "deadline") } else { ("deadline", "ready_hint") }; + assert_eq!( + recorded(&metrics, "sequencer_seals_total", ("trigger", trigger)), + Some(&DebugValue::Counter(1)) + ); + assert_eq!(recorded(&metrics, "sequencer_seals_total", ("trigger", other)), None); + // Two hints into a one-slot channel overwrite the first before the actor reads it. + let lagged = (delivery == "lagged").then_some(DebugValue::Counter(1)); + assert_eq!( + recorded( + &metrics, + "sequencer_payload_ready_hints_dropped_total", + ("reason", "lagged") + ), + lagged.as_ref() + ); + } + } + + /// Seals block 1, whose slot began when its parent's timestamp passed about five seconds + /// ago. + #[cfg(feature = "metrics")] + #[rstest] + #[case::ready_hint(true, "ready_hint", "deadline")] + #[case::deadline(false, "deadline", "ready_hint")] + #[tokio::test(start_paused = true)] + async fn seal_records_its_trigger_and_get_payload_offset_from_slot_start( + #[case] hinted: bool, + #[case] trigger: &str, + #[case] other: &str, + ) { + let recorder = DebuggingRecorder::new(); + let snapshotter = recorder.snapshotter(); + let _metrics_guard = metrics::set_default_local_recorder(&recorder); + + let mut actor = test_actor(); + let slot_start = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() - 5; + let config = Arc::make_mut(&mut actor.rollup_config); + config.block_time = 2; + config.genesis.l2_time = slot_start; + config.upgrades.base.denim = Some(0); + let (ready, mut pipeline) = ready_build(); + let parent = + *pipeline.next_payload_to_seal.as_ref().unwrap().attributes_with_parent.parent(); + let (sealer, _, _) = valid_sealer(); + let since_slot_start = + move || (UNIX_EPOCH + Duration::from_secs(slot_start)).elapsed().unwrap().as_secs_f64(); + let (at_request_tx, at_request_rx) = std::sync::mpsc::channel(); + let mut engine = MockSequencerEngineClient::new(); + engine.expect_get_unsafe_head().times(1).return_once(move || Ok(parent)); + engine.expect_get_sealed_payload().times(1).return_once(move |_, _| { + at_request_tx.send(since_slot_start()).unwrap(); + // Make an offset taken after the engine responds measurably later than the request. + std::thread::sleep(Duration::from_millis(2)); + Ok(sealer.envelope) + }); + actor.engine_client = Arc::new(engine); + let mut ticker = ScheduledTicker::new(Duration::from_secs(2)); + + let before = since_slot_start(); + if hinted { + actor.handle_payload_ready(ready, &mut pipeline, &mut ticker); + } + actor.handle_build_tick(&mut pipeline, &mut ticker, None).await.unwrap(); + let at_request = at_request_rx.try_recv().unwrap(); + + let metrics = snapshotter.snapshot().into_vec(); + assert_eq!( + recorded(&metrics, "sequencer_seals_total", ("trigger", trigger)), + Some(&DebugValue::Counter(1)) + ); + let requested = recorded_samples( + &metrics, + "sequencer_get_payload_offset_seconds", + ("trigger", trigger), + ); + assert_eq!(requested.len(), 1); + // The offset counts from the parent's timestamp, 200 ms before the block's own. + assert!((before..=at_request).contains(&requested[0]), "getPayload offset {requested:?}"); + for name in ["sequencer_seals_total", "sequencer_get_payload_offset_seconds"] { + assert_eq!(recorded(&metrics, name, ("trigger", other)), None); + } + } + + /// Returns every recorded build start offset, in seconds. + #[cfg(feature = "metrics")] + fn build_start_offsets(metrics: &[RecordedMetric]) -> Vec { + let mut offsets = Vec::new(); + for (key, .., value) in metrics { + if key.key().name() != "base_node.sequencer_build_start_offset_seconds" { + continue; + } + let DebugValue::Histogram(samples) = value else { + panic!("build start offset must be a histogram, got {value:?}"); + }; + offsets.extend(samples.iter().map(|sample| sample.into_inner())); + } + offsets + } + + /// Builds block 1 on a parent whose timestamp passed about five seconds ago. + #[cfg(feature = "metrics")] + #[tokio::test(start_paused = true)] + async fn build_records_when_it_was_requested_relative_to_its_parents_timestamp() { + let recorder = DebuggingRecorder::new(); + let snapshotter = recorder.snapshotter(); + let _metrics_guard = metrics::set_default_local_recorder(&recorder); + + let mut actor = test_actor(); + let slot_start = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() - 5; + let config = Arc::make_mut(&mut actor.rollup_config); + config.block_time = 2; + config.genesis.l2_time = slot_start; + config.upgrades.base.denim = Some(0); + actor.builder.rollup_config = Arc::clone(&actor.rollup_config); + actor.builder.attributes_builder.attributes = vec![Ok(BasePayloadAttributes::default())]; + actor + .builder + .origin_selector + .expect_next_l1_origin() + .times(1) + .return_once(|_| Ok(BlockInfo::default())); + let since_slot_start = + move || (UNIX_EPOCH + Duration::from_secs(slot_start)).elapsed().unwrap().as_secs_f64(); + let (at_request_tx, at_request_rx) = std::sync::mpsc::channel(); + let mut engine = MockSequencerEngineClient::new(); + engine.expect_start_build_block().times(1).return_once(move |_| { + at_request_tx.send(since_slot_start()).unwrap(); + // Make an offset taken after the engine responds measurably later than the request. + std::thread::sleep(Duration::from_millis(2)); + Ok(PayloadId::new([7; 8])) + }); + actor.builder.engine_client = Arc::new(engine); + let mut pipeline = BuildPipelineState { + pending_build_parent: Some(L2BlockInfo::default()), + ..Default::default() + }; + let mut ticker = ScheduledTicker::new(Duration::from_secs(2)); + + let before = since_slot_start(); + actor.handle_build_tick(&mut pipeline, &mut ticker, None).await.unwrap(); + + assert!(pipeline.next_payload_to_seal.is_some()); + let offsets = build_start_offsets(&snapshotter.snapshot().into_vec()); + let at_request = at_request_rx.try_recv().unwrap(); + // The offset counts from the parent's timestamp, 200 ms before the block's own. + assert_eq!(offsets.len(), 1); + assert!((before..=at_request).contains(&offsets[0]), "build start offset {offsets:?}"); + } + + /// Builds started outside the ticker, as after a shadow reset, report their start too. + #[cfg(feature = "metrics")] + #[rstest] + #[case::ready(true, vec![0.03])] + #[case::deferred(false, vec![])] + #[tokio::test(start_paused = true)] + async fn eager_build_records_its_start_only_when_requested( + #[case] requested: bool, + #[case] expected: Vec, + ) { + let recorder = DebuggingRecorder::new(); + let snapshotter = recorder.snapshotter(); + let _metrics_guard = metrics::set_default_local_recorder(&recorder); + + let mut actor = test_actor(); + let config = Arc::make_mut(&mut actor.rollup_config); + config.block_time = 2; + config.genesis.l2_time = 100; + let (_, mut pipeline) = ready_build(); + // The parent is genesis, whose timestamp is 100 s; the build was requested 30 ms later. + let mut handle = pipeline.next_payload_to_seal.take().unwrap(); + handle.build_requested_at = UNIX_EPOCH + Duration::from_millis(100_030); + let outcome = + if requested { BuildOutcome::Ready(handle) } else { BuildOutcome::AwaitingL1Origin }; + let mut ticker = ScheduledTicker::new(Duration::from_secs(2)); + + actor.apply_eager_build_outcome(outcome, &mut pipeline, &mut ticker); + + assert_eq!(pipeline.next_payload_to_seal.is_some(), requested); + assert_eq!(build_start_offsets(&snapshotter.snapshot().into_vec()), expected); + } + + /// A tick that cannot start a build, here for want of an L1 origin, has no build to time. + #[cfg(feature = "metrics")] + #[tokio::test(start_paused = true)] + async fn deferred_build_records_no_build_start() { + let recorder = DebuggingRecorder::new(); + let snapshotter = recorder.snapshotter(); + let _metrics_guard = metrics::set_default_local_recorder(&recorder); + + let mut actor = test_actor(); + actor + .builder + .origin_selector + .expect_next_l1_origin() + .times(1) + .return_once(|_| Err(L1OriginSelectorError::NotEnoughData(BlockInfo::default()))); + let mut pipeline = BuildPipelineState { + pending_build_parent: Some(L2BlockInfo::default()), + ..Default::default() + }; + let mut ticker = ScheduledTicker::new(Duration::from_secs(2)); + + actor.handle_build_tick(&mut pipeline, &mut ticker, None).await.unwrap(); + + assert!(pipeline.next_payload_to_seal.is_none()); + assert_eq!(build_start_offsets(&snapshotter.snapshot().into_vec()), Vec::::new()); + } + + /// A rebuild of the hinted block reuses its payload id, but seals on its own schedule until + /// the execution layer reports the rebuild frozen. + #[cfg(feature = "metrics")] + #[tokio::test(start_paused = true)] + async fn hint_for_a_replaced_build_does_not_mark_its_rebuild() { + let recorder = DebuggingRecorder::new(); + let snapshotter = recorder.snapshotter(); + let _metrics_guard = metrics::set_default_local_recorder(&recorder); + + let mut actor = test_actor(); + Arc::make_mut(&mut actor.rollup_config).upgrades.base.denim = Some(0); + let (ready, mut pipeline) = ready_build(); + let parent = + *pipeline.next_payload_to_seal.as_ref().unwrap().attributes_with_parent.parent(); + let mut ticker = ScheduledTicker::new(Duration::from_secs(2)); + actor.handle_payload_ready(ready, &mut pipeline, &mut ticker); + // A stop and restart rebuilds the same block before the woken ticker is serviced. + pipeline.next_payload_to_seal = ready_build().1.next_payload_to_seal; + let (sealer, _, _) = valid_sealer(); + let mut engine = MockSequencerEngineClient::new(); + engine.expect_get_unsafe_head().times(1).return_once(move || Ok(parent)); + engine.expect_get_sealed_payload().times(1).return_once(move |_, _| Ok(sealer.envelope)); + actor.engine_client = Arc::new(engine); + + actor.handle_build_tick(&mut pipeline, &mut ticker, None).await.unwrap(); + + let metrics = snapshotter.snapshot().into_vec(); + assert_eq!( + recorded(&metrics, "sequencer_seals_total", ("trigger", "deadline")), + Some(&DebugValue::Counter(1)) + ); + assert_eq!(recorded(&metrics, "sequencer_seals_total", ("trigger", "ready_hint")), None); + } + + fn ready_build() -> (PayloadReady, BuildPipelineState) { + let ready = + PayloadReady { payload_id: PayloadId::new([7; 8]), parent_hash: B256::repeat_byte(8) }; + let parent = L2BlockInfo { + block_info: BlockInfo { hash: ready.parent_hash, ..Default::default() }, + ..Default::default() + }; + let handle = UnsealedPayloadHandle { + payload_id: ready.payload_id, + attributes_with_parent: AttributesWithParent::new( + BasePayloadAttributes::default(), + parent, + None, + false, + ), + frozen: false, + build_requested_at: SystemTime::now(), + }; + (ready, BuildPipelineState { next_payload_to_seal: Some(handle), ..Default::default() }) + } + + #[tokio::test(start_paused = true)] + async fn frozen_hint_fetches_payload_before_deadline_once() { + let mut actor = test_actor(); + Arc::make_mut(&mut actor.rollup_config).upgrades.base.denim = Some(0); + let (ready, mut pipeline) = ready_build(); + let parent = + *pipeline.next_payload_to_seal.as_ref().unwrap().attributes_with_parent.parent(); + let (sealer, _, _) = valid_sealer(); + let mut engine = MockSequencerEngineClient::new(); + engine.expect_get_unsafe_head().times(1).return_once(move || Ok(parent)); + engine + .expect_get_sealed_payload() + .times(1) + .withf(move |id, _| *id == ready.payload_id) + .return_once(move |_, _| Ok(sealer.envelope)); + actor.engine_client = Arc::new(engine); + let mut ticker = ScheduledTicker::new(Duration::from_secs(2)); + ticker.reset_at(SystemTime::now() + Duration::from_secs(10)); + assert!(ticker.tick().now_or_never().is_none()); + actor.handle_payload_ready(ready, &mut pipeline, &mut ticker); + assert!(ticker.tick().now_or_never().is_some()); + actor.handle_build_tick(&mut pipeline, &mut ticker, None).await.unwrap(); + assert!(actor.sealer.is_some()); + assert!(pipeline.next_payload_to_seal.is_none()); + // A duplicate cannot wake the ticker while the payload is already sealing. + ticker.reset_at(SystemTime::now() + Duration::from_secs(10)); + actor.handle_payload_ready(ready, &mut pipeline, &mut ticker); + assert!(ticker.tick().now_or_never().is_none()); + } + + #[rstest] + #[case("wrong_id", "payload_id_mismatch")] + #[case("wrong_parent", "parent_mismatch")] + #[case("stopped", "inactive")] + #[case("already_sealing", "already_sealing")] + #[case("sealed_before_next_build", "already_sealing")] + #[case("sealed_after_next_build", "already_sealing")] + #[case("pre_denim", "pre_denim")] + #[case("no_build", "no_build")] + #[tokio::test(start_paused = true)] + async fn unrelated_ready_hints_preserve_seal_deadline( + #[case] scenario: &str, + #[case] reason: &str, + ) { + #[cfg(feature = "metrics")] + let recorder = DebuggingRecorder::new(); + #[cfg(feature = "metrics")] + let snapshotter = recorder.snapshotter(); + #[cfg(feature = "metrics")] + let _metrics_guard = metrics::set_default_local_recorder(&recorder); + + let mut actor = test_actor(); + Arc::make_mut(&mut actor.rollup_config).upgrades.base.denim = Some(0); + let (mut ready, mut pipeline) = ready_build(); + match scenario { + "wrong_id" => ready.payload_id = PayloadId::new([9; 8]), + "wrong_parent" => ready.parent_hash = B256::repeat_byte(9), + "stopped" => actor.is_active = false, + "already_sealing" => actor.sealer = Some(valid_sealer().0), + // The seal deadline fetched this payload before its hint was read. + "sealed_before_next_build" => { + pipeline.sealed_payload_id = + pipeline.next_payload_to_seal.take().map(|handle| handle.payload_id); + } + "sealed_after_next_build" => { + pipeline.sealed_payload_id = Some(ready.payload_id); + pipeline.next_payload_to_seal.as_mut().unwrap().payload_id = PayloadId::new([9; 8]); + } + "pre_denim" => { + Arc::make_mut(&mut actor.rollup_config).upgrades.base = BaseUpgradeConfig::default() + } + "no_build" => pipeline.next_payload_to_seal = None, + _ => unreachable!(), + } + assert_eq!( + actor.ready_hint_drop_reason(ready, &pipeline).map(ReadyHintDropReason::as_str), + Some(reason) + ); + let mut ticker = ScheduledTicker::new(Duration::from_secs(2)); + ticker.reset_at(SystemTime::now() + Duration::from_secs(10)); + actor.handle_payload_ready(ready, &mut pipeline, &mut ticker); + assert!(ticker.tick().now_or_never().is_none()); + tokio::time::advance(Duration::from_secs(10)).await; + assert!(ticker.tick().now_or_never().is_some()); + + #[cfg(feature = "metrics")] + { + let dropped: Vec<_> = snapshotter + .snapshot() + .into_vec() + .into_iter() + .filter(|(key, ..)| { + key.key().name() == "base_node.sequencer_payload_ready_hints_dropped_total" + }) + .map(|(key, .., value)| { + (key.key().labels().next().unwrap().value().to_owned(), value) + }) + .collect(); + assert_eq!(dropped, [(reason.to_owned(), DebugValue::Counter(1))]); + } + } + + /// Payload ids are derived from the parent and attributes, so rebuilding the block that was + /// sealed last, as after an engine reset, reuses its id. + #[tokio::test(start_paused = true)] + async fn hint_for_a_rebuild_of_the_last_sealed_payload_seals_early() { + let mut actor = test_actor(); + Arc::make_mut(&mut actor.rollup_config).upgrades.base.denim = Some(0); + let (ready, mut pipeline) = ready_build(); + pipeline.sealed_payload_id = Some(ready.payload_id); + let mut ticker = ScheduledTicker::new(Duration::from_secs(2)); + ticker.reset_at(SystemTime::now() + Duration::from_secs(10)); + + actor.handle_payload_ready(ready, &mut pipeline, &mut ticker); + + assert!(ticker.tick().now_or_never().is_some()); + } + + #[tokio::test(start_paused = true)] + async fn early_insertion_keeps_next_build_at_parent_timestamp() { + let mut actor = test_actor(); + let future = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_secs() + 30; + Arc::make_mut(&mut actor.rollup_config).genesis.l2_time = future; + Arc::make_mut(&mut actor.rollup_config).upgrades.base.denim = Some(0); + let (sealer, head, _) = valid_sealer(); + actor.sealer = Some(sealer); + let mut pipeline = BuildPipelineState::default(); + let mut ticker = ScheduledTicker::new(Duration::from_secs(2)); + let mut reconciliation = tokio::time::interval(Duration::from_secs(2)); + actor + .handle_seal_step_result( + &mut pipeline, + &mut None, + &mut reconciliation, + &mut ticker, + Ok(SealStepOutcome::Inserted(head)), + ) + .await + .unwrap(); + assert_eq!(pipeline.pending_build_parent, Some(head)); + assert!(ticker.tick().now_or_never().is_none()); + tokio::time::advance(Duration::from_secs(29)).await; + assert!(ticker.tick().now_or_never().is_none()); + tokio::time::advance(Duration::from_secs(2)).await; + assert!(ticker.tick().now_or_never().is_some()); + } + fn valid_sealer() -> (PayloadSealer, L2BlockInfo, SystemConfig) { let block = BaseBlock { header: alloy_consensus::Header { number: 1, ..Default::default() }, diff --git a/crates/consensus/service/src/actors/sequencer/build.rs b/crates/consensus/service/src/actors/sequencer/build.rs index 4b4da5db5f..b5bc152138 100644 --- a/crates/consensus/service/src/actors/sequencer/build.rs +++ b/crates/consensus/service/src/actors/sequencer/build.rs @@ -5,7 +5,10 @@ //! why a build could not start, and [`UnsealedPayloadHandle`], which carries the //! resulting payload identifier forward to the seal stage. -use std::{sync::Arc, time::Instant}; +use std::{ + sync::Arc, + time::{Instant, SystemTime}, +}; use alloy_rpc_types_engine::PayloadId; use base_common_genesis::RollupConfig; @@ -44,6 +47,12 @@ pub struct UnsealedPayloadHandle { pub payload_id: PayloadId, /// The [`AttributesWithParent`] used to start block building. pub attributes_with_parent: AttributesWithParent, + /// Whether the execution layer reported this payload frozen, waking the seal ticker before + /// the seal deadline. + pub frozen: bool, + /// Wall-clock time the build was requested from the engine. A Denim build reads the + /// transaction pool once, after this request. + pub build_requested_at: SystemTime, } impl UnsealedPayloadHandle { @@ -121,6 +130,7 @@ impl PayloadB Metrics::sequencer_attributes_build_duration().record(attributes_build_start.elapsed()); let build_request_start = Instant::now(); + let build_requested_at = SystemTime::now(); let payload_id = self.engine_client.start_build_block(attributes_with_parent.clone()).await?; @@ -128,7 +138,12 @@ impl PayloadB Metrics::sequencer_block_building_start_task_duration() .record(build_request_start.elapsed()); - Ok(BuildOutcome::Ready(UnsealedPayloadHandle { payload_id, attributes_with_parent })) + Ok(BuildOutcome::Ready(UnsealedPayloadHandle { + payload_id, + attributes_with_parent, + frozen: false, + build_requested_at, + })) } /// Determines and validates the L1 origin block for the provided L2 unsafe head. diff --git a/crates/consensus/service/src/actors/sequencer/config.rs b/crates/consensus/service/src/actors/sequencer/config.rs index f4272b2f5f..7070eac4aa 100644 --- a/crates/consensus/service/src/actors/sequencer/config.rs +++ b/crates/consensus/service/src/actors/sequencer/config.rs @@ -39,9 +39,9 @@ pub struct SequencerConfig { pub l1_conf_delay: u64, /// Request timeout for L1 RPC calls on the sequencer block-production hot path. pub l1_rpc_timeout: Duration, - /// Fixed offset into each subsecond slot at which the sealed payload is requested from - /// the engine once Denim is active. Must agree with the builder-side transaction - /// cutoff, which defaults from the same constant + /// Fallback offset into each subsecond slot for requesting the sealed payload once Denim + /// is active. A matching frozen-payload hint may trigger the request sooner. Must agree + /// with the builder-side transaction cutoff, which defaults from the same constant /// ([`base_protocol::DEFAULT_SEAL_OFFSET`]). pub seal_offset: Duration, } diff --git a/crates/consensus/service/src/actors/sequencer/mod.rs b/crates/consensus/service/src/actors/sequencer/mod.rs index 9599e5f770..d19185ba03 100644 --- a/crates/consensus/service/src/actors/sequencer/mod.rs +++ b/crates/consensus/service/src/actors/sequencer/mod.rs @@ -18,8 +18,11 @@ pub use l1_origin::{ mod recovery; pub use recovery::RecoveryModeGuard; +mod ready_hint; +pub use ready_hint::ReadyHintDropReason; + mod seal; -pub use seal::{PayloadSealer, SealState, SealStepError, SealStepOutcome}; +pub use seal::{PayloadSealer, SealState, SealStepError, SealStepOutcome, SealTrigger}; mod shadow_cycle; pub use shadow_cycle::{ShadowCycle, ShadowReconciliationTask}; diff --git a/crates/consensus/service/src/actors/sequencer/pipeline_state.rs b/crates/consensus/service/src/actors/sequencer/pipeline_state.rs index 6c7316120d..e57ff03d46 100644 --- a/crates/consensus/service/src/actors/sequencer/pipeline_state.rs +++ b/crates/consensus/service/src/actors/sequencer/pipeline_state.rs @@ -2,6 +2,7 @@ use std::time::{Duration, Instant}; +use alloy_rpc_types_engine::PayloadId; use base_protocol::L2BlockInfo; use crate::UnsealedPayloadHandle; @@ -14,6 +15,9 @@ use crate::UnsealedPayloadHandle; pub struct BuildPipelineState { /// Pre-built payload awaiting sealing. pub next_payload_to_seal: Option, + /// Payload most recently fetched from the engine for sealing, so a hint that lost the race + /// to the seal deadline is told apart from one for an unknown payload. + pub sealed_payload_id: Option, /// Acknowledged parent whose child build is gated on the parent's timestamp. pub pending_build_parent: Option, /// Duration of the most recently completed seal, used as the ticker's lead time for diff --git a/crates/consensus/service/src/actors/sequencer/ready_hint.rs b/crates/consensus/service/src/actors/sequencer/ready_hint.rs new file mode 100644 index 0000000000..56dee2384d --- /dev/null +++ b/crates/consensus/service/src/actors/sequencer/ready_hint.rs @@ -0,0 +1,36 @@ +//! Outcomes of frozen-payload hints that did not trigger a seal. + +/// Why a frozen-payload hint from the execution layer did not trigger a seal. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum ReadyHintDropReason { + /// The seal deadline fired first: a payload is moving through the seal pipeline, or the + /// hint names the payload that was sealed last. + AlreadySealing, + /// The sequencer is stopped. + Inactive, + /// No built payload is waiting to be sealed. + NoBuild, + /// The hint names a different payload than the one waiting to be sealed. + PayloadIdMismatch, + /// The hint was built on a different parent, as after an engine reset. + ParentMismatch, + /// The waiting payload precedes Denim, where blocks seal on the deadline only. + PreDenim, + /// The hint channel overflowed before the sequencer read it. + Lagged, +} + +impl ReadyHintDropReason { + /// Returns the bounded metrics label for this drop reason. + pub const fn as_str(self) -> &'static str { + match self { + Self::AlreadySealing => "already_sealing", + Self::Inactive => "inactive", + Self::NoBuild => "no_build", + Self::PayloadIdMismatch => "payload_id_mismatch", + Self::ParentMismatch => "parent_mismatch", + Self::PreDenim => "pre_denim", + Self::Lagged => "lagged", + } + } +} diff --git a/crates/consensus/service/src/actors/sequencer/seal.rs b/crates/consensus/service/src/actors/sequencer/seal.rs index 6e11898fb7..83ecdf6f50 100644 --- a/crates/consensus/service/src/actors/sequencer/seal.rs +++ b/crates/consensus/service/src/actors/sequencer/seal.rs @@ -47,6 +47,25 @@ impl SealState { } } +/// What prompted the sequencer to request a sealed payload from the engine. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum SealTrigger { + /// The execution layer reported the payload frozen before the seal deadline. + ReadyHint, + /// The seal deadline elapsed without a usable frozen-payload hint. + Deadline, +} + +impl SealTrigger { + /// Returns the bounded metrics label for this trigger. + pub const fn as_str(self) -> &'static str { + match self { + Self::ReadyHint => "ready_hint", + Self::Deadline => "deadline", + } + } +} + /// Drives a sealed payload through the commit → gossip → insert pipeline. /// /// Each call to [`PayloadSealer::step`] performs exactly one async operation diff --git a/crates/consensus/service/src/actors/sequencer/tests/actor_test.rs b/crates/consensus/service/src/actors/sequencer/tests/actor_test.rs index 9acbc4211f..29e14948ec 100644 --- a/crates/consensus/service/src/actors/sequencer/tests/actor_test.rs +++ b/crates/consensus/service/src/actors/sequencer/tests/actor_test.rs @@ -82,6 +82,8 @@ fn handle_with_parent(number: u64, hash: B256) -> UnsealedPayloadHandle { None, false, ), + frozen: false, + build_requested_at: SystemTime::now(), } } @@ -844,6 +846,8 @@ async fn test_seal_payload_success_returns_sealer() { let handle = UnsealedPayloadHandle { payload_id: Default::default(), attributes_with_parent: dummy_attributes_with_parent(), + frozen: false, + build_requested_at: SystemTime::now(), }; let sealer = actor.seal_payload(&handle).await; @@ -866,6 +870,8 @@ async fn test_shadow_seal_payload_returns_private_sealer() { let handle = UnsealedPayloadHandle { payload_id: Default::default(), attributes_with_parent: dummy_attributes_with_parent(), + frozen: false, + build_requested_at: SystemTime::now(), }; let sealer = actor.seal_payload(&handle).await.unwrap(); @@ -888,6 +894,8 @@ async fn isolated_private_sealing_is_not_capped_by_shadow_cycle_limit() { let handle = UnsealedPayloadHandle { payload_id: Default::default(), attributes_with_parent: dummy_attributes_with_parent(), + frozen: false, + build_requested_at: SystemTime::now(), }; for _ in 0..private_block_count { @@ -910,6 +918,8 @@ async fn test_seal_payload_failure_propagates() { let handle = UnsealedPayloadHandle { payload_id: Default::default(), attributes_with_parent: dummy_attributes_with_parent(), + frozen: false, + build_requested_at: SystemTime::now(), }; let result = actor.seal_payload(&handle).await; diff --git a/crates/consensus/service/src/actors/sequencer/tests/test_util.rs b/crates/consensus/service/src/actors/sequencer/tests/test_util.rs index 003fb44db8..73fc13d8e0 100644 --- a/crates/consensus/service/src/actors/sequencer/tests/test_util.rs +++ b/crates/consensus/service/src/actors/sequencer/tests/test_util.rs @@ -50,5 +50,6 @@ pub(in crate::actors::sequencer) fn test_actor() -> SequencerActor< unsafe_payload_gossip_client, sealer: None, pending_stop: None, + payload_ready: None, } } diff --git a/crates/consensus/service/src/lib.rs b/crates/consensus/service/src/lib.rs index bde419137b..bd7b3b847a 100644 --- a/crates/consensus/service/src/lib.rs +++ b/crates/consensus/service/src/lib.rs @@ -48,15 +48,15 @@ pub use actors::{ PrefetchedChainProviderError, PreparedL1Origin, QueuedDerivationEngineClient, QueuedEngineDerivationClient, QueuedEngineRpcClient, QueuedL1WatcherDerivationClient, QueuedNetworkEngineClient, QueuedSequencerAdminAPIClient, QueuedSequencerEngineClient, - QueuedUnsafePayloadGossipClient, ReconcileShadowRequest, RecoveryModeGuard, ResetOrigin, - ResetOutcome, ResetReason, ResetRequest, ResetRequestOutcome, ResetResponder, RpcActor, - RpcActorError, RpcContext, ScheduledTicker, SealState, SealStepError, SealStepOutcome, - SequencerActor, SequencerActorError, SequencerAdminQuery, SequencerConfig, - SequencerEngineClient, SequencerEngineRequestCoordinator, SequencerEngineState, SequencerKind, - ShadowCycle, ShadowFunding, ShadowReconciliationGate, ShadowReconciliationTask, - ShadowSequencingState, UnsafePayloadGossipClient, UnsafePayloadGossipClientError, - UnsealedPayloadHandle, UpgradeSignalMetricsActor, UpgradeSignalNodeConfig, - ValidatorEngineRequestHandler, + QueuedUnsafePayloadGossipClient, ReadyHintDropReason, ReconcileShadowRequest, + RecoveryModeGuard, ResetOrigin, ResetOutcome, ResetReason, ResetRequest, ResetRequestOutcome, + ResetResponder, RpcActor, RpcActorError, RpcContext, ScheduledTicker, SealState, SealStepError, + SealStepOutcome, SealTrigger, SequencerActor, SequencerActorError, SequencerAdminQuery, + SequencerConfig, SequencerEngineClient, SequencerEngineRequestCoordinator, + SequencerEngineState, SequencerKind, ShadowCycle, ShadowFunding, ShadowReconciliationGate, + ShadowReconciliationTask, ShadowSequencingState, UnsafePayloadGossipClient, + UnsafePayloadGossipClientError, UnsealedPayloadHandle, UpgradeSignalMetricsActor, + UpgradeSignalNodeConfig, ValidatorEngineRequestHandler, }; mod metrics; diff --git a/crates/consensus/service/src/metrics/mod.rs b/crates/consensus/service/src/metrics/mod.rs index 0fc123c940..961a1e72a8 100644 --- a/crates/consensus/service/src/metrics/mod.rs +++ b/crates/consensus/service/src/metrics/mod.rs @@ -144,6 +144,28 @@ base_metrics::define_metrics! { sequencer_l1_origin_buffer_misses_total: counter, #[describe("Pre-built payloads discarded because the unsafe head advanced past their parent")] sequencer_stale_build_discarded_total: counter, + #[describe("Sealed payloads fetched from the engine, by what prompted the getPayload request: a frozen-payload hint from the execution layer or the seal deadline")] + #[label(name = "trigger", default = ["ready_hint", "deadline"])] + sequencer_seals_total: counter, + #[describe("Time from a block's scheduled build start (its parent's timestamp) until its build was requested from the engine")] + sequencer_build_start_offset_seconds: histogram, + #[describe("Time from a block's scheduled build start (its parent's timestamp) until getPayload was requested, by seal trigger")] + #[label(name = "trigger", default = ["ready_hint", "deadline"])] + sequencer_get_payload_offset_seconds: histogram, + #[describe("Frozen-payload hints from the execution layer that did not trigger a seal, by reason")] + #[label( + name = "reason", + default = [ + "already_sealing", + "inactive", + "no_build", + "payload_id_mismatch", + "parent_mismatch", + "pre_denim", + "lagged" + ] + )] + sequencer_payload_ready_hints_dropped_total: counter, #[describe("Configured verifier L1 confirmation depth")] l1_verifier_confs_depth: gauge, #[describe("L1 block number forwarded to derivation after verifier confirmation delay")] diff --git a/crates/consensus/service/src/service/builder.rs b/crates/consensus/service/src/service/builder.rs index ab2b357639..d348fc23c0 100644 --- a/crates/consensus/service/src/service/builder.rs +++ b/crates/consensus/service/src/service/builder.rs @@ -280,6 +280,7 @@ impl RollupNodeBuilder { checkpoint_path, safedb_path: self.safedb_path, upgrade_signal_config, + payload_ready: None, }) } diff --git a/crates/consensus/service/src/service/node.rs b/crates/consensus/service/src/service/node.rs index 8b39dce99e..81e530586a 100644 --- a/crates/consensus/service/src/service/node.rs +++ b/crates/consensus/service/src/service/node.rs @@ -13,6 +13,7 @@ use alloy_provider::RootProvider; use base_common_chains::ChainConfig; use base_common_genesis::RollupConfig; use base_common_network::Base; +use base_common_rpc_types_engine::PayloadReady; use base_consensus_derive::{Pipeline, SignalReceiver, StatefulAttributesBuilder}; use base_consensus_engine::{Engine, EngineClient, EngineState, ForkchoiceCheckpointReader}; use base_consensus_providers::{ @@ -23,7 +24,7 @@ use base_consensus_rpc::{AdminNetworkAccess, BaseRpc, RpcBuilder}; use base_consensus_safedb::{DisabledSafeDB, SafeDB, SafeDBReader, SafeHeadListener}; use base_protocol::L2BlockInfo; use base_upgrade_signal::{UpgradeSignalMetricLayer, UpgradeSignalMetrics}; -use tokio::sync::{mpsc, watch}; +use tokio::sync::{broadcast, mpsc, watch}; use tokio_util::sync::CancellationToken; use crate::{ @@ -146,6 +147,8 @@ pub struct RollupNode { pub safedb_path: Option, /// Optional upgrade signal configuration for the consensus node. pub upgrade_signal_config: Option, + /// Optional frozen-payload hints from an embedded execution node. + pub payload_ready: Option>, } /// A RollupNode-level derivation actor wrapper. @@ -631,6 +634,10 @@ impl RollupNode { unsafe_payload_gossip_client: queued_gossip_client, sealer: None, pending_stop: None, + payload_ready: self + .payload_ready + .as_ref() + .map(broadcast::Receiver::resubscribe), }), Some(QueuedSequencerAdminAPIClient::new(sequencer_admin_api_tx)), ) diff --git a/crates/consensus/service/src/standalone.rs b/crates/consensus/service/src/standalone.rs index fc3047e50c..ddff61cd37 100644 --- a/crates/consensus/service/src/standalone.rs +++ b/crates/consensus/service/src/standalone.rs @@ -320,6 +320,7 @@ impl StandaloneSequencerNode { unsafe_payload_gossip_client: StandaloneUnsafePayloadGossipClient, sealer: None, pending_stop: None, + payload_ready: None, seal_offset: base_protocol::DEFAULT_SEAL_OFFSET, }; diff --git a/crates/execution/node/src/node.rs b/crates/execution/node/src/node.rs index 375882d227..c509fb7d9a 100644 --- a/crates/execution/node/src/node.rs +++ b/crates/execution/node/src/node.rs @@ -12,7 +12,7 @@ use alloy_primitives::{Address, B64, B256, Bytes, bytes::BytesMut, map::AddressS use alloy_rlp::Encodable; use base_common_chains::Upgrades; use base_common_consensus::{BasePrimitives, BaseTransaction, BaseTxEnvelope}; -use base_common_rpc_types_engine::{BasePayloadAttributes, ExecutionData}; +use base_common_rpc_types_engine::{BasePayloadAttributes, ExecutionData, PayloadReady}; use base_execution_chainspec::BaseChainSpec; use base_execution_consensus::BaseBeaconConsensus; use base_execution_evm::{BaseEvmConfig, BaseRethReceiptBuilder}; @@ -1077,6 +1077,8 @@ pub struct BasePayloadBuilder { pub resource_metering: ResourceMeteringConfig, /// Shared, cross-job cache of permanently rejected transaction hashes. pub rejection_cache: RejectionCache, + /// Optional notifications for frozen sequencer payloads. + pub payload_ready: Option>, } impl Default for BasePayloadBuilder { @@ -1089,6 +1091,7 @@ impl Default for BasePayloadBuilder { predicate_bucket_ordered_threshold: DEFAULT_PREDICATE_BUCKET_ORDERED_THRESHOLD, resource_metering: ResourceMeteringConfig::default(), rejection_cache: RejectionCache::default(), + payload_ready: None, } } } @@ -1099,6 +1102,15 @@ impl BasePayloadBuilder { Self::default() } + /// Configures the in-process frozen-payload notification channel. + pub fn with_payload_ready( + mut self, + sender: Option>, + ) -> Self { + self.payload_ready = sender; + self + } + /// Configure the data availability configuration for the payload builder. pub fn with_da_config(mut self, da_config: BaseDAConfig) -> Self { self.da_config = da_config; @@ -1185,6 +1197,7 @@ where BaseBuilderConfig { da_config: self.da_config, gas_limit_config: self.gas_limit_config, + max_uncompressed_block_size: None, manifest_precheck_enabled: self.manifest_precheck_enabled, predicate_eval_hard_cutoff: self.predicate_eval_hard_cutoff, predicate_bucket_ordered_threshold: self.predicate_bucket_ordered_threshold, @@ -1194,7 +1207,8 @@ where resting_predicate_mode: Default::default(), }, ) - .with_task_executor(ctx.task_executor().clone()); + .with_task_executor(ctx.task_executor().clone()) + .with_payload_ready(self.payload_ready); Ok(payload_builder) } } diff --git a/crates/execution/payload/Cargo.toml b/crates/execution/payload/Cargo.toml index c289eeab25..c151f05dfa 100644 --- a/crates/execution/payload/Cargo.toml +++ b/crates/execution/payload/Cargo.toml @@ -62,6 +62,7 @@ thiserror.workspace = true derive_more.workspace = true serde_json.workspace = true moka = { workspace = true, features = ["sync"] } +tokio = { workspace = true, features = ["sync"] } metrics = { workspace = true, optional = true } parking_lot.workspace = true clap = { workspace = true, optional = true, features = ["derive"] } diff --git a/crates/execution/payload/src/builder.rs b/crates/execution/payload/src/builder.rs index cb549063f7..884689be9c 100644 --- a/crates/execution/payload/src/builder.rs +++ b/crates/execution/payload/src/builder.rs @@ -16,6 +16,7 @@ use alloy_rpc_types_engine::PayloadId; use base_common_chains::Upgrades; use base_common_consensus::{BaseTransaction, CoinbaseTip, Predeploys}; use base_common_evm::L1BlockInfo; +use base_common_rpc_types_engine::PayloadReady; use base_execution_eip8130::IntrinsicGas; use base_execution_firehose::{BuiltBlock, BuiltBlockTracer}; use base_execution_txpool::{ @@ -53,6 +54,7 @@ use reth_transaction_pool::{BestTransactionsAttributes, PoolTransaction, Transac use reth_trie_common::ExecutionWitnessMode; use reth_trie_parallel::state_root_task::PayloadStateRootHandle; use revm::context::{Block, BlockEnv}; +use tokio::sync::broadcast; use tracing::{debug, debug_span, info, instrument, trace, warn}; use crate::{ @@ -116,6 +118,8 @@ pub struct BasePayloadBuilder< pub config: BaseBuilderConfig, /// Validity transactions resting from the last block this builder finished. pub resting_predicates: RestingPredicateStore, + /// Optional, non-blocking notifications for frozen sequencer payloads. + pub payload_ready: Option>, /// Marker for the payload attributes type. _pd: PhantomData, } @@ -133,6 +137,7 @@ where client: self.client.clone(), config: self.config.clone(), resting_predicates: self.resting_predicates.clone(), + payload_ready: self.payload_ready.clone(), _pd: PhantomData, } } @@ -167,16 +172,35 @@ impl BasePayloadBuilder { evm_config, config, resting_predicates: RestingPredicateStore::default(), + payload_ready: None, _pd: PhantomData, } } + /// Publishes a hint after a sequencer build returns a final, frozen payload. + pub fn with_payload_ready(mut self, sender: Option>) -> Self { + self.payload_ready = sender; + self + } + /// Runs end-of-block maintenance of the resting validity set, such as the unseen sweep, on /// `executor` instead of inline. pub fn with_task_executor(mut self, executor: Runtime) -> Self { self.resting_predicates = RestingPredicateStore::new(executor); self } + + /// Tells the consensus layer that `payload_id`, built on `parent_hash`, is frozen. + /// + /// A missing or lagging consumer must never block payload production, so a hint nobody is + /// subscribed to is counted and dropped. + pub fn notify_payload_ready(&self, payload_id: PayloadId, parent_hash: B256) { + let Some(sender) = &self.payload_ready else { + return; + }; + let delivered = sender.send(PayloadReady { payload_id, parent_hash }).is_ok(); + BuilderMetrics::record_payload_ready_hint(delivered); + } } impl BasePayloadBuilder @@ -317,6 +341,8 @@ where ) -> Result, PayloadBuilderError> { let no_tx_pool = args.config.attributes.no_tx_pool(); let outcome = self.build_payload(args, |attrs, resting| { + // The pool snapshots every store here, so mid-build arrivals wait + // for the next block. ParkableBestPayloadTransactions::new( self.pool.best_transactions_with_attributes_and_parking( attrs, @@ -335,6 +361,11 @@ where .map_err(PayloadBuilderError::other)?; } + if !no_tx_pool && let BuildOutcome::Freeze(payload) = &outcome { + // The payload is fully assembled, including its state root. Reth may still be + // installing this result into the job; on_missing_payload awaits that same build. + self.notify_payload_ready(payload.id(), payload.block().parent_hash()); + } Ok(outcome) } @@ -707,6 +738,8 @@ pub struct ExecutionInfo { pub cumulative_gas_used: u64, /// Estimated DA size pub cumulative_da_bytes_used: u64, + /// Uncompressed (EIP-2718 encoded) bytes of the transactions included so far. + pub cumulative_uncompressed_bytes: u64, /// Tracks fees from executed mempool transactions pub total_fees: U256, /// Inclusion and fee revenue from executed mempool transactions. @@ -724,6 +757,7 @@ impl ExecutionInfo { Self { cumulative_gas_used: 0, cumulative_da_bytes_used: 0, + cumulative_uncompressed_bytes: 0, total_fees: U256::ZERO, inclusion: InclusionTracker::default(), resource_metering_usage: Vec::new(), @@ -770,6 +804,18 @@ impl ExecutionInfo { self.cumulative_gas_used.saturating_add(tx_reserved_gas) > block_gas_limit } + + /// Returns true if adding a transaction of `tx_uncompressed_size` EIP-2718 encoded bytes + /// would push the block past `block_uncompressed_limit`, when one is configured. + pub fn is_tx_over_uncompressed_limit( + &self, + tx_uncompressed_size: u64, + block_uncompressed_limit: Option, + ) -> bool { + block_uncompressed_limit.is_some_and(|limit| { + self.cumulative_uncompressed_bytes.saturating_add(tx_uncompressed_size) > limit + }) + } } /// Container type that holds all necessities to build a new payload. @@ -933,6 +979,8 @@ where )); } + let tx_uncompressed_size = sequencer_tx.encoded_bytes().len() as u64; + // Convert the transaction to a [RecoveredTx]. This is // purely for the purposes of utilizing the `evm_config.tx_env`` function. // Deposit transactions do not have signatures, so if the tx is a deposit, this @@ -986,6 +1034,9 @@ where }; info.cumulative_gas_used += gas_output.tx_gas_used(); + // Sequencer transactions cannot be skipped, so they count toward the uncompressed + // block size even when they alone exceed the limit. + info.cumulative_uncompressed_bytes += tx_uncompressed_size; if let Some(usage) = pending_resource_usage { resource_metering.apply_accounted_usage( &tx_hash, @@ -1032,6 +1083,7 @@ where .map_or(gas_limit, |cfg| cfg.min(gas_limit)); let block_da_limit = self.builder_config.da_config.max_da_block_size(); let tx_da_limit = self.builder_config.da_config.max_da_tx_size(); + let block_uncompressed_limit = self.builder_config.max_uncompressed_block_size; let base_fee = builder.evm_mut().block().basefee(); let block_number = builder.evm_mut().block().number().try_into().expect("block number must fit in u64"); @@ -1296,6 +1348,7 @@ where } let tx_da_size = tx.estimated_da_size(); + let tx_uncompressed_size = tx.encoded_length() as u64; // EIP-8130 meters payer authentication gas on top of the declared gas limit, so it must // be reserved against the block gas budget in addition to `gas_limit`. Reserve a @@ -1418,6 +1471,20 @@ where continue; } + if info.is_tx_over_uncompressed_limit(tx_uncompressed_size, block_uncompressed_limit) { + if has_validity_predicates { + self.emit_validity_rejection( + tx_hash, + validity_consideration_index, + "block_uncompressed_size_exceeded", + "transaction does not fit the remaining uncompressed block size budget", + false, + ); + } + Self::skip_current(&mut best_txs, tx.signer(), tx.nonce(), replay_independent); + continue; + } + // A sequencer's block should never contain blob or deposit transactions from the pool. if tx.is_eip4844() || tx.is_deposit() { if has_validity_predicates { @@ -1538,6 +1605,7 @@ where info.cumulative_gas_used += gas_output.tx_gas_used(); info.cumulative_da_bytes_used += tx_da_size; + info.cumulative_uncompressed_bytes += tx_uncompressed_size; if let Some(usage) = pending_resource_usage { resource_metering.apply_accounted_usage( &tx_hash, @@ -1753,6 +1821,8 @@ mod tests { }; use revm::{Database, database::TransitionState, state::EvmState}; + #[cfg(feature = "metrics")] + use super::{BasePayloadBuilder, PayloadReady, broadcast}; use super::{ BasePayloadBuilderCtx, Builder, ExecutionInfo, RESTING_SWEEP_WAIT_LIMIT, job_interrupt, }; @@ -1845,11 +1915,88 @@ mod tests { assert!(info.is_tx_over_limits(0, block_gas_limit, None, None, 21_000 + 2_100, None)); } + /// The cap includes prior bytes, accepts the exact boundary, and is optional. + #[test] + fn is_tx_over_uncompressed_limit_counts_cumulative_bytes() { + let mut info = ExecutionInfo::new(); + info.cumulative_uncompressed_bytes = 90_000; + + assert!(!info.is_tx_over_uncompressed_limit(u64::MAX, None)); + assert!(!info.is_tx_over_uncompressed_limit(10_000, Some(100_000))); + assert!(info.is_tx_over_uncompressed_limit(10_001, Some(100_000))); + } + + /// Pool transactions that would push the block past the uncompressed size limit are left + /// out, and the block still includes the transactions that fit. Sequencer transactions count + /// toward the limit and are never left out. + #[test] + fn native_builder_enforces_max_uncompressed_block_size() { + // Distinct recipients give each transaction its own recovered sender at nonce zero. + let transactions: Vec<_> = + (1..=4).map(|i| pool_transaction_to(0, Address::repeat_byte(i), U256::ZERO)).collect(); + let senders: Vec<_> = transactions.iter().map(|tx| tx.sender()).collect(); + let tx_size = transactions[0].encoded_length() as u64; + let (sequencer, pool) = transactions.split_first().expect("four transactions"); + let build = |limit, with_sequencer: bool| { + let mut ctx = pool_payload_context(DENIM_TIMESTAMP); + ctx.builder_config.max_uncompressed_block_size = limit; + if with_sequencer { + ctx.config.attributes.transactions = vec![sequencer_attribute_tx(sequencer)]; + } + included_tx_count(build_parkable_pool_payload( + ctx, + TestParkableTransactions::new(pool.to_vec()), + &senders, + )) + }; + + assert_eq!(build(None, false), 3); + assert_eq!(build(Some(2 * tx_size), false), 2); + assert_eq!(build(Some(tx_size - 1), false), 0); + // The sequencer transaction takes one of the three slots, leaving room for two pool + // transactions. + assert_eq!(build(Some(3 * tx_size), true), 3); + // A sequencer transaction over the limit is still included, and no pool transaction fits. + assert_eq!(build(Some(tx_size - 1), true), 1); + } + #[test] fn parallel_state_root_is_used() { assert_eq!(build_empty_payload(state_root_handle()), B256::repeat_byte(0x42)); } + #[cfg(feature = "metrics")] + #[test] + fn frozen_payload_hints_are_counted_by_whether_a_receiver_was_subscribed() { + let recorder = metrics_exporter_prometheus::PrometheusBuilder::new().build_recorder(); + let handle = recorder.handle(); + let payload_id = PayloadId::new([7; 8]); + let parent_hash = B256::repeat_byte(8); + let (sender, mut receiver) = broadcast::channel(4); + let builder = BasePayloadBuilder::<(), (), (), ()>::new((), (), ()); + + metrics::with_local_recorder(&recorder, || { + // Split EL/CL deployments configure no channel and must not report hints. + builder.notify_payload_ready(payload_id, parent_hash); + assert!(!handle.render().contains("payload_ready_hints_sent_total")); + + let builder = builder.with_payload_ready(Some(sender)); + builder.notify_payload_ready(payload_id, parent_hash); + builder.notify_payload_ready(payload_id, parent_hash); + assert_eq!(receiver.try_recv(), Ok(PayloadReady { payload_id, parent_hash })); + drop(receiver); + builder.notify_payload_ready(payload_id, parent_hash); + }); + + let rendered = handle.render(); + for expected in [ + r#"base_builder_payload_ready_hints_sent_total{result="delivered"} 2"#, + r#"base_builder_payload_ready_hints_sent_total{result="no_receiver"} 1"#, + ] { + assert!(rendered.contains(expected), "expected `{expected}`, got: {rendered}"); + } + } + #[cfg(feature = "metrics")] #[test] fn only_pool_builds_record_per_block_inclusion() { @@ -1873,6 +2020,45 @@ mod tests { assert!(rendered.contains(r#"base_builder_txs_included_per_block_sum{flow="standard"} 1"#)); } + /// An oversized validity candidate closes its nonce lane without permanent rejection, + /// both before and after the native builder cutover. + #[test] + fn native_builder_uncompressed_limit_rejects_validity_and_skips_nonce_lane() { + let event_capture = TransactionEventCapture::install(); + for timestamp in [DENIM_TIMESTAMP - 1, DENIM_TIMESTAMP] { + let transaction = + pool_transaction_to(0, Address::repeat_byte(0x6e + timestamp as u8), U256::ZERO) + .with_validity_predicates(vec![ValidityPredicate::BlockNumber { + op: ValidityOperator::Equal, + value: U256::ONE, + }]); + let sender = transaction.sender(); + let hash = *transaction.hash(); + let invalid = Arc::new(Mutex::new(Vec::new())); + let mut ctx = pool_payload_context(timestamp); + ctx.builder_config.max_uncompressed_block_size = Some(0); + let rejection_cache = ctx.builder_config.rejection_cache.clone(); + let outcome = build_parkable_pool_payload( + ctx, + TestParkableTransactions::recording(vec![transaction], Arc::clone(&invalid)), + &[sender], + ); + assert_eq!(included_tx_count(outcome), 0); + // mark_invalid is the iterator contract for excluding this nonce and descendants. + assert_eq!(*invalid.lock().unwrap(), vec![(sender, 0)]); + assert!(!rejection_cache.contains_key(&hash)); + let events = event_capture + .events() + .into_iter() + .filter(|event| event.tx_hash == Some(hash)) + .collect::>(); + assert_eq!(events.len(), 1); + assert_eq!(events[0].event_type, TransactionEventType::BuilderRejected); + assert_eq!(events[0].data["rejection_reason"], "block_uncompressed_size_exceeded"); + assert_eq!(events[0].data["permanent"], false); + } + } + const DENIM_TIMESTAMP: u64 = 1; fn pool_payload_context(timestamp: u64) -> BasePayloadBuilderCtx { diff --git a/crates/execution/payload/src/config.rs b/crates/execution/payload/src/config.rs index 63f5f83305..dc20ed3c64 100644 --- a/crates/execution/payload/src/config.rs +++ b/crates/execution/payload/src/config.rs @@ -30,6 +30,11 @@ pub struct BaseBuilderConfig { pub da_config: BaseDAConfig, /// Gas limit configuration for the Base payload builder. pub gas_limit_config: GasLimitConfig, + /// Maximum cumulative uncompressed (EIP-2718 encoded) block size in bytes, if any. + /// + /// Sequencer transactions always count toward the total; pool transactions that would push + /// the block over the limit are skipped for this block. + pub max_uncompressed_block_size: Option, /// Whether to drop positively stale EIP-8130 transactions using their /// captured authorization manifest before execution. pub manifest_precheck_enabled: bool, @@ -64,6 +69,7 @@ impl Default for BaseBuilderConfig { Self { da_config: BaseDAConfig::default(), gas_limit_config: GasLimitConfig::default(), + max_uncompressed_block_size: None, manifest_precheck_enabled: true, predicate_eval_hard_cutoff: Duration::from_millis(10), predicate_bucket_ordered_threshold: DEFAULT_PREDICATE_BUCKET_ORDERED_THRESHOLD, @@ -85,6 +91,7 @@ impl BaseBuilderConfig { Self { da_config, gas_limit_config, + max_uncompressed_block_size: None, manifest_precheck_enabled, predicate_eval_hard_cutoff: Duration::from_millis(10), predicate_bucket_ordered_threshold: DEFAULT_PREDICATE_BUCKET_ORDERED_THRESHOLD, diff --git a/crates/execution/payload/src/metrics.rs b/crates/execution/payload/src/metrics.rs index bc0ae451fb..8c20249237 100644 --- a/crates/execution/payload/src/metrics.rs +++ b/crates/execution/payload/src/metrics.rs @@ -108,6 +108,11 @@ base_metrics::define_metrics! { #[label(name = "flow", default = ["standard", "validity"])] #[label(name = "bid", default = ["coinbase_tip", "priority_fee"])] tip_per_gas: histogram, + #[describe( + "Frozen-payload hints published for the consensus layer, by whether a receiver was subscribed" + )] + #[label(name = "result", default = ["delivered", "no_receiver"])] + payload_ready_hints_sent_total: counter, } impl ValidityMetrics { @@ -216,6 +221,13 @@ impl BuilderMetrics { Self::coinbase_tip_revenue_wei(FLOW_VALIDITY).record(tracker.validity.coinbase_tips_f64()); } + /// Records one frozen-payload hint published for the consensus layer. `delivered` is false + /// when no receiver was subscribed, so the hint reached nobody. + pub fn record_payload_ready_hint(delivered: bool) { + let result = if delivered { "delivered" } else { "no_receiver" }; + Self::payload_ready_hints_sent_total(result).increment(1); + } + /// Records one included transaction's tip per gas by flow and bid mechanism. pub fn record_tip_per_gas( has_validity_predicates: bool, diff --git a/crates/execution/runner/Cargo.toml b/crates/execution/runner/Cargo.toml index d70161e3d5..c90c6b91a1 100644 --- a/crates/execution/runner/Cargo.toml +++ b/crates/execution/runner/Cargo.toml @@ -47,13 +47,13 @@ alloy-rpc-types-engine = { workspace = true, optional = true, features = [ ] } # base-alloy +base-common-rpc-types-engine.workspace = true base-common-rpc-types = { workspace = true, optional = true } base-common-network = { workspace = true, optional = true } base-common-consensus = { workspace = true, features = ["reth"] } -base-common-rpc-types-engine = { workspace = true, optional = true } # tokio -tokio = { workspace = true, optional = true } +tokio = { workspace = true, features = ["sync"] } # rpc jsonrpsee = { workspace = true, optional = true } @@ -97,7 +97,6 @@ test-utils = [ "dep:alloy-rpc-types-engine", "dep:base-common-network", "dep:base-common-rpc-types", - "dep:base-common-rpc-types-engine", "dep:base-test-utils", "dep:chrono", "dep:jsonrpsee", @@ -107,7 +106,6 @@ test-utils = [ "dep:reth-rpc-layer", "dep:reth-tasks", "dep:reth-tracing", - "dep:tokio", "dep:tower", "dep:tracing-subscriber", "dep:url", diff --git a/crates/execution/runner/README.md b/crates/execution/runner/README.md index 668e452205..5fe03d4159 100644 --- a/crates/execution/runner/README.md +++ b/crates/execution/runner/README.md @@ -55,6 +55,48 @@ impl FromExtensionConfig for MyExtension { } ``` +## Frozen payload notifications + +`LaunchedBaseNode::payload_ready` is a bounded, in-process EL-to-CL channel carrying +`PayloadReady { payload_id, parent_hash }`. The default payload builder sends a hint only +after a sequencer build returns `Freeze`, including completed state-root computation. +Pre-Denim improvements, failed or cancelled builds, and `no_tx_pool` replay builds do not +send hints. Custom payload services must explicitly wire `BaseNode::payload_ready` if +they support this contract. + +The receiver exists before node launch so fast builds cannot race subscription. Sending +never waits for the consumer. The channel retains 16 hints; receivers must handle lag or +closure by retaining their normal seal deadline, and must match both identifiers against +the active build before acting. `getPayload` awaits the completed build even if the hint +arrives just before reth installs its result into the payload job. + +The unified sequencer matches these hints against its active Denim build and calls +`getPayload` through the existing seal path immediately. Conductor commit, gossip, and +local insertion keep their existing order. The scheduled seal remains the fallback, and +the next block's build still waits for its parent's scheduled timestamp. Split EL/CL +deployments have no IPC/WS subscription and continue using the scheduled seal. + +Early sealing is observable through these metrics, which the unified sequencer exports with +a `reth_` prefix. Offsets are measured from the block's scheduled build start, which is its +parent's timestamp. + +| Metric | Type | Labels | Meaning | +|---|---|---|---| +| `base_builder_payload_ready_hints_sent_total` | counter | `result`: `delivered`, `no_receiver` | Hints the payload builder published. | +| `base_node_sequencer_seals_total` | counter | `trigger`: `ready_hint`, `deadline` | Payloads fetched with `getPayload`, by what prompted the request. | +| `base_node_sequencer_build_start_offset_seconds` | histogram | none | When the block's build was requested from the engine. | +| `base_node_sequencer_get_payload_offset_seconds` | histogram | `trigger` | When `getPayload` was requested. | +| `base_node_sequencer_payload_ready_hints_dropped_total` | counter | `reason`: `already_sealing`, `inactive`, `no_build`, `payload_id_mismatch`, `parent_mismatch`, `pre_denim`, `lagged` | Hints that did not trigger a seal. | + +A hint that arrives after the seal deadline has fetched its payload is counted as +`already_sealing`, so that reason tracks deadline seals rather than a fault. + +The two offsets together give roughly how long a searcher has to react to a block and still +land in the next one: the 200 ms block interval, plus the next block's build start offset, +minus this block's `getPayload` offset. It is approximate. After `getPayload` the block is +still committed, signed, and gossiped, and a Denim build reads the transaction pool once, +shortly after it is requested. + ## License Licensed under the [MIT License](https://github.com/base/base/blob/main/LICENSE). diff --git a/crates/execution/runner/src/node.rs b/crates/execution/runner/src/node.rs index cc0f1ddbe2..a91f24242c 100644 --- a/crates/execution/runner/src/node.rs +++ b/crates/execution/runner/src/node.rs @@ -1,6 +1,7 @@ //! Base Node types config. use base_common_consensus::BasePrimitives; +use base_common_rpc_types_engine::PayloadReady; use base_execution_chainspec::BaseChainSpec; use base_execution_payload_builder::{ RejectionCache, @@ -48,6 +49,8 @@ pub struct BaseNode { pub resource_metering: ResourceMeteringConfig, /// Shared, cross-job cache of permanently rejected transaction hashes. pub rejection_cache: RejectionCache, + /// Optional notifications for frozen sequencer payloads. + pub payload_ready: Option>, } impl Default for BaseNode { @@ -66,6 +69,7 @@ impl BaseNode { manifest_precheck_enabled: true, resource_metering: ResourceMeteringConfig::default(), rejection_cache: RejectionCache::default(), + payload_ready: None, } } @@ -132,7 +136,8 @@ impl BaseNode { .with_gas_limit_config(self.gas_limit_config.clone()) .with_manifest_precheck_enabled(self.manifest_precheck_enabled) .with_resource_metering(self.resource_metering.clone()) - .with_rejection_cache(self.rejection_cache.clone()), + .with_rejection_cache(self.rejection_cache.clone()) + .with_payload_ready(self.payload_ready.clone()), )) .network(BaseNetworkBuilder::new(!discovery_v4)) .consensus(BaseConsensusBuilder::default()) diff --git a/crates/execution/runner/src/runner.rs b/crates/execution/runner/src/runner.rs index a98fd54b36..305b60b0db 100644 --- a/crates/execution/runner/src/runner.rs +++ b/crates/execution/runner/src/runner.rs @@ -2,6 +2,7 @@ use std::fmt; +use base_common_rpc_types_engine::PayloadReady; use base_execution_payload_builder::{ RejectionCache, config::{BaseDAConfig, GasLimitConfig, ResourceMeteringConfig}, @@ -10,6 +11,7 @@ use base_node_core::args::RollupArgs; use eyre::Result; use reth_node_builder::{Node, NodeHandle, NodeHandleFor}; use reth_provider::providers::BlockchainProvider; +use tokio::sync::broadcast; use tracing::info; use crate::{ @@ -20,11 +22,17 @@ use crate::{ type StartedCallback = Box Result<()> + Send + 'static>; +/// Bounds retained ready hints; consumers fall back to their seal deadline on lag. +const PAYLOAD_READY_CAPACITY: usize = 16; + /// Handle to a launched Base execution node. #[derive(Debug)] pub struct LaunchedBaseNode { /// The underlying reth node handle. pub handle: NodeHandleFor, + /// Frozen sequencer payload hints for the in-process CL. Subscribe before starting builds. + /// Lag or closure must fall back to the normal seal deadline; stale hints must be ignored. + pub payload_ready: broadcast::Receiver, } /// Wraps the Base node configuration and orchestrates builder wiring. @@ -144,7 +152,7 @@ impl BaseNodeRunner { /// Applies all Base-specific wiring to the supplied builder, launches the node, and waits for /// shutdown. pub async fn run(self, builder: BaseNodeBuilder) -> Result<()> { - let LaunchedBaseNode { handle: NodeHandle { node: _node, node_exit_future } } = + let LaunchedBaseNode { handle: NodeHandle { node: _node, node_exit_future }, .. } = self.launch(builder).await?; node_exit_future.await?; Ok(()) @@ -153,11 +161,6 @@ impl BaseNodeRunner { /// Applies all Base-specific wiring to the supplied builder and returns a launched node /// handle without waiting for shutdown. pub async fn launch(self, builder: BaseNodeBuilder) -> Result { - let handle = self.launch_node(builder).await?; - Ok(LaunchedBaseNode { handle }) - } - - async fn launch_node(self, builder: BaseNodeBuilder) -> Result> { info!(target: "base-runner", "starting custom Base node"); let Self { @@ -172,6 +175,8 @@ impl BaseNodeRunner { started_callbacks, } = self; let mut base_node = BaseNode::new(rollup_args); + let (payload_ready_tx, payload_ready) = broadcast::channel(PAYLOAD_READY_CAPACITY); + base_node.payload_ready = Some(payload_ready_tx); if let Some(da_config) = da_config { base_node = base_node.with_da_config(da_config); } @@ -198,7 +203,8 @@ impl BaseNodeRunner { .into_iter() .fold(hooks, |hooks, callback| hooks.add_node_started_hook(move |_| callback())); - hooks.apply_to(builder).launch().await + let handle = hooks.apply_to(builder).launch().await?; + Ok(LaunchedBaseNode { handle, payload_ready }) } } diff --git a/crates/execution/tx-forwarding/src/forwarder/task.rs b/crates/execution/tx-forwarding/src/forwarder/task.rs index f1a4598220..6a02872ce1 100644 --- a/crates/execution/tx-forwarding/src/forwarder/task.rs +++ b/crates/execution/tx-forwarding/src/forwarder/task.rs @@ -272,8 +272,9 @@ impl DestinationForwarder { let tx_count = batch.len() as u64; let overall_start = Instant::now(); for attempt in 0..=self.config.max_retries { - // The first attempt is not journaled: every send ends in a failure or drop event here - // or a builder-side insert event. Only retries add information. + // The first attempt is not journaled: a send that reaches the builder ends in that + // builder's own insert event, and one that does not ends in a drop event here. Only + // retries add information. if attempt > 0 { for (tx_hash, method) in tx_hashes.iter().zip(&methods) { self.emit_forward_event( @@ -300,11 +301,12 @@ impl DestinationForwarder { let mut err_count = 0u64; for (idx, res) in response.into_iter().enumerate() { let tx_hash = tx_hashes.get(idx).copied().flatten(); - let method = methods.get(idx).copied().unwrap_or_default(); match res { - // Delivery is journaled by the destination as - // `TXPOOL_VALIDATED_INSERT_ACCEPTED`; a node-side success event per - // destination would duplicate it. + // The destination journals its own verdict as + // `TXPOOL_VALIDATED_INSERT_ACCEPTED` or `_REJECTED` while it is the + // active sequencer. A node-side row per destination would duplicate + // the leader's and add standby and canary verdicts that never decide + // inclusion; the rejection metric below covers them in aggregate. Ok(()) => ok_count += 1, Err(e) => { debug!( @@ -316,17 +318,6 @@ impl DestinationForwarder { self.report_failure(tx_hash); } err_count += 1; - self.emit_forward_event( - TransactionEventType::TxpoolBuilderForwardFailure, - tx_hash, - method, - Some(attempt), - Map::from_iter([ - ("attempt".to_string(), json!(attempt)), - ("batch_size".to_string(), json!(tx_count)), - ("error".to_string(), json!(e.to_string())), - ]), - ); } } } diff --git a/crates/execution/tx-forwarding/tests/transaction_events.rs b/crates/execution/tx-forwarding/tests/transaction_events.rs index ffc7964bfc..1d477bb827 100644 --- a/crates/execution/tx-forwarding/tests/transaction_events.rs +++ b/crates/execution/tx-forwarding/tests/transaction_events.rs @@ -186,7 +186,8 @@ async fn unreachable_builder_journals_each_retry_and_the_drop() -> Result<()> { } /// A builder that already holds the transaction, as after an earlier send, rejects the insert. -/// The builder journals the rejection and the node journals the failed send. +/// The builder journals the rejection; the node journals nothing for it, since every builder +/// receives the transaction and only the builder's own verdict decides inclusion. #[tokio::test] async fn builder_rejection_is_journaled_by_both_sides() -> Result<()> { let (builder, url) = builder().await?; @@ -205,7 +206,6 @@ async fn builder_rejection_is_journaled_by_both_sides() -> Result<()> { "base-reth-node TXPOOL_SEND_RAW_TRANSACTION", "base-reth-node TXPOOL_PENDING", "base-builder TXPOOL_VALIDATED_INSERT_REJECTED", - "base-reth-node TXPOOL_BUILDER_FORWARD_FAILURE attempt=0", ], ) .await; diff --git a/crates/execution/txpool/src/parking.rs b/crates/execution/txpool/src/parking.rs index 57b686fe95..f7817fa292 100644 --- a/crates/execution/txpool/src/parking.rs +++ b/crates/execution/txpool/src/parking.rs @@ -114,6 +114,10 @@ where Self::Transaction: BasePooledTx, { /// Returns a parkable best iterator using the supplied fee attributes. + /// + /// The iterator is a snapshot of every store taken when it is created: + /// transactions added afterwards are not yielded, so a block build only + /// sees transactions that arrived before it started. fn best_transactions_with_attributes_and_parking( &self, attributes: BestTransactionsAttributes, diff --git a/crates/execution/txpool/src/pool.rs b/crates/execution/txpool/src/pool.rs index 1f195e7eef..5c4a7c7bda 100644 --- a/crates/execution/txpool/src/pool.rs +++ b/crates/execution/txpool/src/pool.rs @@ -2265,7 +2265,10 @@ where hold: Option>>, ) -> Box> { let base_fee = attributes.basefee; - let merged = self.merged_best_transactions(attributes); + let mut merged = self.merged_best_transactions(attributes); + // Snapshot every store, reth's included, so a transaction that arrives + // mid-build waits for the next build instead of joining this one. + merged.no_updates(); Box::new( ParkedBestTransactions::new(merged, self.ordering.clone(), base_fee).with_hold(hold), ) @@ -2684,7 +2687,10 @@ fn pooled_element( #[cfg(test)] mod tests { - use std::time::{Duration, Instant}; + use std::{ + collections::HashSet, + time::{Duration, Instant}, + }; use alloy_consensus::{ SignableTransaction, Transaction, TxEip1559, TxEip7702, @@ -4798,15 +4804,12 @@ mod tests { let sidecar = add(&pool, self_paid_eoa_8130(&signer, U256::from(8), 0, 0, 1_000)).await; let others_validity = add(&pool, validity_1559(&other, 0, 1_000)).await; - let removed: std::collections::HashSet<_> = pool + let removed: HashSet<_> = pool .remove_transactions_by_sender(signer.address()) .iter() .map(|tx| *tx.hash()) .collect(); - assert_eq!( - removed, - std::collections::HashSet::from([standard, validity, channel_validity, sidecar]) - ); + assert_eq!(removed, HashSet::from([standard, validity, channel_validity, sidecar])); for hash in [standard, validity, channel_validity, sidecar] { assert_gone(&pool, hash); } @@ -4858,6 +4861,48 @@ mod tests { assert!(yielded.contains(&cheap_standard) && yielded.contains(&tipping_standard)); } + /// The builder walks the pool as it stood when the build started: a + /// transaction that arrives mid-build waits for the next build in every + /// store, however much it outbids what the snapshot holds. + #[tokio::test] + async fn parking_iterator_snapshots_every_store_at_build_start() { + let (pool, client) = build_integration_pool(); + let signers: [_; 6] = std::array::from_fn(|_| funded_signer(&client)); + let resting = HashSet::from([ + add(&pool, signed_1559_with_fees(&signers[0], 0, 1_000, 1)).await, + add(&pool, validity_1559(&signers[1], 0, 1_000)).await, + add(&pool, self_paid_eoa_8130(&signers[2], U256::from(7), 0, 0, 1_000)).await, + ]); + let attributes = BestTransactionsAttributes::new(0, None); + + let mut build = pool.best_transactions_with_attributes_and_parking(attributes, None); + let late = [ + add(&pool, signed_1559_with_fees(&signers[3], 0, 1_000, 900)).await, + add( + &pool, + signed_1559_with_fees(&signers[4], 0, 1_000, 900) + .with_validity_predicates(resting_predicates()), + ) + .await, + add(&pool, self_paid_eoa_8130(&signers[5], U256::from(7), 0, 0, 1_000)).await, + ]; + for (hash, store) in + late.into_iter().zip([PoolStore::Protocol, PoolStore::Validity, PoolStore::Sidecar]) + { + assert_store(&pool, hash, store); + } + + let yielded: HashSet<_> = + std::iter::from_fn(|| build.next()).map(|transaction| *transaction.hash()).collect(); + assert_eq!(yielded, resting, "mid-build arrivals must not join the build"); + + let next: HashSet<_> = pool + .best_transactions_with_attributes_and_parking(attributes, None) + .map(|transaction| *transaction.hash()) + .collect(); + assert_eq!(next, resting.into_iter().chain(late).collect(), "the next build takes them"); + } + /// The reviewer's case: a validity successor that outbids the standard /// transaction in front of it must still come out behind it. #[tokio::test] diff --git a/crates/utilities/reth-cli/src/engine.rs b/crates/utilities/reth-cli/src/engine.rs index d152f42adc..077d287152 100644 --- a/crates/utilities/reth-cli/src/engine.rs +++ b/crates/utilities/reth-cli/src/engine.rs @@ -3,9 +3,10 @@ use reth_node_core::args::DefaultEngineValues; /// Reth's defaults (7 / 5 / 16) are block counts sized for 2s blocks; these keep the same -/// time margins at Denim's 200ms block interval. +/// time margins at Denim's 200ms block interval. The memory block buffer target stays at reth's +/// default (5): state reads walk each in-memory block before the database, so a larger buffer +/// slows `eth_call`. const PERSISTENCE_THRESHOLD: u64 = 70; -const MEMORY_BLOCK_BUFFER_TARGET: u64 = 70; const PERSISTENCE_BACKPRESSURE_THRESHOLD: u64 = 160; /// Reth engine default initialization for Base execution layer binaries. @@ -23,7 +24,6 @@ impl Engine { pub fn init_engine() { DefaultEngineValues::default() .with_persistence_threshold(PERSISTENCE_THRESHOLD) - .with_memory_block_buffer_target(MEMORY_BLOCK_BUFFER_TARGET) .with_persistence_backpressure_threshold(PERSISTENCE_BACKPRESSURE_THRESHOLD) .try_init() .expect("failed to initialize engine defaults"); @@ -52,7 +52,7 @@ mod tests { let args = EngineArgs::default(); assert_eq!(args.persistence_threshold, 70); - assert_eq!(args.memory_block_buffer_target(), 70); + assert_eq!(args.memory_block_buffer_target(), 5); assert_eq!(args.persistence_backpressure_threshold(), 160); args.validate().unwrap(); } diff --git a/crates/utilities/runtime/src/clock.rs b/crates/utilities/runtime/src/clock.rs index 7e7ebfb689..bcb2dd265b 100644 --- a/crates/utilities/runtime/src/clock.rs +++ b/crates/utilities/runtime/src/clock.rs @@ -51,4 +51,20 @@ pub trait Clock: Send + Sync + 'static { .expect("system clock before UNIX epoch") .as_secs() } + + /// Returns the current wall-clock time as milliseconds since the Unix epoch. + /// + /// Use it instead of [`wall_clock_unix_secs`](Clock::wall_clock_unix_secs) + /// when a duration measured against an on-chain Unix timestamp needs + /// sub-second precision. + /// + /// The default implementation calls [`std::time::SystemTime::now`]. + /// The deterministic test runtime overrides this to return a value + /// derived from virtual time. + fn wall_clock_unix_millis(&self) -> u64 { + let since_epoch = std::time::SystemTime::now() + .duration_since(std::time::SystemTime::UNIX_EPOCH) + .expect("system clock before UNIX epoch"); + u64::try_from(since_epoch.as_millis()).unwrap_or(u64::MAX) + } } diff --git a/crates/utilities/runtime/src/deterministic/mod.rs b/crates/utilities/runtime/src/deterministic/mod.rs index 05a32dbb0b..eef6771929 100644 --- a/crates/utilities/runtime/src/deterministic/mod.rs +++ b/crates/utilities/runtime/src/deterministic/mod.rs @@ -202,6 +202,11 @@ impl CancelState { } } +/// Unix time, in seconds, at virtual time zero, so that tests get deterministic +/// Unix timestamps. The value is arbitrary; `1_700_000_000` (≈ 2023-11-14) is a +/// convenient recent timestamp. +const WALL_CLOCK_EPOCH_SECS: u64 = 1_700_000_000; + impl Clock for Context { fn now(&self) -> Duration { self.executor.upgrade().map_or(Duration::ZERO, |e| *e.time.lock().unwrap()) @@ -224,12 +229,12 @@ impl Clock for Context { } fn wall_clock_unix_secs(&self) -> u64 { - // Anchor virtual time at a fixed epoch so that tests get - // deterministic Unix timestamps. The specific epoch value - // is arbitrary; 1_700_000_000 (≈ 2023-11-14) is a convenient - // recent timestamp. - const EPOCH: u64 = 1_700_000_000; - EPOCH + self.now().as_secs() + WALL_CLOCK_EPOCH_SECS + self.now().as_secs() + } + + fn wall_clock_unix_millis(&self) -> u64 { + let virtual_millis = u64::try_from(self.now().as_millis()).unwrap_or(u64::MAX); + (WALL_CLOCK_EPOCH_SECS * 1_000).saturating_add(virtual_millis) } } @@ -352,6 +357,15 @@ mod tests { }); } + #[test] + fn wall_clock_follows_virtual_time() { + Runner::start(Config::seeded(0), |ctx| async move { + ctx.sleep(Duration::from_millis(3_500)).await; + assert_eq!(ctx.wall_clock_unix_secs(), 1_700_000_003); + assert_eq!(ctx.wall_clock_unix_millis(), 1_700_000_003_500); + }); + } + #[test] fn interval_first_tick_fires_immediately() { Runner::start(Config::seeded(0), |ctx| async move { diff --git a/crates/utilities/tx-manager/Cargo.toml b/crates/utilities/tx-manager/Cargo.toml index ff950e8a37..814eba38b7 100644 --- a/crates/utilities/tx-manager/Cargo.toml +++ b/crates/utilities/tx-manager/Cargo.toml @@ -33,6 +33,7 @@ url.workspace = true backon.workspace = true futures.workspace = true thiserror.workspace = true +serde_json.workspace = true metrics = { workspace = true, optional = true } tracing = { workspace = true, features = ["std"] } tokio = { workspace = true, features = ["sync", "time"] } @@ -41,15 +42,15 @@ tokio = { workspace = true, features = ["sync", "time"] } rayon.workspace = true rstest.workspace = true proptest.workspace = true +mockall.workspace = true humantime.workspace = true -serde_json.workspace = true async-trait.workspace = true alloy-signer.workspace = true alloy-json-rpc.workspace = true alloy-node-bindings.workspace = true clap = { workspace = true, features = ["derive", "env"] } base-runtime = { workspace = true, features = ["test-utils"] } -tokio = { workspace = true, features = ["macros", "net", "rt", "rt-multi-thread"] } +tokio = { workspace = true, features = ["io-util", "macros", "net", "rt", "rt-multi-thread"] } [features] metrics = [ "base-metrics/metrics", "dep:metrics" ] diff --git a/crates/utilities/tx-manager/README.md b/crates/utilities/tx-manager/README.md index 16aa536261..f117171917 100644 --- a/crates/utilities/tx-manager/README.md +++ b/crates/utilities/tx-manager/README.md @@ -22,6 +22,8 @@ confirmation. that were applied. - **`TxQueue`** — bounded async send queue with semaphore-based backpressure. - **`SendResult`** — pairs a caller-supplied ID with a transaction send outcome. +- **`ConfirmedTx`** — receipt confirmed to the required depth, with the timestamp of the + block that includes it. ### Fee calculation diff --git a/crates/utilities/tx-manager/src/lib.rs b/crates/utilities/tx-manager/src/lib.rs index 830e7a623c..a0fda68637 100644 --- a/crates/utilities/tx-manager/src/lib.rs +++ b/crates/utilities/tx-manager/src/lib.rs @@ -34,7 +34,7 @@ mod nonce; pub use nonce::{NonceGuard, NonceManager, NonceState}; mod manager; -pub use manager::{PreparedTx, SimpleTxManager}; +pub use manager::{ConfirmedTx, PreparedTx, SimpleTxManager}; mod queue; pub use queue::{SendResult, TxQueue}; diff --git a/crates/utilities/tx-manager/src/manager.rs b/crates/utilities/tx-manager/src/manager.rs index fcb278ad0e..efda970c3b 100644 --- a/crates/utilities/tx-manager/src/manager.rs +++ b/crates/utilities/tx-manager/src/manager.rs @@ -50,7 +50,7 @@ use alloy_network::{ Ethereum, EthereumWallet, Network, NetworkTransactionBuilder, NetworkWallet, TransactionBuilder, TransactionBuilderError, }; -use alloy_primitives::{Address, B256, Bytes}; +use alloy_primitives::{Address, B256, Bytes, keccak256}; use alloy_provider::Provider; use alloy_rpc_types_eth::{TransactionReceipt, TransactionRequest}; use alloy_transport::TransportError; @@ -111,6 +111,19 @@ impl PreparedTx { } } +/// A receipt confirmed to the required depth, with the timestamp of the canonical +/// block that includes it. +/// +/// The receipt poller already reads that block to check the receipt is canonical, so +/// the send loop gets the inclusion time without another RPC call. +#[derive(Debug)] +pub struct ConfirmedTx { + /// The confirmed receipt. + pub receipt: TransactionReceipt, + /// Unix timestamp, in seconds, of the block that includes the transaction. + pub block_timestamp: u64, +} + /// Mutable fee-bump state tracked across iterations in the send loop. /// /// Groups the values that [`SimpleTxManager::try_fee_bump`] updates on each @@ -989,6 +1002,8 @@ where } let start = self.runtime.now(); + // Inclusion is measured against an L1 block timestamp, which is wall-clock time. + let start_unix_ms = self.runtime.wall_clock_unix_millis(); // Wrap the event loop in a send timeout if configured. let result = if self.config.tx_send_timeout.is_zero() { @@ -1012,8 +1027,11 @@ where let latency_ms = u64::try_from(self.runtime.now().saturating_sub(start).as_millis()).unwrap_or(u64::MAX); - if result.is_ok() { + if let Ok(confirmed) = &result { self.metrics.record_send_latency(latency_ms, SendOutcome::Confirmed); + // Recorded with the send latency, so both series cover the same sends. + let included_unix_ms = confirmed.block_timestamp.saturating_mul(1_000); + self.metrics.record_inclusion_latency(included_unix_ms.saturating_sub(start_unix_ms)); self.metrics.record_tx_confirmed(); } else { self.metrics.record_send_latency(latency_ms, SendOutcome::Failed); @@ -1039,7 +1057,7 @@ where self.nonce_manager.return_reserved_nonce(n).await; } - result + result.map(|confirmed| confirmed.receipt) } fn should_reset_nonce_on_send_error( @@ -1096,7 +1114,7 @@ where candidate: &TxCandidate, send_state: &Arc, nonce_override: Option, - ) -> SendResponse { + ) -> TxManagerResult { // Initial transaction preparation. prepare() is NOT cancellation-safe, // so it runs to completion before entering the select loop. // The returned PreparedTx carries the actual on-wire fees, eliminating @@ -1109,7 +1127,7 @@ where // Receipt delivery channel — mpsc because fee bumps may spawn // new wait tasks with different tx hashes. - let (receipt_tx, mut receipt_rx) = mpsc::channel::(1); + let (receipt_tx, mut receipt_rx) = mpsc::channel::(1); // Spawn background receipt polling for the initial tx hash. self.spawn_wait_for_tx(Arc::clone(send_state), bump.tx_hash, receipt_tx.clone()); @@ -1131,14 +1149,14 @@ where // If a receipt is already waiting, return it immediately // instead of performing a wasted fee bump. - if let Ok(receipt) = receipt_rx.try_recv() { + if let Ok(confirmed) = receipt_rx.try_recv() { info!( - tx_hash = %receipt.transaction_hash, - block = ?receipt.block_number, - status = %receipt.inner.status(), + tx_hash = %confirmed.receipt.transaction_hash, + block = ?confirmed.receipt.block_number, + status = %confirmed.receipt.inner.status(), "transaction receipt received", ); - return Ok(receipt); + return Ok(confirmed); } // Respond immediately to the bump-fees flag set by @@ -1163,14 +1181,14 @@ where biased; result = receipt_rx.recv() => { match result { - Some(receipt) => { + Some(confirmed) => { info!( - tx_hash = %receipt.transaction_hash, - block = ?receipt.block_number, - status = %receipt.inner.status(), + tx_hash = %confirmed.receipt.transaction_hash, + block = ?confirmed.receipt.block_number, + status = %confirmed.receipt.inner.status(), "transaction receipt received", ); - return Ok(receipt); + return Ok(confirmed); } None => { // All senders dropped — should not happen in normal flow. @@ -1196,7 +1214,7 @@ where &self, candidate: &TxCandidate, send_state: &Arc, - receipt_tx: &mpsc::Sender, + receipt_tx: &mpsc::Sender, state: &mut BumpState, ) { // If a receipt-polling task has already detected a published version @@ -1238,7 +1256,7 @@ where &self, candidate: &TxCandidate, send_state: &Arc, - receipt_tx: &mpsc::Sender, + receipt_tx: &mpsc::Sender, old: &BumpState, ) -> TxManagerResult { let bumped = @@ -1331,7 +1349,7 @@ where /// Broadcasts a raw transaction to the network. /// /// On success, records a successful publish on the [`SendState`] and - /// returns the transaction hash. On [`TxManagerError::AlreadyKnown`] + /// returns the locally computed transaction hash. On [`TxManagerError::AlreadyKnown`] /// after a prior successful publish, treats it as success — records /// another successful publish and returns `Ok(last_tx_hash)` so /// callers do not need to special-case this variant. All other errors @@ -1341,6 +1359,15 @@ where /// successful publish. When the network returns `AlreadyKnown` on /// resubmission, this hash is returned as the successful result. /// + /// The returned hash never comes from the RPC. It is the decoded envelope's + /// [`TxEnvelope::tx_hash`], which excludes any EIP-4844 blob sidecar. If `raw_tx` + /// does not decode as a known envelope, it falls back to `keccak256(raw_tx)`, the + /// EIP-2718 hash of any typed transaction whose network encoding equals its + /// consensus encoding; a well-formed RPC hash is not preferred, because the RPC + /// reply is advisory. A different or undecodable hash in a valid JSON-RPC success + /// response only logs a warning; only a transport failure, an invalid response + /// envelope, or a JSON-RPC error response is a publication error. + /// /// # Errors /// /// Returns the classified error on publication failure. @@ -1350,23 +1377,48 @@ where raw_tx: &Bytes, last_tx_hash: Option, ) -> TxManagerResult { + let local_tx_hash = match TxEnvelope::decode_2718_exact(raw_tx) { + Ok(envelope) => *envelope.tx_hash(), + Err(error) => { + // Unknown transaction types must not turn a successful broadcast into an error. + warn!(%error, "could not decode transaction, hashing raw bytes as a fallback"); + keccak256(raw_tx) + } + }; + // Decode the result separately so invalid response envelopes remain publication errors. let result = RuntimeTimeout::run( &self.runtime, self.config.network_timeout, - self.provider.send_raw_transaction(raw_tx), + self.provider + .client() + .request::<_, serde_json::Value>("eth_sendRawTransaction", (raw_tx,)), ) .await; match result { - Ok(Ok(pending)) => { - let tx_hash = *pending.tx_hash(); + Ok(Ok(response)) => { + match serde_json::from_value::(response) { + Ok(rpc_tx_hash) if rpc_tx_hash != local_tx_hash => { + warn!( + local_tx_hash = %local_tx_hash, + rpc_tx_hash = %rpc_tx_hash, + "RPC returned a different transaction hash, using locally computed hash" + ); + } + Err(_) => { + warn!( + local_tx_hash = %local_tx_hash, + "RPC returned an undecodable transaction hash, treating publication as successful" + ); + } + Ok(_) => {} + } send_state.record_successful_publish(); - info!(tx_hash = %tx_hash, "transaction published"); - Ok(tx_hash) + info!(tx_hash = %local_tx_hash, "transaction published"); + Ok(local_tx_hash) } Ok(Err(e)) => { let classified = self.classify_and_record_rpc(&e); - // AlreadyKnown on resubmission is a success — the tx is in // the mempool from a prior publish. Return the previous hash. if classified.is_already_known() && send_state.has_published() { @@ -1468,20 +1520,20 @@ where &self, send_state: Arc, tx_hash: B256, - receipt_tx: mpsc::Sender, + receipt_tx: mpsc::Sender, ) { let manager = self.clone(); self.runtime.spawn(async move { debug!(tx_hash = %tx_hash, "starting receipt polling"); // Stop polling once the receiver is dropped. Nobody can consume the receipt then. - let receipt = tokio::select! { + let confirmed = tokio::select! { biased; () = receipt_tx.closed() => None, - receipt = manager.wait_mined_for_tx(&send_state, tx_hash) => receipt, + confirmed = manager.wait_mined_for_tx(&send_state, tx_hash) => confirmed, }; - if let Some(receipt) = receipt { - let _ = receipt_tx.send(receipt).await; + if let Some(confirmed) = confirmed { + let _ = receipt_tx.send(confirmed).await; } debug!(tx_hash = %tx_hash, "receipt polling ended"); @@ -1493,7 +1545,7 @@ where &self, send_state: &SendState, tx_hash: B256, - ) -> Option { + ) -> Option { Self::wait_mined_using_runtime( &self.runtime, send_state, @@ -1527,6 +1579,7 @@ where closed, ) .await + .map(|confirmed| confirmed.receipt) } /// Runtime-backed implementation of [`wait_mined`](Self::wait_mined). @@ -1537,7 +1590,7 @@ where tx_hash: B256, config: &TxManagerConfig, closed: &AtomicBool, - ) -> Option + ) -> Option where Rt: Runtime, { @@ -1562,7 +1615,7 @@ where ) .await { - Ok(Some(receipt)) => return Some(receipt), + Ok(Some(confirmed)) => return Some(confirmed), Ok(None) => { // Not yet confirmed — continue polling. } @@ -1608,6 +1661,7 @@ where network_timeout, ) .await + .map(|confirmed| confirmed.map(|confirmed| confirmed.receipt)) } /// Runtime-backed implementation of [`query_receipt`](Self::query_receipt). @@ -1618,7 +1672,7 @@ where tx_hash: B256, num_confirmations: u64, network_timeout: Duration, - ) -> TxManagerResult> + ) -> TxManagerResult> where Rt: Runtime, { @@ -1680,10 +1734,8 @@ where .map_err(|_| TxManagerError::Rpc("get_block_by_number timed out".into()))? .map_err(|e| RpcErrorClassifier::classify_rpc_error(&e))?; - let is_canonical = - canonical_block.as_ref().is_some_and(|block| block.header.hash == receipt_block_hash); - - if !is_canonical { + let Some(block) = canonical_block.filter(|block| block.header.hash == receipt_block_hash) + else { send_state.tx_not_mined(tx_hash); debug!( tx_hash = %tx_hash, @@ -1692,7 +1744,7 @@ where "receipt block hash does not match canonical chain", ); return Ok(None); - } + }; // Receipt is on the canonical chain — record as mined. send_state.tx_mined(tx_hash); @@ -1706,7 +1758,7 @@ where num_confirmations = %num_confirmations, "transaction confirmed to required depth", ); - Ok(Some(receipt)) + Ok(Some(ConfirmedTx { receipt, block_timestamp: block.header.timestamp })) } else { debug!( tx_hash = %tx_hash, @@ -1764,30 +1816,43 @@ where #[cfg(test)] mod tests { + //! The receipt-checking provider wraps Alloy's concrete RPC builders, which automock + //! cannot construct, to reject confirmation under an RPC-supplied hash. + use std::{ sync::{Arc, atomic::AtomicBool}, time::Duration, }; - use alloy_consensus::{Eip658Value, Receipt, ReceiptEnvelope, ReceiptWithBloom, TxEip1559}; + use alloy_consensus::{ + Eip658Value, Receipt, ReceiptEnvelope, ReceiptWithBloom, SignableTransaction, TxEip1559, + TxEip4844, TxEip4844WithSidecar, + }; + use alloy_eips::{Encodable2718, eip4844::Blob}; use alloy_network::EthereumWallet; use alloy_node_bindings::Anvil; - use alloy_primitives::{Address, B256, Bloom, Bytes, TxKind, U256}; - use alloy_provider::{ProviderBuilder, RootProvider}; + use alloy_primitives::{Address, B256, Bloom, Bytes, TxKind, U256, keccak256}; + use alloy_provider::{Provider, ProviderBuilder, ProviderCall, RootProvider}; use alloy_rpc_types_eth::{Block, TransactionReceipt}; + use alloy_signer::SignerSync; use alloy_signer_local::PrivateKeySigner; use alloy_transport::mock::Asserter; use base_runtime::{ Clock, deterministic::{Config, Runner}, }; + use mockall::predicate::eq; use rstest::rstest; - use tokio::sync::mpsc; + use tokio::{ + io::{AsyncReadExt, AsyncWriteExt}, + net::TcpListener, + sync::mpsc, + }; use super::{PreparedTx, SimpleTxManager, TxEnvelope}; use crate::{ - GasPriceCaps, NonceManager, NoopTxMetrics, SendState, TxCandidate, TxManagerConfig, - TxManagerError, + BlobTxBuilder, GasPriceCaps, NonceManager, NoopTxMetrics, SendOutcome, SendState, + TxCandidate, TxManager, TxManagerConfig, TxManagerError, metrics::MockTxMetrics, }; async fn setup() -> (SimpleTxManager, alloy_node_bindings::AnvilInstance) { @@ -1809,10 +1874,248 @@ mod tests { (manager, anvil) } + #[derive(Debug, Clone)] + struct ReceiptHashProvider { + inner: RootProvider, + local_tx_hash: B256, + } + + impl Provider for ReceiptHashProvider { + fn root(&self) -> &RootProvider { + &self.inner + } + + fn get_transaction_receipt( + &self, + hash: B256, + ) -> ProviderCall<(B256,), Option> { + assert_eq!(hash, self.local_tx_hash, "receipt polling must use the local hash"); + self.inner.get_transaction_receipt(hash) + } + } + + fn signed_eip1559() -> TxEnvelope { + let tx = TxEip1559 { + chain_id: 1, + gas_limit: 21_000, + max_fee_per_gas: 2_000_000_000, + max_priority_fee_per_gas: 1_000_000_000, + to: TxKind::Call(Address::with_last_byte(0x42)), + ..Default::default() + }; + let signature = PrivateKeySigner::random().sign_hash_sync(&tx.signature_hash()).unwrap(); + tx.into_signed(signature).into() + } + + #[tokio::test] + async fn publish_tx_confirms_local_hash_when_rpc_hash_differs() { + let envelope = signed_eip1559(); + let raw_tx = envelope.encoded_2718().into(); + let local_tx_hash = *envelope.tx_hash(); + let rpc_tx_hash = B256::with_last_byte(0x42); + let (receipt, block) = mined_receipt(local_tx_hash, 10); + let asserter = Asserter::new(); + asserter.push_success(&1u64); + asserter.push_success(&rpc_tx_hash); + asserter.push_success(&10u64); + asserter.push_success(&Some(&receipt)); + asserter.push_success(&Some(&block)); + let provider = ReceiptHashProvider { + inner: ProviderBuilder::default().connect_mocked_client(asserter), + local_tx_hash, + }; + let manager = SimpleTxManager::from_wallet( + provider, + EthereumWallet::from(PrivateKeySigner::random()), + TxManagerConfig { num_confirmations: 1, ..TxManagerConfig::default() }, + 1, + Arc::new(NoopTxMetrics), + ) + .await + .expect("should construct manager"); + let send_state = SendState::new(3).expect("should construct send state"); + + let tx_hash = manager + .publish_tx(&send_state, &raw_tx, None) + .await + .expect("an unexpected RPC hash must not fail publication"); + let confirmed = tokio::time::timeout( + Duration::from_secs(1), + SimpleTxManager::::wait_mined( + &send_state, + manager.provider(), + tx_hash, + manager.config(), + &AtomicBool::new(false), + ), + ) + .await + .expect("local transaction should confirm") + .expect("should return a confirmed receipt"); + + assert_eq!(tx_hash, local_tx_hash); + assert_eq!(confirmed.transaction_hash, local_tx_hash); + assert_ne!(confirmed.transaction_hash, rpc_tx_hash); + assert!(send_state.has_published()); + } + + #[tokio::test] + async fn publish_tx_succeeds_when_rpc_hash_is_undecodable() { + let envelope = signed_eip1559(); + let raw_tx = envelope.encoded_2718().into(); + let asserter = Asserter::new(); + asserter.push_success(&1u64); + asserter.push_success(&"0xnot-a-hash"); + let provider = ProviderBuilder::new().connect_mocked_client(asserter); + let manager = SimpleTxManager::from_wallet( + provider, + EthereumWallet::from(PrivateKeySigner::random()), + TxManagerConfig::default(), + 1, + Arc::new(NoopTxMetrics), + ) + .await + .expect("should construct manager"); + let send_state = SendState::new(3).expect("should construct send state"); + + let tx_hash = manager + .publish_tx(&send_state, &raw_tx, None) + .await + .expect("an undecodable RPC hash must not fail publication"); + + assert_eq!(tx_hash, *envelope.tx_hash()); + assert!(send_state.has_published()); + } + + #[rstest] + #[case::canonical_rpc_hash(false)] + #[case::mismatched_rpc_hash(true)] + #[tokio::test] + async fn publish_tx_tracks_blob_hash_without_sidecar(#[case] mismatched_rpc_hash: bool) { + let sidecar = BlobTxBuilder::build_sidecar(&[Box::::default()]).unwrap(); + let tx = TxEip4844 { + chain_id: 1, + gas_limit: 21_000, + max_fee_per_gas: 2_000_000_000, + max_priority_fee_per_gas: 1_000_000_000, + max_fee_per_blob_gas: 1_000_000_000, + to: Address::with_last_byte(0x42), + blob_versioned_hashes: sidecar.versioned_hashes().collect(), + ..Default::default() + }; + let signature = PrivateKeySigner::random().sign_hash_sync(&tx.signature_hash()).unwrap(); + let tx: TxEip4844WithSidecar = + TxEip4844WithSidecar::from_tx_and_sidecar(tx, sidecar.into()); + let envelope: TxEnvelope = tx.into_signed(signature).into(); + let raw_tx = Bytes::from(envelope.encoded_2718()); + let canonical_hash = *envelope.tx_hash(); + assert_ne!(canonical_hash, keccak256(&raw_tx)); + let rpc_hash = + if mismatched_rpc_hash { B256::with_last_byte(0x42) } else { canonical_hash }; + let asserter = Asserter::new(); + asserter.push_success(&1u64); + asserter.push_success(&rpc_hash); + let manager = SimpleTxManager::from_wallet( + ProviderBuilder::new().connect_mocked_client(asserter), + EthereumWallet::from(PrivateKeySigner::random()), + TxManagerConfig::default(), + 1, + Arc::new(NoopTxMetrics), + ) + .await + .unwrap(); + let send_state = SendState::new(3).unwrap(); + + let tracked_hash = manager.publish_tx(&send_state, &raw_tx, None).await.unwrap(); + + assert_eq!(tracked_hash, canonical_hash); + assert!(send_state.has_published()); + } + + #[tokio::test] + async fn publish_tx_does_not_fail_for_an_unknown_transaction_type() { + let raw_tx = Bytes::from_static(&[0x7f]); + let expected_hash = keccak256(&raw_tx); + let asserter = Asserter::new(); + asserter.push_success(&1u64); + asserter.push_success(&expected_hash); + let manager = SimpleTxManager::from_wallet( + ProviderBuilder::new().connect_mocked_client(asserter), + EthereumWallet::from(PrivateKeySigner::random()), + TxManagerConfig::default(), + 1, + Arc::new(NoopTxMetrics), + ) + .await + .unwrap(); + let send_state = SendState::new(3).unwrap(); + + assert_eq!(manager.publish_tx(&send_state, &raw_tx, None).await.unwrap(), expected_hash); + assert!(send_state.has_published()); + } + + #[rstest] + #[case::html("rate limited")] + #[case::empty("")] + #[case::non_rpc_json(r#"{"message":"rate limited"}"#)] + #[tokio::test] + async fn publish_tx_rejects_invalid_response_envelopes(#[case] body: &'static str) { + let listener = TcpListener::bind("127.0.0.1:0").await.unwrap(); + let url = format!("http://{}", listener.local_addr().unwrap()).parse().unwrap(); + let server = tokio::spawn(async move { + tokio::time::timeout(Duration::from_secs(5), async move { + for body in [r#"{"jsonrpc":"2.0","id":0,"result":"0x1"}"#, body] { + let (mut stream, _) = listener.accept().await.unwrap(); + let mut request = Vec::with_capacity(1024); + loop { + assert_ne!(stream.read_buf(&mut request).await.unwrap(), 0); + if let Some(end) = request.windows(4).position(|w| w == b"\r\n\r\n") + && serde_json::from_slice::(&request[end + 4..]) + .is_ok() + { + break; + } + } + let response = format!( + "HTTP/1.1 200 OK\r\nContent-Length: {}\r\nConnection: close\r\n\r\n{body}", + body.len() + ); + stream.write_all(response.as_bytes()).await.unwrap(); + } + }) + .await + .expect("HTTP server should finish"); + }); + let manager = SimpleTxManager::from_wallet( + RootProvider::new_http(url), + EthereumWallet::from(PrivateKeySigner::random()), + TxManagerConfig { network_timeout: Duration::from_secs(1), ..Default::default() }, + 1, + Arc::new(NoopTxMetrics), + ) + .await + .unwrap(); + let send_state = SendState::new(3).unwrap(); + send_state.set_runtime_mempool_deadline(Duration::from_secs(1)); + + let result = + manager.publish_tx(&send_state, &signed_eip1559().encoded_2718().into(), None).await; + + assert_eq!(result, Err(TxManagerError::Rpc("transport request failed".into()))); + assert!(!send_state.has_published()); + assert_eq!( + send_state.critical_error_at(Duration::from_secs(1)), + Some(TxManagerError::MempoolDeadlineExpired) + ); + server.await.unwrap(); + } + #[tokio::test] async fn publish_tx_retries_nonce_too_high() { let asserter = Asserter::new(); - let expected_hash = B256::with_last_byte(0x42); + let envelope = signed_eip1559(); + let raw_tx = envelope.encoded_2718().into(); + let expected_hash = *envelope.tx_hash(); asserter.push_success(&1u64); asserter.push_failure_msg("nonce too high"); asserter.push_success(&expected_hash); @@ -1831,7 +2134,7 @@ mod tests { let send_state = SendState::new(3).expect("should construct send state"); let hash = manager - .publish_tx_with_nonce_retry(&send_state, &Bytes::from_static(&[0x02])) + .publish_tx_with_nonce_retry(&send_state, &raw_tx) .await .expect("nonce-too-high publication should be retried"); @@ -1867,7 +2170,7 @@ mod tests { }); let err = manager - .publish_tx_with_nonce_retry(&send_state, &Bytes::from_static(&[0x02])) + .publish_tx_with_nonce_retry(&send_state, &signed_eip1559().encoded_2718().into()) .await .expect_err("closed manager must not retry publication"); assert_eq!(err, TxManagerError::ChannelClosed); @@ -1878,7 +2181,9 @@ mod tests { fn publish_retry_uses_injected_runtime_sleep() { Runner::start(Config::seeded(0), |ctx| async move { let asserter = Asserter::new(); - let expected_hash = B256::with_last_byte(0x42); + let envelope = signed_eip1559(); + let raw_tx = envelope.encoded_2718().into(); + let expected_hash = *envelope.tx_hash(); asserter.push_success(&1u64); asserter.push_failure_msg("nonce too high"); asserter.push_success(&expected_hash); @@ -1903,7 +2208,7 @@ mod tests { let send_state = SendState::new(3).expect("should construct send state"); let hash = manager - .publish_tx_with_nonce_retry(&send_state, &Bytes::from_static(&[0x02])) + .publish_tx_with_nonce_retry(&send_state, &raw_tx) .await .expect("injected runtime should drive the nonce-too-high retry"); @@ -1942,7 +2247,7 @@ mod tests { send_state.set_runtime_mempool_deadline(ctx.now() + Duration::from_secs(1)); let err = manager - .publish_tx_with_nonce_retry(&send_state, &Bytes::from_static(&[0x02])) + .publish_tx_with_nonce_retry(&send_state, &signed_eip1559().encoded_2718().into()) .await .expect_err("retry must not publish after the mempool deadline"); @@ -2002,7 +2307,10 @@ mod tests { let confirmed = manager.wait_mined_for_tx(&send_state, tx_hash).await; - assert_eq!(confirmed.map(|receipt| receipt.transaction_hash), Some(tx_hash)); + assert_eq!( + confirmed.map(|confirmed| confirmed.receipt.transaction_hash), + Some(tx_hash) + ); assert_eq!(ctx.now(), Duration::from_secs(4)); }); } @@ -2092,6 +2400,64 @@ mod tests { }); } + /// A confirmed send records its inclusion latency together with its send latency, + /// from the timestamp of the canonical block the receipt poller already read: the + /// latency runs from the start of the send, in milliseconds of wall-clock time, to + /// that timestamp, and no other block is read. + #[test] + fn confirmed_send_records_inclusion_latency_with_send_latency() { + Runner::start(Config::seeded(0), |ctx| async move { + let tx_hash = B256::with_last_byte(1); + let (receipt, mut block) = mined_receipt(tx_hash, 10); + block.header.inner.timestamp = 1_700_000_020; + let mut latest: Block = Block::default(); + latest.header.base_fee_per_gas = Some(1_000_000_000); + let asserter = Asserter::new(); + asserter.push_success(&1u64); + asserter.push_success(&1_000_000_000u128); + asserter.push_success(&Some(&latest)); + asserter.push_success(&21_000u64); + asserter.push_success(&0u64); + asserter.push_success(&tx_hash); + asserter.push_success(&10u64); + asserter.push_success(&Some(&receipt)); + asserter.push_success(&Some(&block)); + let mut metrics = MockTxMetrics::new(); + metrics + .expect_record_send_latency() + .with(eq(0), eq(SendOutcome::Confirmed)) + .times(1) + .return_const(()); + // The send starts at 1_700_000_000.300 s and the block's timestamp is 1_700_000_020 s. + metrics.expect_record_inclusion_latency().with(eq(19_700)).times(1).return_const(()); + // The send also records fee, nonce and outcome metrics, which this test does not check. + metrics.expect_record_basefee().return_const(()); + metrics.expect_record_tipcap().return_const(()); + metrics.expect_record_tx_max_fee().return_const(()); + metrics.expect_record_current_nonce().return_const(()); + metrics.expect_record_tx_confirmed().return_const(()); + let manager = SimpleTxManager::from_wallet_with_runtime( + ctx.clone(), + ProviderBuilder::new().connect_mocked_client(asserter.clone()), + EthereumWallet::from(PrivateKeySigner::random()), + TxManagerConfig { num_confirmations: 1, ..TxManagerConfig::default() }, + 1, + Arc::new(metrics), + ) + .await + .expect("should construct manager"); + ctx.sleep(Duration::from_millis(300)).await; + + let confirmed = manager + .send(TxCandidate { to: Some(Address::with_last_byte(0x42)), ..Default::default() }) + .await + .expect("the send should confirm"); + + assert_eq!(confirmed.transaction_hash, tx_hash); + assert!(asserter.read_q().is_empty(), "every mocked response should be used"); + }); + } + // ── should_reset_nonce_on_send_error ─────────────────────────────── #[rstest] diff --git a/crates/utilities/tx-manager/src/metrics.rs b/crates/utilities/tx-manager/src/metrics.rs index 82045e0c91..fbb4a119f0 100644 --- a/crates/utilities/tx-manager/src/metrics.rs +++ b/crates/utilities/tx-manager/src/metrics.rs @@ -15,6 +15,11 @@ base_metrics::define_metrics! { #[label(name)] #[label(name = "outcome")] tx_send_latency_ms: histogram, + #[describe( + "Time in milliseconds from the start of a send until the L1 block that includes the confirmed transaction" + )] + #[label(name)] + tx_inclusion_latency_ms: histogram, #[describe("Current nonce value")] #[label(name)] current_nonce: gauge, @@ -66,6 +71,7 @@ impl SendOutcome { /// /// Implement this trait to plug in your own metrics backend. A [`BaseTxMetrics`] /// implementation backed by the [`metrics`] crate is provided for production use. +#[cfg_attr(test, mockall::automock)] pub trait TxMetrics: Send + Sync + Debug + 'static { /// Record the maximum possible transaction fee in gwei (`gas_limit` * `fee_cap`). fn record_tx_max_fee(&self, fee_gwei: f64); @@ -76,6 +82,14 @@ pub trait TxMetrics: Send + Sync + Debug + 'static { /// Record the send-loop latency in milliseconds, split by how the send ended. fn record_send_latency(&self, latency_ms: u64, outcome: SendOutcome); + /// Record the time in milliseconds from the start of a confirmed send until + /// the timestamp of the L1 block that includes the transaction. + /// + /// It is recorded together with the confirmed send latency of the same send and + /// starts at the same moment, so the confirmed send latency minus this one is the + /// time spent waiting for confirmations. + fn record_inclusion_latency(&self, latency_ms: u64); + /// Record the current nonce. fn record_current_nonce(&self, nonce: u64); @@ -119,6 +133,7 @@ impl TxMetrics for NoopTxMetrics { fn record_tx_max_fee(&self, _fee_gwei: f64) {} fn record_gas_bump(&self) {} fn record_send_latency(&self, _latency_ms: u64, _outcome: SendOutcome) {} + fn record_inclusion_latency(&self, _latency_ms: u64) {} fn record_current_nonce(&self, _nonce: u64) {} fn record_publish_error(&self) {} fn record_basefee(&self, _basefee_gwei: f64) {} @@ -178,6 +193,10 @@ impl TxMetrics for BaseTxMetrics { TxManagerMetrics::tx_send_latency_ms(self.name, outcome.as_str()).record(latency_ms as f64); } + fn record_inclusion_latency(&self, latency_ms: u64) { + TxManagerMetrics::tx_inclusion_latency_ms(self.name).record(latency_ms as f64); + } + fn record_current_nonce(&self, nonce: u64) { TxManagerMetrics::current_nonce(self.name).set(nonce as f64); } @@ -237,6 +256,7 @@ mod tests { m.record_tx_max_fee(1.5); m.record_gas_bump(); m.record_send_latency(120, SendOutcome::Failed); + m.record_inclusion_latency(80); m.record_current_nonce(42); m.record_publish_error(); m.record_basefee(30.123); diff --git a/docs/transaction-events/README.md b/docs/transaction-events/README.md index 4ebb1ae9ae..99b6143831 100644 --- a/docs/transaction-events/README.md +++ b/docs/transaction-events/README.md @@ -216,7 +216,7 @@ Forwarding: - `TXPOOL_BUILDER_CONSUMED` (retired) - `TXPOOL_BUILDER_FORWARD_ATTEMPT` - `TXPOOL_BUILDER_FORWARD_SUCCESS` (retired) -- `TXPOOL_BUILDER_FORWARD_FAILURE` +- `TXPOOL_BUILDER_FORWARD_FAILURE` (retired) - `TXPOOL_BUILDER_FORWARD_DROPPED` - `TXPOOL_VALIDATED_INSERT_ACCEPTED` - `TXPOOL_VALIDATED_INSERT_REJECTED` @@ -226,16 +226,20 @@ and forwards it again every `--tx-forwarding-resend-after-ms` while it stays pending. A transaction carrying validity predicates is resent only after its forward to that builder failed. Each destination has its own pool reader and queue, so the mempool node does not journal the hand-off: it no longer emits -`TXPOOL_BUILDER_CONSUMED` or `TXPOOL_BUILDER_FORWARD_SUCCESS`. Successful -delivery is recorded by the receiving builder as -`TXPOOL_VALIDATED_INSERT_ACCEPTED` or `TXPOOL_VALIDATED_INSERT_REJECTED`, -whose event ID includes the builder host. A send that fails is recorded by the -mempool node as `TXPOOL_BUILDER_FORWARD_FAILURE` or -`TXPOOL_BUILDER_FORWARD_DROPPED`. `TXPOOL_BUILDER_FORWARD_ATTEMPT` is emitted -only for RPC retries (`data.attempt` >= 1). The time a transaction was queued -for each destination, its position in the pool iterator, and how many times it -was resent are not journaled; the reader and forwarder metrics cover them in -aggregate. +`TXPOOL_BUILDER_CONSUMED`, `TXPOOL_BUILDER_FORWARD_SUCCESS` or +`TXPOOL_BUILDER_FORWARD_FAILURE`. A send that reaches a builder is recorded by +that builder as `TXPOOL_VALIDATED_INSERT_ACCEPTED` or +`TXPOOL_VALIDATED_INSERT_REJECTED`, whose event ID includes the builder host and +which only the active sequencer journals. Every builder receives every +transaction, so a node-side failure row per destination duplicated the leader's +verdict and added standby and canary verdicts that never decide inclusion; on +mainnet those were 88% of the rows. Per-builder rejection counts remain in the +forwarder metrics. A send that never reaches the builder is recorded by the +mempool node as `TXPOOL_BUILDER_FORWARD_DROPPED`, and +`TXPOOL_BUILDER_FORWARD_ATTEMPT` is emitted only for RPC retries +(`data.attempt` >= 1). The time a transaction was queued for each destination, +its position in the pool iterator, and how many times it was resent are not +journaled; the reader and forwarder metrics cover them in aggregate. `TXPOOL_BUILDER_FORWARD_DROPPED` is emitted only for transaction-scoped drops where the forwarding task still knows the `tx_hash`, such as final RPC failure diff --git a/etc/docs-index.toml b/etc/docs-index.toml index f8938b83a3..0991c9aca1 100644 --- a/etc/docs-index.toml +++ b/etc/docs-index.toml @@ -152,7 +152,7 @@ digest = "d1525977c0" ["crates/batcher/cli/README.md"] summary = "base-batcher-cli: base batcher flags and startup, with sequencer endpoints and leader search, channel and DA config, and shadow mode posting to the inbox a parity validator derives its chain from." -digest = "1ccdbc3fb7" +digest = "643fdad047" ["crates/batcher/comp/README.md"] summary = "base-comp: incremental Brotli channel compression (CompressionStream, BrotliLevel) producing protocol-compatible channels; batch encoding and framing live in batcher-encoder." @@ -164,7 +164,7 @@ digest = "de7352c3a8" ["crates/batcher/encoder/README.md"] summary = "base-batcher-encoder: synchronous, no-I/O encoder from L2 blocks to L1 submissions. Covers channel closing rules, blob framing, metric labels, and BatchEncoder usage." -digest = "e8624eb69c" +digest = "fb6b135435" ["crates/batcher/service/README.md"] summary = "base-batcher-service: BatcherConfig and BatcherService, which wire the encoder, block source, tx manager, and driver into a running batcher process." @@ -187,8 +187,8 @@ summary = "base-builder-metering: MeteringStore (DashMap with LRU eviction) impl digest = "89c5698c36" ["crates/builder/multiplex/README.md"] -summary = "Runs flashblocks and basic payload builders in parallel behind one handle, selecting basic at Denim; cutover mode is off by default and a separate basic-only mode runs just the basic builder." -digest = "76c9d91a5c" +summary = "Runs flashblocks and basic payload builders behind one handle, selecting basic at Denim; covers cutover and basic-only modes and passing frozen-payload notifications to the basic builder." +digest = "4135cd2df3" ["crates/builder/publish/README.md"] summary = "WebSocket broadcast publisher for the block builder (WebSocketPublisher, Listener, BroadcastLoop, metrics traits). Use when changing how serialized payloads are pushed to connected subscribers." @@ -387,8 +387,8 @@ summary = "base-execution-rpc: BaseEthApi, BaseEngineApi, debug, miner, sequence digest = "2a3542b962" ["crates/execution/runner/README.md"] -summary = "base-node-runner: BaseNodeExtension and FromExtensionConfig traits plus the NodeHooks accumulator for modular node extensions, with an example custom extension. Use to add node extensions." -digest = "7b36a6705f" +summary = "base-node-runner: BaseNodeExtension, FromExtensionConfig and NodeHooks for node extensions, plus the frozen-payload notification channel (PayloadReady) the unified sequencer uses to seal early." +digest = "029ce212e6" ["crates/execution/shadow-indexer-db/README.md"] summary = "One-line stub: database access layer for shadow indexer block persistence. Little detail beyond that." @@ -644,7 +644,7 @@ digest = "b82a5a3590" ["crates/utilities/tx-manager/README.md"] summary = "Transaction lifecycle manager for EIP-1559/4844 txs: TxManager, fee bumping, nonce management, send state, error classification, blob sidecars, CLI config macros. Use when sending onchain txs." -digest = "2b7de390c1" +digest = "f785ad17e1" ["crates/utilities/upgrade-signal/README.md"] summary = "Reads upgrade activation timestamps and minimum protocol version from the L1 ProtocolVersions contract; covers modes (metrics-only, startup-apply, runtime-admin), CLI flags, defaults, metrics." @@ -680,7 +680,7 @@ digest = "e87f3373b8" ["docs/transaction-events/README.md"] summary = "Spec for transaction-event/v1, the JSONL business event journal for transaction observability: config fields, envelope, event vocabulary, Vector to audit-archiver ingest, Postgres retention, examples." -digest = "7a35820370" +digest = "7e811c1bb5" ["docs/transaction-events/tips-parity-checklist.md"] summary = "Checklist for verifying TIPS UI audit-archiver/Postgres responses match the S3-backed routes (block, txn, bundle, rejected) before switching TIPS_UI_QUERY_BACKEND=audit." diff --git a/etc/scripts/devnet/grafana/dashboards/shadow-batcher.json b/etc/scripts/devnet/grafana/dashboards/shadow-batcher.json index dd0489f9ae..acd8576068 100644 --- a/etc/scripts/devnet/grafana/dashboards/shadow-batcher.json +++ b/etc/scripts/devnet/grafana/dashboards/shadow-batcher.json @@ -2244,7 +2244,7 @@ "type": "prometheus", "uid": "PBFA97CFB590B2093" }, - "description": "Mean time from send to confirmation for L1 batcher txs.", + "description": "Mean time from send to confirmation for L1 batcher txs, stacked: the wait until the tx is included in an L1 block, then the wait for confirmations.", "fieldConfig": { "defaults": { "color": { @@ -2276,7 +2276,7 @@ "spanNulls": false, "stacking": { "group": "A", - "mode": "none" + "mode": "normal" }, "thresholdsStyle": { "mode": "off" @@ -2324,10 +2324,21 @@ "uid": "PBFA97CFB590B2093" }, "editorMode": "code", - "expr": "sum(rate(base_tx_manager_tx_send_latency_ms_sum{job=\"batcher\",name=\"batcher\",outcome=\"confirmed\"}[$__rate_interval])) / clamp_min(sum(rate(base_tx_manager_tx_send_latency_ms_count{job=\"batcher\",name=\"batcher\",outcome=\"confirmed\"}[$__rate_interval])), 1e-9)", - "legendFormat": "avg latency", + "expr": "sum(rate(base_tx_manager_tx_inclusion_latency_ms_sum{job=\"batcher\",name=\"batcher\"}[$__rate_interval])) / clamp_min(sum(rate(base_tx_manager_tx_inclusion_latency_ms_count{job=\"batcher\",name=\"batcher\"}[$__rate_interval])), 1e-9)", + "legendFormat": "until included", "range": true, "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "expr": "(sum(rate(base_tx_manager_tx_send_latency_ms_sum{job=\"batcher\",name=\"batcher\",outcome=\"confirmed\"}[$__rate_interval])) / clamp_min(sum(rate(base_tx_manager_tx_send_latency_ms_count{job=\"batcher\",name=\"batcher\",outcome=\"confirmed\"}[$__rate_interval])), 1e-9)) - (sum(rate(base_tx_manager_tx_inclusion_latency_ms_sum{job=\"batcher\",name=\"batcher\"}[$__rate_interval])) / clamp_min(sum(rate(base_tx_manager_tx_inclusion_latency_ms_count{job=\"batcher\",name=\"batcher\"}[$__rate_interval])), 1e-9))", + "legendFormat": "included to confirmed", + "range": true, + "refId": "B" } ], "title": "Avg send latency, confirmed txs (ms)", diff --git a/etc/systems/tests/early_broadcast.rs b/etc/systems/tests/early_broadcast.rs new file mode 100644 index 0000000000..f5c3aee2fb --- /dev/null +++ b/etc/systems/tests/early_broadcast.rs @@ -0,0 +1,502 @@ +//! Real-stack coverage for the searcher timing problem solved by early block broadcast. +//! +//! Since the Denim network upgrade (200 ms blocks), a block that froze early still waited for +//! the 150 ms seal deadline before it was gossiped. A searcher reacting to block B then reached +//! the sequencer after block B+1's build had snapshotted the pool, and landed in block B+2. +//! Sealing on the execution layer's frozen-payload hint gossips block B early enough for the +//! same searcher to land in block B+1. +//! +//! The execution node is launched as `base sequencer` launches it with the Denim payload-builder +//! cutover, and drives the production engine and sequencer actors over the Engine API's IPC +//! endpoint at wall-clock cadence. L1 derivation, conductor, and P2P are not started: the test +//! reads the payloads the sequencer hands to gossip, and models the network between sequencer +//! and searcher as a fixed delay. + +use std::{ + collections::HashMap, + net::TcpListener, + sync::{Arc, Mutex}, + time::{Duration, SystemTime, UNIX_EPOCH}, +}; + +use alloy_consensus::SignableTransaction; +use alloy_eips::{ + BlockNumHash, + eip2718::{Decodable2718, Encodable2718}, +}; +use alloy_network::{ReceiptResponse, TransactionBuilder}; +use alloy_primitives::{Address, B256, Bytes, U256}; +use alloy_provider::{Provider, RootProvider}; +use alloy_rpc_client::RpcClient; +use alloy_rpc_types_engine::{ForkchoiceState, JwtSecret}; +use alloy_signer::SignerSync; +use alloy_signer_local::PrivateKeySigner; +use base_builder_core::BuilderConfig; +use base_builder_multiplex::MultiplexingServiceBuilder; +use base_common_consensus::BaseTxEnvelope; +use base_common_genesis::{BaseUpgrade, ChainGenesis, RollupConfig, SystemConfig, UpgradeConfig}; +use base_common_network::{Base, BaseEngineApi}; +use base_common_rpc_types::BaseTransactionRequest; +use base_common_rpc_types_engine::BaseExecutionPayloadEnvelope; +use base_consensus_derive::AttributesBuilder; +use base_consensus_engine::{Engine, EngineState}; +use base_consensus_node::{ + ConductorClient, EngineActor, EngineConfig, EngineProcessor, NodeActor, NodeOperatingMode, + PayloadBuilder, QueuedSequencerEngineClient, QueuedUnsafePayloadGossipClient, + RecoveryModeGuard, SequencerActor, SequencerEngineRequestCoordinator, + StandaloneAttributesBuilder, StandaloneDerivationClient, StandaloneOriginSelector, +}; +use base_execution_chainspec::BaseChainSpec; +use base_node_core::args::RollupArgs; +use base_node_runner::{ + BaseNodeRunner, LaunchedBaseNode, + test_utils::{L1_BLOCK_INFO_DEPOSIT_TX, load_chain_spec}, +}; +use base_protocol::{BlockInfo, DEFAULT_SEAL_OFFSET, L1BlockInfoTx, L2BlockInfo}; +use base_system_tests::{ANVIL_ACCOUNT_1, ANVIL_ACCOUNT_2}; +use eyre::{OptionExt, Result, bail, eyre}; +use reth_db::{ClientVersion, init_db, mdbx::DatabaseArguments}; +use reth_ethereum_forks::ForkCondition; +use reth_node_builder::{NodeBuilder, NodeConfig}; +use reth_node_core::args::{DatadirArgs, NetworkArgs, RpcServerArgs}; +use reth_tasks::Runtime; +use tokio::{ + sync::{mpsc, watch}, + time::timeout, +}; +use tokio_util::sync::CancellationToken; +use tracing::info; +use url::Url; + +const LEGACY_BLOCK_TIME: u64 = 2; +const TEST_TIMEOUT: Duration = Duration::from_secs(60); +const STEP_TIMEOUT: Duration = Duration::from_secs(20); +/// Delay from the sequencer gossiping a block to the searcher's reaction reaching the sequencer: +/// P2P hops to the searcher's node, then its transaction through proxyd and the mempool nodes. +/// The early broadcast design puts this at 50-85 ms on mainnet; this is the slow end. +const SEARCHER_ROUND_TRIP: Duration = Duration::from_millis(85); +/// Interval between Denim blocks: the build of block B+1 starts this long after block B's. +const BLOCK_INTERVAL: Duration = + Duration::from_millis(RollupConfig::NATIVE_SUBSECOND_BLOCK_INTERVAL_MILLIS); +/// Longest the test host may add to [`SEARCHER_ROUND_TRIP`] before a reaction no longer models +/// the searcher. +const SEARCHER_ROUND_TRIP_SLACK: Duration = Duration::from_millis(25); +/// Latest a block may freeze after its build starts and still be the block the design describes: +/// its mainnet p50 build time. +const FREEZE_BUDGET: Duration = Duration::from_millis(65); +/// Reactions each scenario asserts on. +const REACTIONS: usize = 3; +/// Opportunities the searcher may submit to collect [`REACTIONS`] on a busy host. +const MAX_OPPORTUNITIES: u64 = 20; + +/// One searcher reaction to a block carrying an opportunity. +#[derive(Debug)] +struct Reaction { + /// Block B, which included the opportunity. + opportunity_block: u64, + /// Block that included the searcher's reaction. + landed_block: u64, + /// When the execution layer froze block B, measured from the scheduled start of its build. + /// `None` if the freeze had not been observed by the time the block was gossiped. + froze_after: Option, + /// When block B was gossiped, measured from the scheduled start of its build. + gossiped_after: Duration, + /// When the reaction reached the sequencer, measured from the same instant. + reached_sequencer_after: Duration, +} + +impl Reaction { + /// Whether the test host kept to the scenario's timing: block B froze early and was sealed + /// in its own slot, and the reaction took the modelled round trip. A stalled host breaks + /// these however the sequencer seals, and shifts the reaction into a later block. + fn models_scenario(&self) -> bool { + self.froze_after.is_some_and(|froze_after| froze_after <= FREEZE_BUDGET) + && self.gossiped_after < BLOCK_INTERVAL + && self.reached_sequencer_after.saturating_sub(self.gossiped_after) + <= SEARCHER_ROUND_TRIP + SEARCHER_ROUND_TRIP_SLACK + } +} + +/// A searcher that reacts to opportunities it sees in gossiped blocks. +struct Searcher { + rpc: RootProvider, + gossip: mpsc::Receiver, + /// When the execution layer froze each payload, keyed by the payload's parent. + frozen_at: Arc>>, + rollup_config: Arc, + chain_id: u64, +} + +impl Searcher { + async fn next_gossiped_block(&mut self) -> Result { + timeout(STEP_TIMEOUT, self.gossip.recv()).await?.ok_or_eyre("sequencer stopped gossiping") + } + + /// Wall-clock time at which the sequencer is scheduled to start building `block_number`. + fn build_start(&self, block_number: u64) -> SystemTime { + UNIX_EPOCH + + Duration::from_millis(self.rollup_config.l2_block_timestamp_millis(block_number - 1)) + } + + /// Waits until blocks are built in their scheduled slots rather than catching up at startup: + /// only a block built in its own slot is gossiped before its timestamp. + async fn await_scheduled_cadence(&mut self) -> Result<()> { + loop { + let number = self.next_gossiped_block().await?.execution_payload.block_number(); + if SystemTime::now() < self.build_start(number + 1) { + return Ok(()); + } + } + } + + /// Submits an opportunity, reacts to the block that includes it, and reports where the + /// reaction landed. + async fn react(&mut self, nonce: u64) -> Result { + let opportunity = transfer(&ANVIL_ACCOUNT_1.private_key, nonce, self.chain_id)?; + let _pending = self.rpc.send_raw_transaction(&opportunity).await?; + let payload = loop { + let payload = self.next_gossiped_block().await?.execution_payload; + if payload.transactions().contains(&opportunity) { + break payload; + } + }; + let opportunity_block = payload.block_number(); + let build_start = self.build_start(opportunity_block); + let gossiped_after = SystemTime::now().duration_since(build_start)?; + let froze_after = self + .frozen_at + .lock() + .expect("freeze log lock poisoned") + .get(&payload.parent_hash()) + .and_then(|frozen_at| frozen_at.duration_since(build_start).ok()); + + tokio::time::sleep(SEARCHER_ROUND_TRIP).await; + let reaction = transfer(&ANVIL_ACCOUNT_2.private_key, nonce, self.chain_id)?; + let hash = *self.rpc.send_raw_transaction(&reaction).await?.tx_hash(); + let reached_sequencer_after = SystemTime::now().duration_since(build_start)?; + + let landed_block = timeout(STEP_TIMEOUT, async { + loop { + if let Some(receipt) = self.rpc.get_transaction_receipt(hash).await? { + eyre::ensure!(receipt.status(), "searcher reaction reverted"); + return receipt.block_number().ok_or_eyre("receipt missing block number"); + } + tokio::time::sleep(Duration::from_millis(20)).await; + } + }) + .await??; + Ok(Reaction { + opportunity_block, + landed_block, + froze_after, + gossiped_after, + reached_sequencer_after, + }) + } +} + +fn transfer(private_key: &B256, nonce: u64, chain_id: u64) -> Result { + let signer = PrivateKeySigner::from_bytes(private_key)?; + let transaction = BaseTransactionRequest::default() + .from(signer.address()) + .to(Address::repeat_byte(0xfe)) + .value(U256::from(1)) + .transaction_type(2) + .with_gas_limit(21_000) + .with_max_fee_per_gas(2_000_000_000) + .with_max_priority_fee_per_gas(1_000_000) + .with_chain_id(chain_id) + .with_nonce(nonce) + .build_typed_tx() + .map_err(|error| eyre!("invalid transaction: {error:?}"))?; + let signature = signer.sign_hash_sync(&transaction.signature_hash())?; + Ok(transaction.into_signed(signature).encoded_2718().into()) +} + +/// Runs a sequencer that seals on frozen-payload hints when `early_broadcast` is set, and on the +/// seal deadline alone otherwise, and returns a searcher's reactions to its blocks. +async fn searcher_reactions(early_broadcast: bool) -> Result> { + base_node_runner::test_utils::init_silenced_tracing(); + // Denim is active from block 1, which is scheduled two seconds from now so the chain follows + // wall-clock time as it does in production. + let genesis_time = SystemTime::now().duration_since(UNIX_EPOCH)?.as_secs(); + let activation = genesis_time + LEGACY_BLOCK_TIME; + let mut genesis = load_chain_spec().inner.genesis.clone(); + genesis.timestamp = genesis_time; + let mut chain_spec = BaseChainSpec::from_genesis(genesis); + chain_spec.set_fork(BaseUpgrade::Denim, ForkCondition::Timestamp(activation)); + let chain_spec = Arc::new(chain_spec); + let chain_id = chain_spec.inner.chain.id(); + + let datadir = tempfile::tempdir()?; + let mut network = NetworkArgs::default().with_unused_ports(); + network.discovery.disable_discovery = true; + let mut rpc = RpcServerArgs::default().with_unused_ports().with_http().with_auth_ipc(); + rpc.http_api = Some("eth".parse()?); + rpc.auth_ipc_path = datadir.path().join("engine.ipc").to_string_lossy().into_owned(); + let engine_url = Url::from_file_path(&rpc.auth_ipc_path) + .map_err(|()| eyre!("engine IPC path is not absolute"))?; + let node_config = NodeConfig::new(Arc::clone(&chain_spec)) + .with_network(network) + .with_rpc(rpc) + .with_unused_ports() + .with_datadir_args(DatadirArgs { + datadir: datadir.path().to_string_lossy().parse()?, + ..Default::default() + }); + let db = init_db( + node_config.datadir().db(), + DatabaseArguments::new(ClientVersion::default()) + .with_geometry_max_size(Some(100 * 1024 * 1024)), + )?; + let runtime = Runtime::test(); + // The cutover runs the Flashblocks builder beside the native one, and it binds this port. + let mut builder_config = BuilderConfig::default(); + builder_config + .flashblocks_ws_addr + .set_port(TcpListener::bind("127.0.0.1:0")?.local_addr()?.port()); + // The same payload service and runner handoff as `base sequencer`, so frozen-payload hints + // reach the consensus layer through the production wiring. + let LaunchedBaseNode { handle, payload_ready } = BaseNodeRunner::new(RollupArgs::default()) + .with_service_builder( + MultiplexingServiceBuilder::new(builder_config).with_cutover_enabled(true), + ) + .launch( + NodeBuilder::new(node_config).with_database(db).with_launch_context(runtime.clone()), + ) + .await?; + let http = handle.node.rpc_server_handle().http_local_addr().ok_or_eyre("HTTP RPC unbound")?; + let rpc = RootProvider::new(RpcClient::builder().http(format!("http://{http}").parse()?)); + + let l1_info_deposit = BaseTxEnvelope::decode_2718(&mut L1_BLOCK_INFO_DEPOSIT_TX.as_ref())?; + let l1_info = L1BlockInfoTx::decode_calldata( + &l1_info_deposit.as_deposit().ok_or_eyre("L1-info fixture is not a deposit")?.input, + )?; + let genesis_hash = chain_spec.inner.genesis_hash(); + let genesis_system_config = SystemConfig { + gas_limit: chain_spec.inner.genesis.gas_limit, + eip1559_denominator: Some(50), + eip1559_elasticity: Some(6), + ..Default::default() + }; + let mut rollup_config = RollupConfig { + l2_chain_id: chain_id.into(), + block_time: LEGACY_BLOCK_TIME, + genesis: ChainGenesis { + l1: l1_info.id(), + l2: BlockNumHash { number: 0, hash: genesis_hash }, + l2_time: genesis_time, + system_config: Some(genesis_system_config), + }, + upgrades: UpgradeConfig { + regolith_time: Some(0), + canyon_time: Some(0), + delta_time: Some(0), + ecotone_time: Some(0), + fjord_time: Some(0), + granite_time: Some(0), + holocene_time: Some(0), + isthmus_time: Some(0), + jovian_time: Some(0), + ..Default::default() + }, + ..Default::default() + }; + rollup_config.set_upgrade_activation_timestamp(BaseUpgrade::Denim, activation); + let rollup_config = Arc::new(rollup_config); + let system_config = SystemConfig { + gas_limit: genesis_system_config.gas_limit + / u64::from(RollupConfig::DENIM_GAS_PARAMETER_SCALING_FACTOR), + ..genesis_system_config + }; + + let engine = Arc::new( + EngineConfig { + config: Arc::clone(&rollup_config), + l2_url: engine_url, + // Unused over IPC: socket permissions control access. + l2_jwt_secret: JwtSecret::random(), + // The engine client constructs this provider lazily. L1-free sequencing never issues + // an L1 request. + l1_url: Url::parse("http://127.0.0.1:1")?, + mode: NodeOperatingMode::Sequencer, + l1_rpc_timeout: base_consensus_providers::L1_RPC_TIMEOUT, + } + .build_engine_client() + .await?, + ); + + // L1-free sequencing needs a non-genesis head, so build the first Denim block directly. + let attributes_builder = + StandaloneAttributesBuilder::new(Arc::clone(&rollup_config), l1_info, system_config, None); + let genesis_head = L2BlockInfo::new( + BlockInfo::new(genesis_hash, 0, B256::ZERO, genesis_time), + l1_info.id(), + l1_info.sequence_number(), + ); + let attributes = + attributes_builder.clone().prepare_payload_attributes(genesis_head, l1_info.id()).await?; + let fork_choice = |head| ForkchoiceState { + head_block_hash: head, + safe_block_hash: genesis_hash, + finalized_block_hash: genesis_hash, + }; + let payload_id = engine + .fork_choice_updated_v3(fork_choice(genesis_hash), Some(attributes)) + .await? + .payload_id + .ok_or_eyre("boundary build did not start")?; + let payload = engine.get_payload_v4(payload_id).await?.execution_payload; + let status = engine.new_payload_v4(payload, B256::ZERO).await?; + let boundary_hash = status.latest_valid_hash.ok_or_eyre("boundary payload rejected")?; + engine.fork_choice_updated_v3(fork_choice(boundary_hash), None).await?; + + // The production engine and sequencer actors, without derivation, conductor, or P2P. + let cancellation = CancellationToken::new(); + let (engine_actor_request_tx, engine_actor_request_rx) = mpsc::channel(1024); + let (unsafe_head_tx, unsafe_head_rx) = watch::channel(L2BlockInfo::default()); + let (engine_state_tx, engine_state_rx) = watch::channel(EngineState::default()); + let (engine_queue_length_tx, _engine_queue_length_rx) = watch::channel(0); + // Resets would walk L1 origins; the bootstrapped execution head is retained instead. + let processor = EngineProcessor::new_skip_reset( + Arc::clone(&engine), + Arc::clone(&rollup_config), + StandaloneDerivationClient, + Engine::new(EngineState::default(), engine_state_tx, engine_queue_length_tx), + ); + let engine_actor = EngineActor::new( + cancellation.clone(), + engine_actor_request_rx, + SequencerEngineRequestCoordinator::new( + processor, + NodeOperatingMode::Sequencer, + None, + false, + unsafe_head_tx, + ), + ); + let sequencer_engine_client = Arc::new(QueuedSequencerEngineClient { + engine_actor_request_tx, + unsafe_head_rx, + engine_state_rx, + }); + let (_admin_api_tx, admin_api_rx) = mpsc::channel(1); + // The queue the network actor drains to gossip sealed payloads; the searcher reads it instead. + let (gossip_tx, gossip) = mpsc::channel(1024); + let recovery_mode = RecoveryModeGuard::new(false); + let sequencer_actor: SequencerActor<_, ConductorClient, _, _, _> = SequencerActor { + admin_api_rx, + builder: PayloadBuilder { + attributes_builder, + engine_client: Arc::clone(&sequencer_engine_client), + origin_selector: StandaloneOriginSelector::new(l1_info), + recovery_mode: recovery_mode.clone(), + rollup_config: Arc::clone(&rollup_config), + }, + cancellation_token: cancellation.clone(), + conductor: None, + engine_client: sequencer_engine_client, + is_active: true, + mode: NodeOperatingMode::Sequencer, + shadow_funding: None, + recovery_mode, + rollup_config: Arc::clone(&rollup_config), + seal_offset: DEFAULT_SEAL_OFFSET, + unsafe_payload_gossip_client: QueuedUnsafePayloadGossipClient::new(gossip_tx), + sealer: None, + pending_stop: None, + // Without hints the sequencer seals on its deadline, as it did before early broadcast. + payload_ready: early_broadcast.then(|| payload_ready.resubscribe()), + }; + // The execution layer publishes every freeze, whether or not the sequencer listens. + let frozen_at = Arc::new(Mutex::new(HashMap::new())); + let freeze_log = tokio::spawn({ + let frozen_at = Arc::clone(&frozen_at); + let mut frozen = payload_ready; + async move { + while let Ok(ready) = frozen.recv().await { + frozen_at + .lock() + .expect("freeze log lock poisoned") + .insert(ready.parent_hash, SystemTime::now()); + } + } + }); + let mut engine_actor = tokio::spawn(engine_actor.start(())); + let mut sequencer_actor = tokio::spawn(sequencer_actor.start(())); + + let mut searcher = Searcher { rpc, gossip, frozen_at, rollup_config, chain_id }; + let reactions = tokio::select! { + exit = &mut engine_actor => bail!("engine actor stopped: {exit:?}"), + exit = &mut sequencer_actor => bail!("sequencer actor stopped: {exit:?}"), + reactions = async { + searcher.await_scheduled_cadence().await?; + let mut reactions = Vec::new(); + for nonce in 0..MAX_OPPORTUNITIES { + let reaction = searcher.react(nonce).await?; + let models_scenario = reaction.models_scenario(); + info!( + early_broadcast, + models_scenario, + reaction = ?reaction, + "searcher reacted to gossiped block" + ); + if models_scenario { + reactions.push(reaction); + } + if reactions.len() == REACTIONS { + return Ok(reactions); + } + } + bail!("test host too slow to model the scenario: {reactions:?}") + } => reactions?, + }; + + cancellation.cancel(); + freeze_log.abort(); + let _ = tokio::join!(engine_actor, sequencer_actor); + timeout(STEP_TIMEOUT, runtime.initiate_graceful_shutdown()?.ignore_guard()).await?; + handle.node_exit_future.await?; + Ok(reactions) +} + +/// A block gossiped as soon as it freezes leaves the searcher time to land in the next block. +#[tokio::test(flavor = "multi_thread")] +async fn searcher_reacting_to_early_broadcast_lands_in_next_block() -> Result<()> { + let reactions = timeout(TEST_TIMEOUT, searcher_reactions(true)).await??; + for reaction in reactions { + assert!( + reaction.gossiped_after < DEFAULT_SEAL_OFFSET, + "frozen block waited for the seal deadline: {reaction:?}" + ); + assert!( + reaction.reached_sequencer_after < BLOCK_INTERVAL, + "reaction reached the sequencer after the next build started: {reaction:?}" + ); + assert_eq!( + reaction.landed_block, + reaction.opportunity_block + 1, + "searcher missed the next block: {reaction:?}" + ); + } + Ok(()) +} + +/// A block held until the seal deadline reaches the searcher too late for the next block, which +/// was every block before early broadcast and remains the fallback when no hint arrives. +#[tokio::test(flavor = "multi_thread")] +async fn searcher_reacting_to_deadline_sealed_block_lands_one_block_later() -> Result<()> { + let reactions = timeout(TEST_TIMEOUT, searcher_reactions(false)).await??; + for reaction in reactions { + assert!( + reaction.gossiped_after >= DEFAULT_SEAL_OFFSET, + "block was gossiped before the seal deadline without a hint: {reaction:?}" + ); + assert_eq!( + reaction.landed_block, + reaction.opportunity_block + 2, + "searcher did not land two blocks after the opportunity: {reaction:?}" + ); + } + Ok(()) +} diff --git a/llms-full.txt b/llms-full.txt index c090bc42ae..0510f2e6ef 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -106,7 +106,7 @@ Find a doc through the index below instead of grepping the tree. After adding, m - [crates/builder/cli/README.md](crates/builder/cli/README.md): One-line README for base-builder-cli: reusable CLI arguments and config conversion helpers for Base builder nodes. - [crates/builder/core/README.md](crates/builder/core/README.md): base-builder-core: flashblocks payload builder library producing sub-second block chunks, with launcher and metering trait modules, cargo features, and usage. - [crates/builder/metering/README.md](crates/builder/metering/README.md): base-builder-metering: MeteringStore (DashMap with LRU eviction) implementing MeteringProvider, plus base_setMeteringInformation style JSON-RPC extensions, with wiring example. -- [crates/builder/multiplex/README.md](crates/builder/multiplex/README.md): Runs flashblocks and basic payload builders in parallel behind one handle, selecting basic at Denim; cutover mode is off by default and a separate basic-only mode runs just the basic builder. +- [crates/builder/multiplex/README.md](crates/builder/multiplex/README.md): Runs flashblocks and basic payload builders behind one handle, selecting basic at Denim; covers cutover and basic-only modes and passing frozen-payload notifications to the basic builder. - [crates/builder/publish/README.md](crates/builder/publish/README.md): WebSocket broadcast publisher for the block builder (WebSocketPublisher, Listener, BroadcastLoop, metrics traits). Use when changing how serialized payloads are pushed to connected subscribers. ## Crates: common @@ -165,7 +165,7 @@ Find a doc through the index below instead of grepping the tree. After adding, m - [crates/execution/payload/README.md](crates/execution/payload/README.md): Payload builder crate: BasePayloadBuilder assembles payloads from pool and CL attributes, BaseExecutionPayloadValidator checks them, BaseDAConfig provides DA config for fee calculation. - [crates/execution/proofs/README.md](crates/execution/proofs/README.md): base-proofs-extension: node extension storing historical Merkle proofs in MDBX with retention window, pruning, verification and eth_getProof RPC; lists the RollupArgs proofs_history config flags. - [crates/execution/rpc/README.md](crates/execution/rpc/README.md): base-execution-rpc: BaseEthApi, BaseEngineApi, debug, miner, sequencer and witness RPC implementations plus SequencerClient for tx forwarding. Use when changing Base JSON-RPC behavior. -- [crates/execution/runner/README.md](crates/execution/runner/README.md): base-node-runner: BaseNodeExtension and FromExtensionConfig traits plus the NodeHooks accumulator for modular node extensions, with an example custom extension. Use to add node extensions. +- [crates/execution/runner/README.md](crates/execution/runner/README.md): base-node-runner: BaseNodeExtension, FromExtensionConfig and NodeHooks for node extensions, plus the frozen-payload notification channel (PayloadReady) the unified sequencer uses to seal early. - [crates/execution/shadow-indexer-db/README.md](crates/execution/shadow-indexer-db/README.md): One-line stub: database access layer for shadow indexer block persistence. Little detail beyond that. - [crates/execution/shadow-indexer/README.md](crates/execution/shadow-indexer/README.md): Shadow indexer ExEx persisting only reorged-out or reverted blocks; shadow_blocks keyed by number, with later commits backfilling canonical_hash. Use to understand how discarded blocks are stored. - [crates/execution/trie/README.md](crates/execution/trie/README.md): base-execution-trie: BaseProofsStore traits and backends (e.g. RocksdbProofsStorage) holding per-block trie diffs for fault-proof generation, with cursors, pruner and startup init job. diff --git a/llms.txt b/llms.txt index 2c9ef66556..be2197ca13 100644 --- a/llms.txt +++ b/llms.txt @@ -65,7 +65,7 @@ - [crates/builder/cli/README.md](crates/builder/cli/README.md): One-line README for base-builder-cli: reusable CLI arguments and config conversion helpers for Base builder nodes. - [crates/builder/core/README.md](crates/builder/core/README.md): base-builder-core: flashblocks payload builder library producing sub-second block chunks, with launcher and metering trait modules, cargo features, and usage. - [crates/builder/metering/README.md](crates/builder/metering/README.md): base-builder-metering: MeteringStore (DashMap with LRU eviction) implementing MeteringProvider, plus base_setMeteringInformation style JSON-RPC extensions, with wiring example. -- [crates/builder/multiplex/README.md](crates/builder/multiplex/README.md): Runs flashblocks and basic payload builders in parallel behind one handle, selecting basic at Denim; cutover mode is off by default and a separate basic-only mode runs just the basic builder. +- [crates/builder/multiplex/README.md](crates/builder/multiplex/README.md): Runs flashblocks and basic payload builders behind one handle, selecting basic at Denim; covers cutover and basic-only modes and passing frozen-payload notifications to the basic builder. - [crates/builder/publish/README.md](crates/builder/publish/README.md): WebSocket broadcast publisher for the block builder (WebSocketPublisher, Listener, BroadcastLoop, metrics traits). Use when changing how serialized payloads are pushed to connected subscribers. ## Crates: common @@ -124,7 +124,7 @@ - [crates/execution/payload/README.md](crates/execution/payload/README.md): Payload builder crate: BasePayloadBuilder assembles payloads from pool and CL attributes, BaseExecutionPayloadValidator checks them, BaseDAConfig provides DA config for fee calculation. - [crates/execution/proofs/README.md](crates/execution/proofs/README.md): base-proofs-extension: node extension storing historical Merkle proofs in MDBX with retention window, pruning, verification and eth_getProof RPC; lists the RollupArgs proofs_history config flags. - [crates/execution/rpc/README.md](crates/execution/rpc/README.md): base-execution-rpc: BaseEthApi, BaseEngineApi, debug, miner, sequencer and witness RPC implementations plus SequencerClient for tx forwarding. Use when changing Base JSON-RPC behavior. -- [crates/execution/runner/README.md](crates/execution/runner/README.md): base-node-runner: BaseNodeExtension and FromExtensionConfig traits plus the NodeHooks accumulator for modular node extensions, with an example custom extension. Use to add node extensions. +- [crates/execution/runner/README.md](crates/execution/runner/README.md): base-node-runner: BaseNodeExtension, FromExtensionConfig and NodeHooks for node extensions, plus the frozen-payload notification channel (PayloadReady) the unified sequencer uses to seal early. - [crates/execution/shadow-indexer-db/README.md](crates/execution/shadow-indexer-db/README.md): One-line stub: database access layer for shadow indexer block persistence. Little detail beyond that. - [crates/execution/shadow-indexer/README.md](crates/execution/shadow-indexer/README.md): Shadow indexer ExEx persisting only reorged-out or reverted blocks; shadow_blocks keyed by number, with later commits backfilling canonical_hash. Use to understand how discarded blocks are stored. - [crates/execution/trie/README.md](crates/execution/trie/README.md): base-execution-trie: BaseProofsStore traits and backends (e.g. RocksdbProofsStorage) holding per-block trie diffs for fault-proof generation, with cursors, pruner and startup init job.