Commit 95d649f
chore: merege develop to main for v0.0.09 (#172)
* ci: enable github actions (#119)
* fix: format all rust files
* ci: update github actions
* fix: solve wrong typos
* fix: return fast_finalized_number when probabilistic threshold is not met
When the number of unique signers in headers is insufficient to meet the
threshold, the function incorrectly returned the last iterated block number
instead of falling back to fast_finalized_number.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(txpool): use transaction with non-zero tip in backup test
The test_save_local_txs_backup test used a hardcoded EIP-1559 transaction
with max_priority_fee_per_gas=0, which is rejected by BSC's TipZero
validation added in 0dac0d6. Replace with a transaction that has
max_priority_fee_per_gas > 0 and derive sender/nonce dynamically.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(txpool): add zero blob fee check to MockTransactionValidator
The reject_blob_tx_with_zero_blob_fee test uses MockTransactionValidator
which previously accepted all transactions unconditionally. Add the zero
blob fee check so the mock validator correctly rejects EIP-4844
transactions with max_fee_per_blob_gas=0, matching the behavior of
EthTransactionValidator.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: format rust files
* ci: enable stage and 1era tests in pull_request
---------
Co-authored-by: cbh876 <3930922419@qq.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(provider): reject stale InPlainState reads during pipeline sync (#113)
* fix(provider): reject stale InPlainState reads during pipeline sync
During pipeline sync, the ExecutionStage commits PlainAccountState in its
own MDBX transaction before IndexAccountHistoryStage / IndexStorageHistoryStage
commit the corresponding history indices. This creates a window where
HistoricalStateProvider incorrectly falls back to InPlainState and returns
data from a future block for any account modified in the uncommitted range.
This change adds a PipelineConsistency guard that detects the inconsistent
window (Execution checkpoint > history index checkpoint) and returns
HistoryStateInconsistent error only when the InPlainState fallback would
be used — queries that resolve via changeset lookups are unaffected.
Ref: bnb-chain/reth-bsc#273
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(provider): guard LatestStateProvider early-return during pipeline sync
The `try_into_history_at_block` and `history_by_block_hash` methods
have early-return paths that bypass `HistoricalStateProvider` and
return `LatestStateProvider` directly when the queried block matches
`best_block_number()`. During pipeline sync, PlainState (read by
LatestStateProvider) has been advanced beyond the Finish checkpoint,
so this fast path also returns data from a future block.
Add pipeline consistency check before the early return — if
Execution > HistoryIndex, skip the fast path and fall through to
the guarded HistoricalStateProvider path.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(provider): treat None history checkpoint as never-indexed (block 0)
When IndexAccountHistory / IndexStorageHistory has never run, its
stage checkpoint is None. Previously this was treated as "consistent"
and the InPlainState path was allowed. Now None is treated as block 0,
correctly detecting inconsistency when Execution has run but history
indexing has not.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(provider): reuse PipelineConsistency and restore non-breaking API
- Hoist build_pipeline_consistency() before the LatestStateProvider
early-return so the result is reused on the historical path,
eliminating 3 redundant DB reads per call in history_by_block_hash
and try_into_history_at_block.
- Remove pipeline_consistency parameter from
new_with_lowest_available_blocks to restore the original signature;
callers use the with_pipeline_consistency() builder instead.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs(provider): explain why latest() skips PipelineConsistency guard
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(clippy): wrap PlainState in backticks for doc_markdown lint
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(clippy): wrap PlainState in backticks in historical.rs doc comments
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(clippy): collapse nested if statements for collapsible_if lint
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: cbh876 <3930922419@qq.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: v0.0.9 - pipeline consistency guard, p2p/blobpool metrics, fastnode RPC guard (#120)
* feat: add geth-compatible p2p and blobpool metrics
Add missing metrics to match geth/BSC monitoring:
- p2p.ingress / p2p.egress: total wire bytes (P2PStream layer)
- p2p.{direction}.eth.{version}.0x{code}: per-message byte counters
- p2p.{direction}.eth.{version}.0x{code}.packets: per-message packet counters
- blobpool.dataused / blobpool.datareal: blob pool data usage gauges
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(rpc): reject eth_getProof and eth_getAccount in fastnode mode
In fastnode mode (--engine.skip-state-root-validation), hashing stages
and state root computation are skipped, so trie tables are not kept up
to date. Previously, eth_getProof and eth_getAccount would silently
return invalid data based on stale trie nodes. Now they return a
MethodNotAvailable error, consistent with the existing TrieDB check.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: always report blobpool metrics even when data_size_hint is None
Previously blobpool.dataused/datareal gauges were only set when
data_size_hint() returned Some. This meant the metrics never appeared
in Prometheus when the blobstore was empty.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* test: add pipeline consistency guard unit tests
Add two unit tests for PipelineConsistency:
1. pipeline_consistency_unit_logic: verifies account_inconsistency()
and storage_inconsistency() return correct values across 4 scenarios
(consistent, ahead, None history, None execution).
2. pipeline_consistency_selective_rejection: verifies selective behavior
during pipeline sync inconsistency:
- Changeset path: query at block 5 (history index finds block 7) →
InChangeset → returns correct data (not blocked)
- InPlainState path: query at block 16 (no history entry after) →
InPlainState → returns HistoryStateInconsistent error
- Consistent pipeline: same InPlainState query succeeds when
execution_tip == history_tip
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: fmt and clippy doc_markdown lint
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(fmt): reorder imports in receipt.rs for nightly-2026-01-22
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(clippy): wrap InPlainState and HistoryStateInconsistent in backticks
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: cbh876 <3930922419@qq.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: enable miner triedb (#111)
* deps: change triedb dependencies
* deps: adopt triedb interface change
* chore: rich log for state root mismatch
* feat: add triedb prefetcher
* test: add triedb prefetcher ut
* feat: add triedb difflayer to executed_block_with_trie_updates
* feat: add spawn triedb prefetcher background task
* feat: active triedb prefetch
* opt: only prefetch proofs without evmstate
* chore: change default memory block number
* opt: stop refetcher at now
* opt: terminate prefetch timely
* chore: forbidden StateUpdate message
* opt: async drop in block validate
* chore: adopt triedb interface change
* engine: add new request for parallel state root;
* engine: add new request for parallel state root;
* engine: add new request for parallel state root;
* engine: add new request for parallel state root;
* engine: add new request for parallel state root;
* engine: add new request for parallel state root;
* chore: delete prefetch ut
* chore: add evm state to prefetch
* feat: add some metrics (#72)
Co-authored-by: cbh876 <3930922419@qq.com>
* feat: triedb init
* feat: add difflayer interface
* chore: add more tiredb warn log (#81)
* chore: add more td logs
* chore: try fix fork-chain td query
* chore: try fix fork-chain td query
* chore: try fix status td
* chore: add triedb cost metrics and metics
* chore: adjust triedb prefetcher for miner
* chore: add more engine-tree logs
* chore: add more mismatch logs
* chore: polish some difflayer codes
* chore: add more new payload logs
* chore: update triedb deps
* chore: small write buffer
* fix: resolve compilation errors after cherry-pick onto bnb-repo/develop
- Fix API change: commit_hashed_post_state -> intermediate_and_commit_hashed_post_state
(provider.rs, adds None prefetcher arg and wraps difflayer in Some)
- Fix misplaced closing brace splitting impl block in mod.rs
- Remove append_state method referencing non-existent input field (root.rs)
- Fix EngineApiRequest type params: Types/DB -> T::Types/T::DB (engine.rs)
- Fix imports and type resolution issues in mod.rs and payload_validator.rs
(ConsistentDbView, PersistingKind, ExecutionOutcome, RecvError etc.)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: polish trivals by cargo check
* chore: add triedb msg for miner
* chore: polish triedb validate codes
* chore: polish triedb related codes
* chore: refine triedb validate workflow
* chore: polish some trivals
* chore: remove useless codes
* chore: polish some trivals by self reviews
* chore: polish triedb codes by self review again
* chore: polish some trivals
* chore: fix engine-api
* chore: polish some trivals
* chore: update to v3 triedb
* chore: polish deps
* fix: resolve CI failures in PR #111
- fix(clippy): replace redundant closures `|e| ProviderError::other(e)`
with `ProviderError::other` in provider.rs (4 occurrences)
- fix(compile): correct `to_tree_tx` field type in `TestHarness` from
`EthEvmConfig` to `MockEvmConfig` to match tree construction
- fix(docs): replace broken private-item link `[TrieDBPrefetchHandle]`
with backtick reference in `TrieDBStatePrefetcher` doc comment
- fix(fmt): apply nightly-2026-01-22 formatting to all modified files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: resolve clippy warnings in engine-tree and node-builder
Fix all clippy lints (-D warnings) that were failing CI:
- Add backticks around identifiers in doc comments (doc_markdown lint)
- Add #[allow] for enum_variant_names on TrieDBPrefetchMessage
- Add #[allow] for large_enum_variant on TrieDBPrefetchResult
- Add #[allow] for type_complexity on struct fields and functions
- Remove redundant explicit iter loop (use .keys() instead)
- Collapse nested if-let using and_then()
- Remove needless return statement
- Change &mut self to &self where mutation is not needed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: switch reth-bsc-triedb dependencies to develop branch
Update all rust-eth-triedb workspace dependencies from a pinned rev to
branch = "develop", which includes the changes from
bnb-chain/reth-bsc-triedb#9.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: joey <10592664+joey0612@users.noreply.github.com>
Co-authored-by: galaio <galaio@users.noreply.github.com>
Co-authored-by: constwz <122766871+constwz@users.noreply.github.com>
Co-authored-by: cbh876 <3930922419@qq.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(txpool): reannounce local pending transactions (#115)
* feat(txpool): reannounce local pending transactions
* style: fix rustfmt diffs
* docs: add txpool reannounce time flag
* feat(eth): send big transactions by announce/retrieve only (#112)
* eth: send big transactions by announce/retrieve only
* style: fix tx propagation test formatting
* fix: solve eth_getLogs and debug_traceBlockByNumber RPC (#126)
* fix: eth_getLogs RPC filters system tx
* fix: solve debug_traceBlockByNumber gas
* fix: solve clippy errors
* fix: solve clippy errors
* chore: add pr template (#128)
* ci: fix book and window actions (#130)
* fix: delete eth_getLogs code changes (#132)
* chore: update rust-eth-triedb to v0.0.2 (#167)
* chore: update triedb version
* chore: keep alloy pinned when updating triedb; fix writeable typo
PR #166 only intended to bump rust-eth-triedb (branch=develop → tag=v0.0.2),
but the full Cargo.lock regeneration pulled alloy 1.5.2 → 1.8.3 along with
it, cascading into three CI failures:
- MSRV: alloy 1.8.3 requires rustc 1.91, workspace MSRV is 1.88
- crate-checks: reth-bench's reqwest 0.12 Client can't feed
alloy-transport-http 1.8.3's (reqwest 0.13) Http::with_client
- op-alloy-network 0.23.1's hand-written `NetworkWallet<Optimism>
for EthereumWallet` conflicts with alloy-network 1.8's blanket
impl, and no published op-alloy-network version is compatible
Reset Cargo.lock to develop's state, then targeted update of only
the 4 rust-eth-triedb packages. Net lock diff vs develop is just
the branch→tag source swap plus a few minor cargo-auto-picked
windows-sys/syn bumps.
Also fix a pre-existing typo flagged by crate-ci/typos@v1 (the
floating tag pulled a newer binary with a wider dictionary):
`writeable` → `writable` in libmdbx-rs environment.rs doc.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore(deny): bump rustls-webpki; ignore rand soundness advisory
New RustSec advisories published since last CI pass:
- RUSTSEC-2026-0098 / 2026-0099 (rustls-webpki name-constraint bugs) —
fixed by `cargo update -p rustls-webpki` to 0.103.12.
- RUSTSEC-2026-0097 (rand unsound only when a custom log-trace logger
calls rand::rng() during a reseed) — not reachable from reth's
logging path, added to ignore with reasoning.
Also remove the now-stale `RUSTSEC-2026-0002` ignore (no crate in the
develop-lineage dep tree matches this advisory; cargo-deny was warning
about an unreached ignore).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ci: retrigger after PR base change to develop
Re-triggers CI so compact-codec/checkout's github.base_ref resolves
to develop instead of the stale triedb_version from the pre-edit run.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: close unecessary it in optimism
* fix: specify rust version
* fix: specify rust version
* fix: solve deny action
---------
Co-authored-by: joey <10592664+joey0612@users.noreply.github.com>
Co-authored-by: cbh876 <3930922419@qq.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: sysvm <112189277+sysvm@users.noreply.github.com>
---------
Co-authored-by: VM <112189277+sysvm@users.noreply.github.com>
Co-authored-by: cbh876 <3930922419@qq.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: const <122766871+constwz@users.noreply.github.com>
Co-authored-by: will-2012 <117156346+will-2012@users.noreply.github.com>
Co-authored-by: galaio <galaio@users.noreply.github.com>
Co-authored-by: Matus Kysel <MatusKysel@users.noreply.github.com>223 files changed
Lines changed: 4006 additions & 2905 deletions
File tree
- .github
- workflows
- crates
- chain-state
- src
- chainspec/src
- cli/commands/src
- db
- stage
- engine
- primitives/src
- service/src
- tree
- src
- tree
- payload_processor
- era-downloader/src
- evm/evm
- src
- net
- discv4/src
- eth-wire-types/src
- eth-wire/src
- network-api/src
- network-types/src/peers
- network/src
- session
- transactions
- node
- builder/src
- builder
- launch
- core/src/args
- optimism/flashblocks/tests/it
- rpc
- rpc-builder/src
- rpc-convert/src
- rpc-eth-api
- src
- helpers
- rpc-eth-types/src
- error
- rpc/src
- eth
- stages
- api/src
- pipeline
- stages/src/stages
- storage
- db-common/src
- errors/src
- libmdbx-rs/src
- provider/src
- providers
- database
- rocksdb
- state
- writer
- tracing/src
- transaction-pool/src
- pool
- validate
- trie
- common/src
- db/src
- docs/vocs
- docs/pages/cli
- op-reth
- db
- clear
- get
- settings
- set
- static-file-header
- p2p
- rlpx
- stage
- dump
- unwind
- reth
- db
- clear
- get
- settings
- set
- static-file-header
- p2p
- rlpx
- stage
- dump
- unwind
- examples/custom-node/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | | - | |
8 | | - | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
| |||
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
49 | | - | |
50 | | - | |
| 55 | + | |
| 56 | + | |
51 | 57 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
56 | 62 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
62 | 68 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
67 | 73 | | |
68 | | - | |
69 | | - | |
70 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
71 | 77 | | |
72 | | - | |
| 78 | + | |
73 | 79 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
| 42 | + | |
| 43 | + | |
32 | 44 | | |
33 | 45 | | |
34 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
191 | 190 | | |
192 | 191 | | |
193 | 192 | | |
194 | | - | |
195 | | - | |
| 193 | + | |
196 | 194 | | |
197 | 195 | | |
198 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
35 | 47 | | |
36 | 48 | | |
37 | 49 | | |
| |||
69 | 81 | | |
70 | 82 | | |
71 | 83 | | |
72 | | - | |
| 84 | + | |
73 | 85 | | |
74 | 86 | | |
75 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
0 commit comments