Skip to content

fix(deps): require alloy-trie 0.9.5 - #417

Merged
nekomoto911 merged 1 commit into
mainfrom
codex/sdk-msrv-compat
Aug 3, 2026
Merged

fix(deps): require alloy-trie 0.9.5#417
nekomoto911 merged 1 commit into
mainfrom
codex/sdk-msrv-compat

Conversation

@ByteYue

@ByteYue ByteYue commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • raise the workspace minimum alloy-trie version from 0.9.4 to 0.9.5
  • prevent downstream lockfiles from selecting an RlpNode implementation that is incompatible with Reth's nested-trie const cache mutations on Rust 1.93

Why

While integrating the merged generic Oracle relayer core into Gravity SDK, the SDK lockfile legally selected alloy-trie 0.9.4. Its RlpNode owns an ArrayVec, so assignments in Reth's const fn cache helpers fail with E0493 on the declared Rust 1.93 toolchain.

alloy-trie 0.9.5 changed RlpNode to a trivially droppable fixed buffer. Reth's own lockfile already resolves to this version, which is why the issue did not appear in the Reth CI graph. Declaring the actual minimum requirement makes downstream resolution deterministic and preserves the intended const API.

This is a dependency-compatibility correction only. It does not change Oracle behavior, trie encoding, database formats, or execution semantics.

Validation

  • cargo +1.93.0 check -p reth-trie-common --all-features --locked
  • verified the Gravity SDK gravity_node test build progresses past reth-trie-common after resolving alloy-trie 0.9.5

Tracking

The nested trie node cache uses const mutation that requires the trivially droppable RlpNode implementation introduced in alloy-trie 0.9.5. Raising the minimum version prevents downstream lockfiles from selecting 0.9.4 and failing on the declared Rust 1.93 toolchain.
@nekomoto911
nekomoto911 merged commit 53a9df9 into main Aug 3, 2026
31 of 36 checks passed
@nekomoto911
nekomoto911 deleted the codex/sdk-msrv-compat branch August 3, 2026 08:06
ByteYue added a commit to Galxe/gravity-sdk that referenced this pull request Aug 3, 2026
## Summary

- wire `gravity_node` to the merged generic Reth Oracle relayer API
- decode the fixed-size `OracleState` snapshot from the latest committed
Gravity block
- reconcile providers by the shared `(source_type, source_id)` URI
identity
- retain and re-emit a pending observation until the authoritative
on-chain nonce catches up
- suppress stale or already-committed observations before they become
guaranteed-revert system transactions
- keep provider endpoints validator-local and redact credentials, paths,
and query strings from logs

## Runtime behavior

`add_uri` now requires an authoritative on-chain source state before
warming the Reth provider with its `latest_nonce` and `latest_position`.
`get_last_state` follows the same snapshot and fails closed when
`OracleState` is unavailable, malformed, or missing the requested
source.

After a provider returns an update, the wrapper caches that exact
`PollResult`. While its nonce is ahead of the committed state, later
observations return the cached payload instead of polling again. Once
execution catches up, polling resumes. A provider result with
`observed_nonce <= onchain_nonce` is marked unchanged so it cannot
inject a `recordBatch` that must revert with `NonceNotSequential`.

The state-read error path does not mutate the pending tracker, so a
transient committed-state failure cannot erase an observation waiting
for execution.

## Dependency alignment

- pin Gravity Aptos to the merged Oracle state API revision from
Galxe/gravity-aptos#79
- pin Gravity Reth to the merged generic relayer core plus dependency
correction from Galxe/gravity-reth#416 and Galxe/gravity-reth#417
- align the node CLI and transaction-pool type aliases with Reth 2.3
- keep Alloy and Reth helper crates on versions compatible with the SDK
Rust 1.93 toolchain

The lockfile is necessarily large because the existing SDK branch moves
from its older Reth/Aptos dependency graphs to those merged revisions.

## Non-goals

- no Binance source implementation
- no Polygon or Polymarket source implementation
- no external-network E2E or frontend demo

Those remain isolated provider and E2E slices in the split plan.

## Validation

- `RUSTFLAGS='--cfg tokio_unstable' cargo +1.93.0 check -p gravity_node
--tests --locked`
- `RUSTFLAGS='--cfg tokio_unstable' cargo +1.93.0 test -p gravity_node
relayer::tests --locked` (12 passed)
- `cargo +nightly fmt --all -- --check`
- `cargo +1.93.0 metadata --locked --no-deps --format-version 1`

## Tracking

- Galxe/gravity-audit#1038
- Addresses Galxe/gravity-audit#908
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