Repository navigation
chore: remove dependency on forked alloy evm - #145
Conversation
fixed v1 Update lib.rs cleanup
WalkthroughReplaces a forked alloy-evm patch with revm-based patches, adds a public Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant RPC as RPC (Estimate/Trace)
participant BerEVM as BerachainEvm
participant Revm as RevmEvm
note right of BerEVM #DDEEF8: inspector flag controls path
User->>RPC: estimate/trace request (tx)
RPC->>BerEVM: transact(tx_env)
alt Inspector enabled
BerEVM->>Revm: inspect_tx(tx_env)
else Inspector disabled
BerEVM->>Revm: transact(tx_env)
end
Revm-->>BerEVM: result
BerEVM-->>RPC: result
RPC-->>User: response
sequenceDiagram
autonumber
participant Node as Node Init
participant Cfg as BerachainEvmConfig
participant Fact as BerachainEvmFactory
participant Exec as BlockExecutor
Node->>Cfg: new_with_evm_factory(spec, BerachainEvmFactory::default())
Cfg-->>Node: config
Node->>Exec: build with config.evm_factory
Exec->>Fact: create_evm(db, env)
Fact-->>Exec: BerachainEvm instance
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/rpc/api.rs (2)
212-234: Don’t requiretofor Ethereum create tx; do require it for POL.Contract-creation (Ethereum) uses
to = None. Current checks reject valid create requests. Gateto.is_some()only for POL, not Ethereum. Mirror this incan_submit/can_build.- if self.to.is_none() { - missing.push("to"); - } + // `to` is optional for Ethereum create tx, but required for POL (create is disallowed anyway). + if matches!(ty, BerachainTxType::Berachain) && self.to.is_none() { + missing.push("to"); + } @@ - fn can_submit(&self) -> bool { - self.from.is_some() && - self.to.is_some() && - self.gas.is_some() && - (self.gas_price.is_some() || self.max_fee_per_gas.is_some()) - } + fn can_submit(&self) -> bool { + self.from.is_some() + && self.gas.is_some() + && (self.gas_price.is_some() || self.max_fee_per_gas.is_some()) + && (self.transaction_type != Some(POL_TX_TYPE) || self.to.is_some()) + } @@ - fn can_build(&self) -> bool { - self.to.is_some() && - self.gas.is_some() && - (self.gas_price.is_some() || self.max_fee_per_gas.is_some()) - } + fn can_build(&self) -> bool { + self.gas.is_some() + && (self.gas_price.is_some() || self.max_fee_per_gas.is_some()) + && (self.transaction_type != Some(POL_TX_TYPE) || self.to.is_some()) + }Also applies to: 238-250
601-614: Zero out POL transaction gas on all exit paths and remove duplicatedevm.transactcall
Unconditionally invokeevm.transact(...)into a singlemut res, then iftx_type == POL_TX_TYPE, match onres.resultto resetgas_usedto 0 forSuccess,Revert, andHalt.
🧹 Nitpick comments (6)
src/rpc/api.rs (1)
277-287: Defaultingnonceto 0 duringprep_for_submissionis risky.Auto-filling a nonce can cause accidental replay/race with account state. Prefer leaving it unset and letting upstream fill it.
- if self.nonce.is_none() { - self.nonce = Some(0); - } + // Leave nonce unset; provider/signers should determine the correct nonce.src/alloy_evm/mod.rs (2)
132-133: Error message polish (clarity).Change to a clear, user-facing message.
- TxKind::Create => Err(EVMError::Custom("pol tx cannot be create".into())), + TxKind::Create => Err(EVMError::Custom("POL transactions cannot be contract creation (Create)".into())),
189-202: Minor: build without inspector wheninspect = false(if available).You always construct with an inspector and then gate with a bool. If the builder supports a non-inspector path, prefer it to reduce overhead.
If
Context::build_mainnet()(no inspector) exists, prefer it here and keepcreate_evm_with_inspectoras-is. Otherwise, current approach is acceptable for now.src/lib.rs (1)
5-5: Module name may be confusing.The new EVM wrapper targets revm, not alloy-evm. Consider
pub mod evm;orpub mod berachain_evm;to avoid confusion in public API.src/node/evm/executor.rs (2)
112-153: Minor cleanup: remove redundant localusestatements.
use reth::revm::DatabaseCommit;anduse reth_evm::block::StateChangeSource;are already imported at top; drop the inner shadowing to reduce noise.- use reth::revm::DatabaseCommit; - use reth_evm::block::StateChangeSource; + // (imports already present at module scope)
188-194: Narrow the POL skip condition; current match may skip future non-POL Berachain txs.Today, any
BerachainTxEnvelope::Berachain(_)is skipped. If other Berachain-native txs appear later, they’ll never execute. Prefer an explicit “POL already executed” guard.Apply within this function:
- if let BerachainTxEnvelope::Berachain(_) = tx.tx() { - return Ok(Some(0)); - } + if let BerachainTxEnvelope::Berachain(_) = tx.tx() { + // Skip only if POL was executed in `apply_pre_execution_changes`. + if self.ctx.prev_proposer_pubkey.is_some() { + return Ok(Some(0)); + } + }And (outside this hunk) consider adding a boolean flag on the executor to make the invariant explicit:
// struct BerachainBlockExecutor<'a, Evm> { ... pub pol_executed: bool, // set to true in `execute_pol_transaction_with_receipt()` after success, // and check that flag here to decide skipping.Would you like me to wire this flag end-to-end?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (8)
Cargo.toml(0 hunks)src/alloy_evm/mod.rs(1 hunks)src/lib.rs(1 hunks)src/main.rs(2 hunks)src/node/evm/config.rs(4 hunks)src/node/evm/executor.rs(3 hunks)src/node/evm/mod.rs(2 hunks)src/rpc/api.rs(2 hunks)
💤 Files with no reviewable changes (1)
- Cargo.toml
🧰 Additional context used
🧬 Code graph analysis (5)
src/node/evm/config.rs (1)
src/node/evm/executor.rs (1)
evm_factory(332-334)
src/main.rs (1)
src/node/evm/config.rs (1)
new_with_evm_factory(45-55)
src/rpc/api.rs (1)
src/node/evm/executor.rs (1)
evm(321-323)
src/alloy_evm/mod.rs (1)
src/rpc/api.rs (1)
inspect(586-615)
src/node/evm/mod.rs (1)
src/node/evm/config.rs (1)
new_with_evm_factory(45-55)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Check documentation
- GitHub Check: Run tests
- GitHub Check: Security audit
- GitHub Check: Clippy lint
- GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (8)
src/node/evm/mod.rs (2)
10-13: Swapping to BerachainEvmFactory import looks correct.Consistent with config/executor changes; no API surface change here.
40-44: Factory injection switch LGTM.BerachainEvmFactory::default() passed into new_with_evm_factory matches the new type.
src/node/evm/executor.rs (2)
2-2: Import switch to BerachainEvmFactory is consistent.Matches associated type change below.
327-327: Associated EvmFactory updated correctly.Type aligns with config and main; trait bounds appear unchanged.
src/node/evm/config.rs (2)
2-2: Import swap to BerachainEvmFactory matches the refactor.
37-38: Config field and constructor now typed to BerachainEvmFactory — looks good.Public surface remains stable; call sites updated accordingly.
Also applies to: 47-48
src/main.rs (2)
7-7: Main import updated to BerachainEvmFactory.Consistent with the rest of the PR.
33-33: All checks passed — factory wiring clean andtransact_system_callimplemented.
Verification confirms noEthEvmFactoryremnants, no forkedalloy-evmin Cargo.toml,BerachainEvmFactoryimplementsEvmFactory, andtransact_system_callis defined in the EVM wrapper.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/evm/mod.rs (1)
176-189: DRY up duplicated EVM construction codeBoth constructors duplicate the Context::mainnet + with_* + with_precompiles chain. Factor into a small helper to reduce divergence risk.
Example (outside this impl):
fn build_inner<DB, I>(db: DB, input: EvmEnv, inspector: I) -> RevmEvm<EthEvmContext<DB>, I, EthInstructions<EthInterpreter, EthEvmContext<DB>>, PrecompilesMap, EthFrame> where DB: Database, I: Inspector<EthEvmContext<DB>>, { let spec_id = input.cfg_env.spec; Context::mainnet() .with_block(input.block_env) .with_cfg(input.cfg_env) .with_db(db) .build_mainnet_with_inspector(inspector) .with_precompiles(PrecompilesMap::from_static(Precompiles::new( PrecompileSpecId::from_spec_id(spec_id), ))) }Also applies to: 199-209
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (6)
src/evm/mod.rs(1 hunks)src/lib.rs(1 hunks)src/main.rs(2 hunks)src/node/evm/config.rs(4 hunks)src/node/evm/executor.rs(3 hunks)src/node/evm/mod.rs(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
- src/lib.rs
- src/main.rs
- src/node/evm/executor.rs
- src/node/evm/config.rs
🧰 Additional context used
🧬 Code graph analysis (2)
src/node/evm/mod.rs (1)
src/node/evm/config.rs (1)
new_with_evm_factory(45-55)
src/evm/mod.rs (2)
src/node/evm/executor.rs (2)
evm(318-320)finish(236-308)src/rpc/api.rs (1)
inspect(586-615)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Check documentation
- GitHub Check: Security audit
- GitHub Check: Run tests
- GitHub Check: Clippy lint
- GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (4)
src/evm/mod.rs (2)
121-126: Confirm PoL system-call semantics (value/gas handling)This path ignores tx.value and any gas settings. Confirm that PoL system calls must always be value-less and gas-free in all execution contexts (not only RPC inspection). If not, plumb value/gas accordingly.
25-35: MSRV check for #[expect(missing_debug_implementations)]Ensure your MSRV supports #[expect(...)] on lints. If not, swap to #[allow(missing_debug_implementations)] or gate by cfg_attr.
src/node/evm/mod.rs (2)
40-44: Switch to BerachainEvmFactory LGTMFactory injection reads clean and matches config.rs signature.
10-13: Verify public export of crate::evmEnsure src/lib.rs publicly exposes the evm module so this use path resolves in downstream crates/binaries.
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/rpc/api.rs (2)
79-91: PoL requests lose their type — settransaction_typein theFrom<BerachainTxEnvelope>conversion.Without setting
transaction_type,output_tx_type()will treat PoL requests as Ethereum variants, breaking validation and routing through the new builder. Fix by tagging PoL withPOL_TX_TYPE.BerachainTxEnvelope::Berachain(pol_tx) => Self { to: Some(pol_tx.to.into()), gas: Some(pol_tx.gas_limit), gas_price: Some(pol_tx.gas_price), value: Some(pol_tx.value()), input: Some(pol_tx.input().clone()).into(), nonce: Some(pol_tx.nonce()), chain_id: pol_tx.chain_id(), from: Some(pol_tx.from), + transaction_type: Some(POL_TX_TYPE), ..Default::default() },
208-217: Don’t forbid contract-creation txs — drop hard requirement forto.JSON-RPC creation uses
to = null. Requiringto.is_some()incomplete_type,can_submit, andcan_buildblocks legitimate create txs.if self.from.is_none() { missing.push("from"); } - if self.to.is_none() { - missing.push("to"); - } if self.gas.is_none() { missing.push("gas"); }- fn can_submit(&self) -> bool { - self.from.is_some() && - self.to.is_some() && - self.gas.is_some() && - (self.gas_price.is_some() || self.max_fee_per_gas.is_some()) - } + fn can_submit(&self) -> bool { + self.from.is_some() + && self.gas.is_some() + && (self.gas_price.is_some() || self.max_fee_per_gas.is_some()) + }- fn can_build(&self) -> bool { - self.to.is_some() && - self.gas.is_some() && - (self.gas_price.is_some() || self.max_fee_per_gas.is_some()) - } + fn can_build(&self) -> bool { + self.gas.is_some() + && (self.gas_price.is_some() || self.max_fee_per_gas.is_some()) + }Also applies to: 234-245
🧹 Nitpick comments (4)
src/rpc/api.rs (4)
273-284: Avoid defaultingnonceto 0 inprep_for_submission().Defaulting to 0 can underflow/replace pending nonces. Leave
nonceunset so upstream fill logic resolves it.fn prep_for_submission(&mut self) { - if self.nonce.is_none() { - self.nonce = Some(0); - } if self.value.is_none() { self.value = Some(U256::ZERO); } if self.input.input.is_none() { self.input.input = Some(Bytes::new()); } }If
eth_sendTransactionrelies on this path in your stack, confirm upstream nonce-filling is active; otherwise we should wire provider nonce here.
407-410: Debug type name mismatch.Use the actual type name for clarity in logs.
- f.debug_struct("EthApi").finish_non_exhaustive() + f.debug_struct("BerachainApi").finish_non_exhaustive()
44-50: De-drift the display label for PoL.Hardcoding "BRIP-0004" risks drift vs.
POL_TX_TYPE. Consider a shared const or helper mapping.Would you like a small helper (e.g.,
const POL_DISPLAY: &str = "BRIP-0004";) wired next toPOL_TX_TYPE?
6-6: Potential unused import.
use alloy_consensus::Transaction;appears unused in this file; remove to avoid warnings.- use alloy_consensus::Transaction;Run a quick check to confirm no downstream usage via re-exports.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
src/evm/mod.rs(1 hunks)src/rpc/api.rs(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/evm/mod.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Run tests
- GitHub Check: Security audit
- GitHub Check: Check documentation
- GitHub Check: Clippy lint
- GitHub Check: semgrep-cloud-platform/scan
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
src/evm/mod.rs (2)
6-8: Use helper to read tx type and fix error string (repeat from prior review)Avoid direct field access to
tx.tx_typefor cross-version stability and improve the error message.use reth::revm::{ Context, ExecuteEvm, InspectEvm, Inspector, MainBuilder, MainContext, SystemCallEvm, context::{ - BlockEnv, CfgEnv, Evm as RevmEvm, TxEnv, + BlockEnv, CfgEnv, Evm as RevmEvm, TxEnv, Transaction as TxEnvTransaction, result::{EVMError, HaltReason, ResultAndState}, },- if tx.tx_type == POL_TX_TYPE { + if TxEnvTransaction::tx_type(&tx) == POL_TX_TYPE { return match tx.kind { - TxKind::Create => Err(EVMError::Custom("pol tx cannot be create".into())), + TxKind::Create => Err(EVMError::Custom("POL Create transactions are unsupported".into())), TxKind::Call(to) => {Also applies to: 122-126
184-191: Factory Context must match the EVM’s context type (repeat from prior review)Inspector bounds require the factory’s
Contextto beEthEvmContext<DB>.- type Context<DB: Database> = Context<BlockEnv, TxEnv, CfgEnv, DB>; + type Context<DB: Database> = EthEvmContext<DB>;
🧹 Nitpick comments (2)
src/evm/mod.rs (2)
127-139: Clarify whether POL gas should be zeroed on all outcomes, not just SuccessYour comment says “Set gas_used to 0 for POL transactions” but only Success is handled. If intended, consider covering Revert/Halt too.
- result.result = match result.result { - ExecutionResult::Success { reason, gas_refunded, logs, output, .. } => { - ExecutionResult::Success { - reason, - gas_used: 0, - gas_refunded, - logs, - output, - } - } - other => other, - }; + result.result = match result.result { + ExecutionResult::Success { reason, gas_refunded, logs, output, .. } => { + ExecutionResult::Success { + reason, + gas_used: 0, + gas_refunded, + logs, + output, + } + } + ExecutionResult::Revert { output, .. } => { + ExecutionResult::Revert { output, gas_used: 0 } + } + ExecutionResult::Halt { reason, .. } => { + ExecutionResult::Halt { reason, gas_used: 0 } + } + other => other, + };
193-207: DRY up the EVM constructionBoth constructors duplicate the builder chain; factor into a small helper to reduce drift.
@@ - fn create_evm<DB: Database>(&self, db: DB, input: EvmEnv) -> Self::Evm<DB, NoOpInspector> { - let spec_id = input.cfg_env.spec; - BerachainEvm { - inner: Context::mainnet() - .with_block(input.block_env) - .with_cfg(input.cfg_env) - .with_db(db) - .build_mainnet_with_inspector(NoOpInspector {}) - .with_precompiles(PrecompilesMap::from_static(Precompiles::new( - PrecompileSpecId::from_spec_id(spec_id), - ))), - inspect: false, - } - } + fn create_evm<DB: Database>(&self, db: DB, input: EvmEnv) -> Self::Evm<DB, NoOpInspector> { + BerachainEvm { inner: self.build_inner(db, input, NoOpInspector {}), inspect: false } + } @@ - ) -> Self::Evm<DB, I> { - let spec_id = input.cfg_env.spec; - BerachainEvm { - inner: Context::mainnet() - .with_block(input.block_env) - .with_cfg(input.cfg_env) - .with_db(db) - .build_mainnet_with_inspector(inspector) - .with_precompiles(PrecompilesMap::from_static(Precompiles::new( - PrecompileSpecId::from_spec_id(spec_id), - ))), - inspect: true, - } - } + ) -> Self::Evm<DB, I> { + BerachainEvm { inner: self.build_inner(db, input, inspector), inspect: true } + } + +impl BerachainEvmFactory { + fn build_inner<DB: Database, I: Inspector<EthEvmContext<DB>>>( + &self, + db: DB, + input: EvmEnv, + inspector: I, + ) -> reth::revm::Evm< + EthEvmContext<DB>, + I, + EthInstructions<EthInterpreter, EthEvmContext<DB>>, + PrecompilesMap, + EthFrame, + > { + let spec_id = input.cfg_env.spec; + Context::mainnet() + .with_block(input.block_env) + .with_cfg(input.cfg_env) + .with_db(db) + .build_mainnet_with_inspector(inspector) + .with_precompiles(PrecompilesMap::from_static(Precompiles::new( + PrecompileSpecId::from_spec_id(spec_id), + ))) + } +}Also applies to: 208-226
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/evm/mod.rs(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Check documentation
- GitHub Check: Run tests
- GitHub Check: Security audit
- GitHub Check: Clippy lint
- GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (1)
src/evm/mod.rs (1)
235-283: Precompile availability tests look solidGood coverage of spec-dependent precompiles (MODEXP, BLAKE2F) and assertions across early vs later forks.
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Cargo.toml (1)
4-4: Pin Rust toolchain for Edition 2024No
rust-toolchain.toml(orrust-toolchain) was found in the repo—add one at the project root to pin a Rust release that supports the 2024 edition (e.g. Rust 1.71+), ensuring CI and local environments use a compatible toolchain.
♻️ Duplicate comments (2)
src/evm/mod.rs (2)
190-199: Align factory Context type to EthEvmContext to satisfy Inspector boundsUsing
reth::revm::Context<...>here breaksInspector/InspectorForbounds vs. the EVM’s context (EthEvmContext<DB>).Apply:
- type Context<DB: Database> = Context<BlockEnv, TxEnv, CfgEnv, DB>; + type Context<DB: Database> = EthEvmContext<DB>;This matches
I: Inspector<EthEvmContext<DB>>used byBerachainEvmand fixes generic coherence increate_evm_with_inspector.
111-117: Fix field access: read from inner.ctx, not from nonexistent struct fieldsCurrent code won’t compile;
self.block/self.cfgare not fields onBerachainEvm.Apply:
- fn block(&self) -> &BlockEnv { - &self.block - } + fn block(&self) -> &BlockEnv { + &self.inner.ctx.block + } - fn chain_id(&self) -> u64 { - self.cfg.chain_id - } + fn chain_id(&self) -> u64 { + self.inner.ctx.cfg.chain_id + }
🧹 Nitpick comments (1)
src/evm/mod.rs (1)
200-213: Minor: avoid ambiguousContext::mainnet()symbolGiven the associated type
Contexton the trait, explicitly qualify the builder to the reth type to reduce confusion.- inner: Context::mainnet() + inner: reth::revm::Context::mainnet() .with_block(input.block_env) .with_cfg(input.cfg_env) .with_db(db)(Repeat similarly below.)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
Cargo.toml(1 hunks)src/evm/mod.rs(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/evm/mod.rs (2)
src/node/evm/executor.rs (3)
new(57-72)evm(318-320)finish(236-308)src/node/evm/config.rs (1)
evm_env(103-135)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Check documentation
- GitHub Check: Run tests
- GitHub Check: Clippy lint
- GitHub Check: Security audit
- GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (4)
Cargo.toml (2)
106-119: Verify all RevM workspace crates use rev 9008e93
Run locally:cargo tree -e no-dev | rg -nP 'revm(-[a-z]+)? v|bluealloy/revm'Ensure every
revm*crate (including newly split interfaces) resolves to commit 9008e93 to avoid mixed sources.
72-76: No version skew detected — Cargo.lock lists bothalloy-rpc-typesandalloy-rpc-types-traceat1.0.27, so the trace crate aligns with the core RPC types.src/evm/mod.rs (2)
119-147: POL gas_used normalization: consider non-success outcomesYou zero
gas_usedonly onSuccess. If the intent is “POL never consumes gas,” consider normalizing other outcomes too, or document why only success is zeroed.Would you like a follow-up patch to set
gas_used = 0forRevertas well?
173-183: Components exposure looks goodReturning DB/Inspector/Precompiles via
components(_mut)cleanly supports inspector retrieval in tests.
|
todo: |
closes #109
Summary by CodeRabbit
New Features
Improvements
Refactor
Chores