-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enha: save analysed bytecodes #1905
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
PR Type
Enhancement
Description
Bytecode
type instead of raw bytes for representing contract bytecodeAccount
,ExecutionAccountChanges
, and related structures to work with the newBytecode
typeBytecodeRocksdb
for persistent storage of bytecode, supporting different bytecode formats (Legacy, Analyzed, EOF)AnalysisKind::Analyse
for created bytecodesChanges walkthrough 📝
1 files
evm.rs
Update EVM bytecode analysis configuration
src/eth/executor/evm.rs
perf_analyse_created_bytecodes
fromAnalysisKind::Raw
toAnalysisKind::Analyse
9 files
account.rs
Refactor Account struct to use Bytecode type
src/eth/primitives/account.rs
Bytes
withBytecode
for thebytecode
field inAccount
structis_contract
method to checkbytecode.bytecode()
instead ofbytecode
From
implementation to useto_analysed
function for bytecodeconversion
execution_account_changes.rs
Update ExecutionAccountChanges to use Bytecode
src/eth/primitives/execution_account_changes.rs
bytecode
field type fromExecutionValueChange>
toExecutionValueChange>
execution_value_change.rs
Add Default implementations for value change types
src/eth/primitives/execution_value_change.rs
Default
derive forExecutionValueChange
andValueState
structsNotSet
as the default variant forValueState
enumrpc_server.rs
Modify eth_get_code RPC method for new Bytecode type
src/eth/rpc/rpc_server.rs
eth_get_code
function to usebytecode.original_bytes()
insteadof direct bytecode
inmemory.rs
Update InMemoryPermanentAccount to use Bytecode
src/eth/storage/permanent/inmemory.rs
bytecode
field type fromInMemoryHistory>
toInMemoryHistory>
in
InMemoryPermanentAccount
structaccount.rs
Refactor AccountRocksdb to use BytecodeRocksdb
src/eth/storage/permanent/rocks/types/account.rs
bytes::BytesRocksdb
tobytecode::BytecodeRocksdb
bytecode
field type fromOption
toOption
inAccountRocksdb
struct
bytecode.rs
Introduce BytecodeRocksdb for persistent storage
src/eth/storage/permanent/rocks/types/bytecode.rs
BytecodeRocksdb
,LegacyAnalyzedBytecodeRocksdb
,EofRocksdb
, and related typesBytecode
andBytecodeRocksdb
bytes.rs
Extend BytesRocksdb conversions
src/eth/storage/permanent/rocks/types/bytes.rs
BytesRocksdb
andRevmBytes
From>
forBytesRocksdb
mod.rs
Add bytecode module to types
src/eth/storage/permanent/rocks/types/mod.rs
mod bytecode;
to include the new bytecode module1 files
rocks_state.rs
Adjust test cases for new Bytecode type
src/eth/storage/permanent/rocks/rocks_state.rs
Bytecode::new_raw
instead of raw bytes forbytecode
1 files
Cargo.toml
Enable serde feature for revm dependency
Cargo.toml
configurations