Skip to content

deps: Bump dependencies to fix RustSec advisories - #6746

Draft
dimitrovmaksim wants to merge 2 commits into
masterfrom
fix/rustsec-dependency-updates
Draft

dimitrovmaksim wants to merge 2 commits into
masterfrom
fix/rustsec-dependency-updates

Conversation

@dimitrovmaksim

Copy link
Copy Markdown
Collaborator

Dependency bumps that fix 28 RustSec advisories. Scanning Cargo.lock against advisory-db as of 2026-10-22: master matches 46 advisories, this branch matches 18.

The only source change is in gnd's test mock transport, which has to accept the new block-hash param format from alloy ≥ 2.1.1. See Behavior change.

Closes

This also resolves Dependabot alerts #546, #559, #581, #582 and #583.

It also fixes #5835: eth_getBlockReceipts now sends a plain block hash, via alloy-rs/alloy#4052. #6647 was closed so we could "pick the fix up for free on the next alloy bump", and this is that bump.

Supersedes

Every open Dependabot PR targets a version that this branch matches or exceeds:

PR Dependabot target This branch
#6716 postgres-protocol 0.6.12 0.6.12
#6699 quinn-proto 0.11.17 0.11.19
#6692 alloy 2.2.0 2.5.0
#6691 thiserror 2.0.19 2.0.21
#6690 indicatif 0.18.6 0.18.6
#6680 rustls 0.23.42 0.23.46
#6679 arrow-flight 59.1.0 60.0.0
#6678 http-body-util 0.1.4 0.1.5
#6677 parquet 59.1.0 60.0.0
#6676 arrow 59.1.0 60.0.0
#6675 open 5.4.0 5.4.5

Changes

Cargo.toml

Change Why
alloy 2.0.5 → 2.5.0, alloy-rpc-types 2.0.0 → 2.5.0 Brings alloy-core 1.7.3, which replaces the unmaintained proc-macro-error2 with proc-macro-error3 (RUSTSEC-2026-0173). It also pulls lru 0.18.5 via alloy-provider (RUSTSEC-2026-0253) and ruint 1.20.1 (RUSTSEC-2026-0220). Supersedes #6692.
arrow, arrow-flight, parquet =59.0.0 → =60.0.0 Supersedes #6676, #6677 and #6679. arrow-flight 60 renamed the flight-sql-experimental feature to flight-sql.
diesel: drop the numeric feature graph implements ToSql/FromSql<Numeric, Pg> for its own BigDecimal (graph/src/data/store/scalar/bigdecimal.rs), so diesel's bigdecimal/num-bigint impls were unused. After the bump, lock re-resolution pointed diesel's num-bigint edge at a version incompatible with graph's pinned num-bigint =0.2.6, which caused an E0308 type mismatch. Dropping the feature removes that edge.

rust-toolchain.toml

Cargo.lock — security fixes (cargo update -p …)

Crate From → To Advisories
crossbeam-epoch 0.9.18 → 0.9.21 RUSTSEC-2026-0204
diesel 2.3.9 → 2.3.14 RUSTSEC-2026-0172
event-listener 5.4.1 → 5.4.2 RUSTSEC-2026-0221
h2 0.4.14 → 0.4.20 RUSTSEC-2026-0258
lru 0.16.3 → 0.18.5 RUSTSEC-2026-0253 (via alloy 2.5.0)
postgres-protocol 0.6.9 → 0.6.12 RUSTSEC-2026-0179, RUSTSEC-2026-0180
proc-macro-error2 2.0.1 → removed RUSTSEC-2026-0173 (via alloy-core 1.7.3)
quick-xml 0.40.1 → 0.41.0 RUSTSEC-2026-0194, RUSTSEC-2026-0195 (via object_store 0.14.2)
quinn-proto 0.11.14 → 0.11.19 RUSTSEC-2026-0185, RUSTSEC-2026-0338, RUSTSEC-2026-0339, RUSTSEC-2026-0340, RUSTSEC-2026-0342
ruint 1.17.2 → 1.20.1 RUSTSEC-2026-0220
rustls 0.23.41 → 0.23.46 RUSTSEC-2026-0285, RUSTSEC-2026-0346, RUSTSEC-2026-0348, RUSTSEC-2026-0349
rustls-webpki 0.103.13 → 0.103.16 RUSTSEC-2026-0382
tokio-postgres 0.7.15 → 0.7.18 RUSTSEC-2026-0178
wasmtime 46.0.1 → 46.0.3 RUSTSEC-2026-0222, RUSTSEC-2026-0223, RUSTSEC-2026-0268, RUSTSEC-2026-0269
webpki-roots 1.0.5 → 1.0.10 RUSTSEC-2026-0381
webpki-root-certs 1.0.7 → 1.0.10 RUSTSEC-2026-0383

