Commit bc5470e
chore: remove triedb (rust-eth-triedb/pathdb) state backend (#371)
* chore: reth dep (#366)
Co-authored-by: joey <10592664+joey0612@users.noreply.github.com>
Co-authored-by: cbh876 <3930922419@qq.com>
Co-authored-by: cbh876 <30834644+constbh@users.noreply.github.com>
* chore: remove triedb (rust-eth-triedb/pathdb) state backend
Drops all triedb code paths and the four rust-eth-triedb* git deps so the
downstream reth-bsc crate compiles against the upstream Reth tree where
PR bnb-chain/reth#202 has removed the same backend. After this change
the only state backend is MDBX.
Pinned `bnb-chain/reth` to rev 6dcb09c0090e046eea6440fbeb58cce5db0476b2
(PR 202 head) and aligned the bsc-ef-tests crate to the same rev.
- evm/builder.rs: collapsed `is_triedb_active()` + finish_with_difflayer
override into `fn finish`, keeping the sparse-trie precomputed-root
fast path and the MDBX `state_root_with_updates` fallback. Removed
the `request_difflayer` helper.
- evm/{mod,config}.rs: removed `MinerTrieDbPrefetcher` type alias,
`parent_difflayers` / `triedb_prefetcher` fields on
`BscNextBlockEnvAttributes` + `BscBlockExecutionCtx`, and the
`create_block_builder` workaround that scrubbed them.
- engine.rs: dropped the `!is_triedb_active()` gate on the sparse-trie
spawner; `BscBuiltPayload::executed_block` no longer carries a
difflayer (upstream `ExecutedBlock.difflayer` field deleted).
- miner/payload.rs: removed `parent_difflayers` from
`BscBuildArguments`, the `fetch_triedb_difflayers` helper, the
prefetcher state-hook closures, the pathdb safety guard, and the
`executed_block.difflayer` assignments.
- miner/bid_simulator.rs: removed the triedb branch from
`bid_simulate` and its `parent_difflayers` parameter.
- miner/bsc_miner.rs: deleted `fetch_parent_difflayers_for_bid` and
its caller.
- Removed the now-unused `task_executor` field from
`BscPayloadBuilder`, `BidSimulator`, and `MainWorkWorker` (it
existed only to spawn the triedb prefetcher).
- README.md / CLAUDE.md / main.rs / miner/config.rs: purged
`--statedb.triedb` references.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: const <122766871+constwz@users.noreply.github.com>
Co-authored-by: joey <10592664+joey0612@users.noreply.github.com>
Co-authored-by: cbh876 <3930922419@qq.com>
Co-authored-by: cbh876 <30834644+constbh@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 755d094 commit bc5470e
15 files changed
Lines changed: 312 additions & 946 deletions
File tree
- src
- node
- evm
- miner
- testing/bsc-ef-tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | | - | |
| 48 | + | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
54 | 52 | | |
55 | 53 | | |
56 | 54 | | |
| |||
0 commit comments