Skip to content

Audit: Gravity Testnet v1.0.0 — Full diff vs reth v1.8.3#257

Closed
Richard1048576 wants to merge 7173 commits intoaudit/base-reth-v1.8.3from
audit/gravity-testnet-v1.0.0
Closed

Audit: Gravity Testnet v1.0.0 — Full diff vs reth v1.8.3#257
Richard1048576 wants to merge 7173 commits intoaudit/base-reth-v1.8.3from
audit/gravity-testnet-v1.0.0

Conversation

@Richard1048576
Copy link
Collaborator

Overview

This PR captures the complete set of Gravity-specific changes on top of upstream reth v1.8.3 for external security audit purposes.

  • Release tag: gravity-testnet-v1.0.0
  • Upstream base: paradigmxyz/reth v1.8.3
  • Gravity-only commits: 216
  • Files changed: 300
  • Lines: +28,172 / −2,104

⚠️ This PR is read-only for audit review — it is NOT intended to be merged.

Scope

New Gravity-Specific Crates (highest priority)

Crate Path LOC Description
gravity-primitives crates/gravity-primitives/ ~67 Global config (OnceLock), Gravity CLI flags
gravity-storage crates/gravity-storage/ ~243 GravityStorage trait, ParallelDatabase, BlockViewStorage
pipe-exec (execute) crates/pipe-exec-layer-ext-v2/execute/ ~2,400 Core execution pipeline: OrderedBlock → EVM → ExecutionResult, on-chain config, BLS/Mint precompiles
pipe-exec (event-bus) crates/pipe-exec-layer-ext-v2/event-bus/ ~85 Static event dispatcher (MakeCanonicalEvent, WaitForPersistenceEvent)
pipe-exec (relayer) crates/pipe-exec-layer-ext-v2/relayer/ ~1,400 Oracle/bridge cross-chain data relayer
RocksDB backend crates/storage/db/src/implementation/rocksdb/ ~1,744 3-CF sharded RocksDB (state, account_trie, storage_trie)

Modified Upstream Crates

Area Key Paths Changes Description
Engine Tree crates/engine/tree/ ~925 LOC Recovery, persistence, RocksDB integration
EVM Execution crates/ethereum/evm/, crates/evm/evm/ ~700 LOC Grevm parallel execution (parallel_execute.rs, debug_ext.rs)
Node/CLI crates/node/builder/, crates/node/core/ ~350 LOC Gravity CLI args, database config
Storage DB crates/storage/db/ ~1,000 LOC DB abstraction, parallel MDBX tx, RocksDB feature gate
Trie crates/trie/ ~500 LOC Parallel state root, nested hash

Custom External Dependencies

Dependency Repository Description
grevm v2.2.4 Galxe/grevm@26b586c Parallel EVM (DAG + Block-STM), ~2,998 LOC
gravity-api-types Galxe/gravity-aptos@c9ae04b Consensus-execution interface types, ~1,485 LOC
revm v29.0.1-gravity Galxe/revm Custom revm fork
alloy-evm v0.21.3-gravity Galxe/alloy Custom alloy fork

Pipeline Architecture

OrderedBlock (from consensus)
    │
    ▼
┌──────────────┐    ┌──────────────────┐    ┌──────────────┐    ┌────────┐
│  Execution   │ →  │  Merklization    │ →  │ Verification │ →  │ Commit │
│  (Grevm)     │    │  (16-way parallel│    │              │    │(RocksDB│
│              │    │   state root)    │    │              │    │  3-CF) │
└──────────────┘    └──────────────────┘    └──────────────┘    └────────┘

Related Resources

estensen and others added 30 commits September 19, 2024 08:29
…#10934)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Signed-off-by: Abhishekkochar <abhishekkochar2@gmail.com>
nekomoto911 and others added 28 commits December 25, 2025 10:10
* return None if get onchain config failed

* support fetching latest onchain config without specified block number
Keep the block header timestamp in seconds, while using microseconds for ordered blocks to pass to metadata transactions.
#225)

use sharding rocksdb instances to optimize persist stage
* feat(trie): support eth_getProof for nested hash, step 1
Support hive in Greth
Add blockNumber field to JWK oracle commitMessageSent ABIs
Extract and carry source block number from MessageSent events
Add OracleStateFetcher to fetch latest DataRecord from NativeOracle
Add persistence module for tracking processed state across restarts
Remove auto-discovery from BlockchainEventSource, use explicit cursor
Update gravity-api-types dependency to latest revision
This enables the relayer to track the source block number for each oracle
event and fetch consistent oracle state from the chain, improving state
reconciliation across restarts.
 ignore and skip unsupported actions
* fix header timestamp in epoch change block

* debug assertions for block execution validation

* fix gravity pipe test
Co-authored-by: Snezhkko <snezhkodaria38@gmail.com>
* support custom precompiles for ParallelExecutor

* support bls verify precompile

* apply custom precompiles
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.