Cargo.lock — transitive changes pulled in by the above

  • alloy 2.5.0:
    • alloy-* 2.0.5 → 2.5.0; alloy-core family 1.6.0 → 1.7.3
    • alloy-rlp 0.3.16, alloy-trie 0.9.8, alloy-eip7928 0.4.11
    • new: alloy-eip8141, alloy-ens, fixed-cache
    • proptest-derive 0.7.0 (via alloy-trie)
    • tokio-tungstenite/tungstenite 0.28 dropped; alloy-transport-ws now shares 0.29 with axum. utf-8 is removed with it.
    • ark-* 0.6.0 appear in the lock only, via ruint's optional features. They are not compiled.
  • arrow/parquet 60:
    • arrow-* 60.0.0, new arrow-cmp
    • atoi 3.1.1
    • base64 0.23.1. graph-chain-ethereum's base64 = "0" requirement now also resolves to 0.23.1.
    • brotli 9, lz4_flex 0.14, zstd 0.14 / zstd-safe 8 / zstd-sys 2.1.2
    • num-bigint 0.5.1, used by arrow-buffer and parquet only. graph stays on 0.2.6.
  • postgres:
    • postgres-types 0.2.14, md-5 0.11, hmac 0.13 (+ ctutils, cmov)
    • whoami 1.5.1 → 2.1.3 (required by tokio-postgres 0.7.18), with wasite 1.0.2, objc2-system-configuration and libredox 0.1.25. redox_syscall 0.4.1 is dropped.
  • rustls: aws-lc-rs 1.16.3 → 1.18.2, aws-lc-sys 0.40.0 → 0.46.0, pkg-config 0.3.34.
  • quinn-proto: new rand_pcg 0.10.2.
  • wasmtime 46.0.3: cranelift-* 0.133.3, pulley-* 46.0.3, wasmtime-internal-* 46.0.3.
  • Also moved:
    • thiserror 2.0.21; thiserror-impl 2.0.21 adds syn 3.0.9 to the build graph
    • http-body-util 0.1.5, indicatif 0.18.6, open 5.4.5

gnd/src/commands/test/mock_transport.rs

  • Adds a parse_block_hash helper that accepts both a bare hash and {"blockHash": hash}. eth_call, eth_getBalance and eth_getCode mocks all use it.
  • Without it, any gnd test whose handlers call eth_call, eth_getBalance or eth_getCode fails with missing blockHash. In this repo, gnd_test::test_token_transfer and gnd_test::test_templates failed. Both test cases pass with the helper.

Behavior change: block hash param format

alloy-rs/alloy#4052 (alloy ≥ 2.1.1) serializes BlockId::Hash with require_canonical: None as a bare hash instead of {"blockHash": hash}. With EIP-1898 enabled, which is the default unless a provider sets the no_eip1898 feature, these requests change:

RPC method Before After
eth_getBlockReceipts [{"blockHash":"0x…"}] ["0x…"] (fixes #5835)
eth_call [tx, {"blockHash":"0x…"}] [tx, "0x…"]
eth_getCode [addr, {"blockHash":"0x…"}] [addr, "0x…"]
eth_getBalance [addr, {"blockHash":"0x…"}] [addr, "0x…"]
  • Spec: execution-apis BlockNumberOrTagOrHash explicitly allows a plain hash32 for all four methods.

  • Clients: the parsing code in each of these accepts a bare 66-char hash for all four methods and treats it as requireCanonical = false. That is the same as the old object without requireCanonical, so call results and PoI are unaffected.

    Client Parser
    geth rpc.BlockNumberOrHash.UnmarshalJSON
    Erigon rpc.BlockNumberOrHash.UnmarshalJSON
    Nethermind BlockParameterConverter
    Besu BlockParameterOrBlockHash
    Reth alloy BlockId deserializer
  • Not verified: hosted providers/proxies and chain-specific client forks.

  • eth_getBlockReceipts already falls back. check_block_receipt_support probes it once per adapter. If the probe fails, graph-node uses per-tx eth_getTransactionReceipt.

  • eth_call / eth_getCode / eth_getBalance have no fallback. If a node rejected bare hashes, these calls would fail with a non-revert RPC error. That error is treated as non-deterministic, so the subgraph retries/stalls rather than producing a wrong PoI. The operator workaround is the no_eip1898 provider feature, which makes calls use the block number.

Not addressed here

Item Why
wasmtime 46.0.3: 14 advisories, including RUSTSEC-2026-0379 (critical: aarch64 Cranelift br_table miscompile) The fixed versions are ≥48.0.7 (LTS) or ≥49.0.4, which need Rust ≥1.95. We are pinned below 1.95 because of rust-lang/rust#152942. Bumping needs a toolchain bump, a recursion_limit workaround in 3 test targets, and new clippy lints fixed. Coming as a separate PR. The other 13 are mostly component-model/async-lifted paths, which graph-node doesn't use (it runs core modules only).
derivative (RUSTSEC-2024-0388, unmaintained) Lock-only, via ruint's optional ark-ff 0.3/0.4 features. Not compiled.
paste (RUSTSEC-2024-0436, unmaintained) Pulled by alloy-primitives and syn-solidity. Upstream still depends on it.
unsafe-libyaml (RUSTSEC-2024-0449, unmaintained) Comes from our direct serde_yaml (deprecated). Fixing it means swapping crates, not bumping.
parity-wasm (RUSTSEC-2022-0061, unmaintained) Used by gas injection via wasm-instrument. Replacing it affects gas costs and therefore determinism/PoI.
num-bigint 0.2.6 → 0.4.6 (#6669, closed) Not a security advisory. It is coupled to old_bigdecimal =0.1.2 (see graph/Cargo.toml), and upgrading both changes BigDecimal results and therefore PoI.

Testing

  • cargo fmt --all --check: clean
  • just lint: 0 warnings
  • just check --release: ok
  • just test-unit: 60 suites, 1478 passed, 0 failed, 8 ignored

alloy >= 2.1.1 (alloy-rs/alloy#4052) serializes `BlockId::Hash` without
`requireCanonical` as a bare hash instead of `{"blockHash": hash}`.
Accept both forms in the eth_call, eth_getBalance and eth_getCode mocks.
- alloy 2.0.5 -> 2.5.0, alloy-rpc-types 2.0.0 -> 2.5.0
- arrow, arrow-flight, parquet 59.0.0 -> 60.0.0
  (arrow-flight feature `flight-sql-experimental` -> `flight-sql`)
- diesel: drop unused `numeric` feature
- rust-toolchain 1.94.0 -> 1.94.1
- Cargo.lock: targeted `cargo update -p` for advisory fixes

Fixes 28 RustSec advisories (46 -> 18 matched in Cargo.lock).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment