Skip to content

chore: update triedb version#166

Closed
joey0612 wants to merge 1 commit into
developfrom
triedb_version
Closed

chore: update triedb version#166
joey0612 wants to merge 1 commit into
developfrom
triedb_version

Conversation

@joey0612
Copy link
Copy Markdown
Collaborator

No description provided.

@constwz
Copy link
Copy Markdown
Contributor

constwz commented Apr 21, 2026

Superseded by #167 — the alloy 1.5.2 → 1.8.3 cascade in this PR's Cargo.lock was unintended (triedb v0.0.2 doesn't require it) and has no clean exit (op-alloy-network 0.23.1 / 0.24.0 both conflict with alloy-network 1.7+'s blanket NetworkWallet impl). #167 achieves the same rust-eth-triedb tag pin with a minimal lock diff against develop.

@joey0612 joey0612 closed this Apr 21, 2026
joey0612 added a commit that referenced this pull request Apr 22, 2026
* 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>
joey0612 added a commit that referenced this pull request Apr 22, 2026
* 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>
chee-chyuan pushed a commit that referenced this pull request Apr 28, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants