Skip to content

fix(rpc): recover pruned Gravity system transaction senders - #437

Open
AshinGau wants to merge 1 commit into
Galxe:mainfrom
AshinGau:main
Open

AshinGau wants to merge 1 commit into
Galxe:mainfrom
AshinGau:main

Conversation

@AshinGau

Copy link
Copy Markdown
Collaborator

Summary

Fixes Galxe/gravity-sdk#838.

Full nodes prune sender records, so historical RPC reads fail when Gravity system transactions with unrecoverable signatures leave the block cache. Recover missing senders from signatures and fall back to SYSTEM_CALLER for committed transactions, while preserving persisted sender entries.

Apply this to single-block and range reads, static-file sender lookups, and the independent eth_getTransactionReceipt cache-miss path. RESS witness lookup now reuses recovered blocks. eth_getTransactionByHash already has the fallback. Incoming transaction signature validation remains unchanged.

Verification

  • cargo test -p reth-provider --lib: 66 tests passed, including full and partial sender pruning with database and static-file storage.
  • cargo check -p reth-rpc-eth-api -p reth-ress-provider: passed; changed Rust files pass nightly rustfmt.
  • Built gravity_node with RUSTFLAGS="--cfg tokio_unstable" and --profile quick-release against this local reth tree.
  • Reused the original failing full-node database after restart: all 19 RPC checks passed for block 73 at tip 975, including system and ordinary transaction senders, receipts, and rejection of unsigned raw transaction submission. Historical debug and trace queries also passed. Sender pruning remained full, with zero sender-table entries and no backfill.

Scope

The fallback assumes unrecoverable committed transactions are Gravity system transactions; legacy testnet transactions with exceptional senders are outside scope. No migration or pruning configuration change is required. State, receipt, and transaction-lookup retention limits remain unchanged. RESS was compile-checked; live peer/witness integration and alternative staged-sync imports were not tested.

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.

[Bug] eth_getBlockByNumber fails for older blocks on default pruned Reth deployment

2 participants