Skip to content

Commit 4bb5f2e

Browse files
authored
Upgrade reth 1.9.3 → 1.11.3 (#927)
## 📝 Summary Bumps reth `27a8c0f` → `d6324d6` (1.11.3) and the coupled major bumps: revm 31→34, alloy-evm 0.23→0.27, alloy 1.x→1.6, alloy-trie 0.8→0.9, revm-inspectors→0.34. Adapts rbuilder to the new reth/revm APIs and removes the `unsafe` that reth's trait-object `Sync` change would otherwise force. ### Dependencies - `reth-*` → rev `d6324d6`; revm 34, revm-inspectors 0.34.2, alloy-evm 0.27.2, alloy 1.6.3, alloy-primitives 1.5.6, alloy-trie 0.9.4. - Pin `time = 0.3.47` (0.3.48 has an E0119 coherence bug); MSRV 1.85 → 1.88. - `reth-tasks` in rbuilder-utils repointed to the same rev (was stale). ### Key adaptations **Provider Send/Sync .** reth 1.11 dropped `Sync` from `StateProviderBox` (`Box<dyn StateProvider + Send>`). The unit shared across building threads is now `StateProviderSource` (factory + parent hash, `Send+Sync+Clone`); each consumer opens its own provider on demand. `CachedDB` holds an already-open provider; the block-building helper clones itself via an explicit, fallible `try_clone` that reopens the provider. This is the reth way. **revm 34.** `Database::Error` is now `EvmDatabaseError<ProviderError>`; `CfgEnv::with_spec` → `with_spec_and_mainnet_gas_params` (sets Osaka's per-tx gas cap, EIP-7825). `order_commit` maps the new error shape. **Root hash.** `OverlayStateProviderFactory::new(factory, ChangesetCache)`, `ParallelStateRoot::new(.., Runtime)`; provider bounds gain `ChangeSetReader + StorageChangeSetReader + DBProvider + StorageSettingsCache`. Transparently supports reth storage **v1 and v2** (reth reads the mode from the DB; rbuilder only forwards the bound). **Provider construction.** `ProviderFactory::new` now takes a RocksDBProvider + Runtime and returns `Result`; it reads storage settings on open. Adds a process-wide task runtime. **eth-sparse-mpt.** Unified onto nybbles 0.4 (matching alloy-trie 0.9 / reth): the crate's `Nibbles` is now the same packed type reth's trie nodes use, so the conversion shims between the two representations are gone — encode/decode pass `Nibbles` straight into alloy-trie node types, removing per-node conversions in the root-hash hot path. Single nybbles version across the workspace. 🤖 Generated with [Claude Code](https://claude.com/claude-code) with me kicking his ass to get it right.... ## 💡 Motivation and Context I like prime numbers so I switched 9 for 11. ## ✅ I have completed the following steps: * [X] Run `make lint` * [X] Run `make test` * [ ] Added tests (if applicable)
1 parent 8365e13 commit 4bb5f2e

81 files changed

Lines changed: 2769 additions & 1790 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/checks.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ jobs:
8787
- name: Download builder playground
8888
uses: flashbots/flashbots-toolchain@v0.1
8989
with:
90-
builder-playground: v0.3.1
90+
# v0.3.3+ supports custom recipes with a `release` override (used to pin reth to 1.11.x).
91+
builder-playground: v0.3.3
9192

9293
# https://github.com/swatinem/rust-cache
9394
- name: Run Swatinem/rust-cache@v2
@@ -112,7 +113,7 @@ jobs:
112113

113114
- name: Run the playground
114115
run: |
115-
builder-playground start l1 --use-native-reth > /tmp/playground.log 2>&1 &
116+
builder-playground start crates/rbuilder/src/integration/test_data/playground.yaml > /tmp/playground.log 2>&1 &
116117
PLAYGROUND_PID=$!
117118
echo "Waiting for all services to be healthy..."
118119
timeout=60 # 1 minutes timeout

0 commit comments

Comments
 (0)