Audit: Gravity Testnet v1.0.0 — Full diff vs reth v1.8.3#258
Draft
Richard1048576 wants to merge 216 commits intoaudit/base-reth-v1.8.3from
Draft
Audit: Gravity Testnet v1.0.0 — Full diff vs reth v1.8.3#258Richard1048576 wants to merge 216 commits intoaudit/base-reth-v1.8.3from
Richard1048576 wants to merge 216 commits intoaudit/base-reth-v1.8.3from
Conversation
* fix missed pre-execution in `EthBlockExecutor` and rewrite state in grevm executor * add debug ext EVM_COMPARE_WITH_REVM_EXECUTOR * fix pre-execution in `GrevmBlockExecutor`
* implement pipe-exec-layer-ext-v2 * introduce gravity storage in pipe-exec-layer-ext-v2
* implement pipe barrier in PipeExecService * adapt gravity storage interface
Co-authored-by: kk-x <exmple@example.com>
- fix `state_root_with_updates` and narrow down the critical area of the lock in `BlockViewStorage` - implement `state_root_with_updates_v2` for `LatestStateProviderRef` - skip `try_recv_engine_message` if enable `PIPE_EXEC_LAYER_EXT_V2` - fix cancun fields
- fix range in BlockViewStorage::get_state_view - block waiting for make canonical to complete - implement missing state_root_with_updates_v2 function for structs which implement StateRootProvider trait - use std::mpsc channel as event channel, because the receiver side is not in tokio task and we need recv_timeout function.
* implement ParallelStateProvider * implement functions that support build parallel state provider
* implement `block_hash` for `ParallelStateProvider` * support get latest state provider in `Stage::execute` * support parallel state provider for latest block * use `ParallelStateProvider` in `ExecutionStage`
If there are no concurrent requests, process the requests in place to eliminate synchronization overhead. Benchmark for block 17034870 to 17134870 using grevm 1.0: - LatestStateProvider (no parallel): 403.92 Mgas/second - ParallelStateProvider before opt. (parallel = 8): 331.64 Mgas/second - ParallelStateProvider after opt. (parallel = 8): 544.19 Mgas/second
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
…ain_core_contracts (#231)
* feat(trie): support eth_getProof for nested hash, step 1
- suite new contract - fix validator set
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
Contributor
|
Your PR title doesn't follow the Conventional Commit guidelines. Example of valid titles:
Usage:
Breaking Changes Breaking changes are noted by using an exclamation mark. For example:
Help For more information, follow the guidelines here: https://www.conventionalcommits.org/en/v1.0.0/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR captures the complete set of Gravity-specific changes on top of upstream reth v1.8.3 for external security audit purposes.
gravity-testnet-v1.0.0paradigmxyz/rethv1.8.3Scope
New Gravity-Specific Crates (highest priority)
crates/gravity-primitives/OnceLock), Gravity CLI flagscrates/gravity-storage/GravityStoragetrait,ParallelDatabase,BlockViewStoragecrates/pipe-exec-layer-ext-v2/execute/OrderedBlock→ EVM →ExecutionResult, on-chain config, BLS/Mint precompilescrates/pipe-exec-layer-ext-v2/event-bus/MakeCanonicalEvent,WaitForPersistenceEvent)crates/pipe-exec-layer-ext-v2/relayer/crates/storage/db/src/implementation/rocksdb/Modified Upstream Crates
crates/engine/tree/crates/ethereum/evm/,crates/evm/evm/parallel_execute.rs,debug_ext.rs)crates/node/builder/,crates/node/core/crates/storage/db/crates/trie/Custom External Dependencies
26b586cc9ae04bPipeline Architecture
Related Resources