chore: merge paradigmxyz/reth v2.4.1 into develop - #209
Draft
chee-chyuan wants to merge 1906 commits into
Draft
Conversation
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Vui-Chee <vuicheesiew@gmail.com> Co-authored-by: Vui-Chee <46051576+Vui-Chee@users.noreply.github.com>
Co-authored-by: Alexey Shekhirin <github@shekhirin.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
…pdates (#25173) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Karl Yu <yh975593284@gmail.com>
…cks build without LLVM)
… shared_engine_runtime) needed by reth-bsc
…nfig.proxied_node_ids + proxied_peers builder, NewBlockPayload::td default)
…tree insertion Exposes an UnboundedSender<EngineApiRequest> wired into the consensus-engine select loop so the parlia block-import path can inject already-executed blocks (InsertExecutedBlock) without a newPayload round-trip.
…d engine Runtime Adds a public state_root_strategy::spawn_payload_builder_state_root that returns a StateRootHandle, for chains whose miner builds outside the engine FCU->build path (BSC parlia). Publishes the engine's task Runtime via set_shared_engine_runtime in BasicEngineValidator::new so those spawns reuse the same rayon proof pools instead of building competing per-block Runtimes.
Restores the DB-persisted total difficulty that #19151 removed (Ethereum dropped it post-merge; BSC parlia fork choice still ranks chains by cumulative difficulty). save_blocks writes each block's TD (parent TD + difficulty, genesis-aware) into the HeaderTerminalDifficulties MDBX table; DatabaseProvider serves it (with a genesis fallback), ConsistentProvider extends the on-disk tip over the in-memory tail via a short-circuiting walk, and BlockchainProvider delegates. Fast on cold restart (reads the persisted tip, walks only the in-memory tail) — matches the pre-upgrade fork. Verified on node-deploy-bsc: reth validators match geth block-by-block, sparse-trie active, and a node0 restart rejoined consensus in <1s with no genesis walk.
…s_from_macros deny)
… deps Left orphaned by the v2.4.1 merge / triedb removal; unused_crate_dependencies (-D warnings) failed clippy. Removing them also satisfies udeps.
Under rocksdb's multi-threaded-cf (enabled transitively by clippy --all-features), cf_handle returns Arc<BoundColumnFamily> not &ColumnFamily, so clippy failed with 9 mismatched-types. Enable multi-threaded-cf explicitly (consistent single model) and port cf handles to Arc<BoundColumnFamily> + helper fns to &impl AsColumnFamilyRef. Verified: clippy -D warnings clean. reth-bsc uses MDBX so runtime is unaffected.
…rpc-eth-api); mark feature-only alloy-trie/reth-trie-common used (stages)
…used metrics dep (node-builder)
…cli-commands) — merged code trips the future-incompat lint
…ippy runs --locked
…s); drop removed NewBlockMessage.td in bsc-p2p example
…item before #![cfg_attr], breaking the build)
…te_root Reference the real StateRootHandle methods (take_execution_hook, state_root).
Run make update-book-cli to sync auto-generated CLI pages with the merged v2.4.1 command surface (new migrate-v2/repair-trie/settings subcommands, log-fmt log format, removed migrate).
…to db tip Ports the net-new correctness fixes from #202 / #204 (chee-chyuan) onto the v2.4.1 state-root/changeset-cache redesign, since the triedb-removal half of #202 is already covered by the v2.4.1 upgrade. - engine tree: clamp the Threshold persist target to the finalized block so losing forks stay in memory (avoids expensive on-disk trie reverts that stall the engine under load). - trie-db changesets: bound the tail revert read to db_tip_block instead of the unbounded `next_block..`; add get_or_compute_range_tracked reporting whether an aggregate DB fallback ran. - provider overlay: when the changeset cache fell back to a DB recompute, re-read the db tip and discard the overlay (InsufficientChangesets) if it moved, since a concurrent persist rewrites static-file changesets outside the MDBX snapshot. Adapted to v2.4.1's range-aggregate changeset cache (vs #204's per-block iteration). Metrics counters from #204 omitted to avoid a new metrics feature on reth-trie-db. Original: 0dea17d (cherry picked, reworked). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft — merges upstream
paradigmxyz/rethv2.4.1 intodevelop(previously at ~2.2.0).What
rust-eth-triedbstack and converges the state/execution/storage/network layer to upstream v2.4.1 (upstream's sparse-trie state-root task replaces BSC's triedb).reth-corefork crates → crates.io0.5.0; workspace on revm 41.ParliaSnapshotBlob(+ParliaSnapshots/ParliaSnapshotsByHashtables),reth_tasks::shared_engine_runtime.jitmade opt-in (removed frombin/rethdefault) so builds don't require LLVM 21.Status
cargo check --workspaceis green (rustc 1.97).Needs reviewer judgment
During convergence these BSC customizations were reverted to upstream to reach a build; confirm each is acceptable or should be preserved:
current_tdTD-tracking,Custom/QueryTdengine messages,proxied_node_ids, tx-broadcast-size,TipZero, RPCtdinconvert_header.🤖 Generated with Claude Code