Skip to content

Commit

Permalink
answer comments
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Edison <gregory.edison1993@gmail.com>
  • Loading branch information
greged93 committed Dec 26, 2024
1 parent 1d62191 commit 6fb4656
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
5 changes: 2 additions & 3 deletions crates/engine/tree/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ scroll = [
"reth-scroll-primitives",
"reth-scroll-storage/scroll"
]
scroll-mpt = [
"scroll",
"reth-stages/scroll-mpt"
skip-state-root-validation = [
"reth-stages/skip-state-root-validation"
]
4 changes: 2 additions & 2 deletions crates/engine/tree/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2286,9 +2286,9 @@ where
state_provider.state_root_from_state_with_updates(hashed_state.clone())?
};

#[cfg(feature = "scroll-mpt")]
#[cfg(feature = "skip-state-root-validation")]
let _ = state_root;
#[cfg(not(feature = "scroll-mpt"))]
#[cfg(not(feature = "skip-state-root-validation"))]
if state_root != block.header().state_root() {
// call post-block hook
self.invalid_block_hook.on_invalid_block(
Expand Down
7 changes: 3 additions & 4 deletions crates/node/builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ scroll = [
"reth-engine-util/scroll",
"reth-invalid-block-hooks/scroll"
]
scroll-mpt = [
"scroll",
"reth-stages/scroll-mpt",
"reth-engine-tree/scroll-mpt"
skip-state-root-validation = [
"reth-stages/skip-state-root-validation",
"reth-engine-tree/skip-state-root-validation"
]
6 changes: 4 additions & 2 deletions crates/scroll/bin/scroll-reth-mpt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ clap = { workspace = true, features = ["derive", "env"] }

[features]
scroll = [
"reth-node-builder/scroll-mpt",
"reth-provider/scroll",
"reth-scroll-cli/scroll",
"reth-scroll-node/scroll-mpt"
]
skip-state-root-validation = [
"reth-node-builder/skip-state-root-validation",
"reth-scroll-node/skip-state-root-validation"
]
optimism = [
"reth-provider/optimism",
Expand Down
2 changes: 1 addition & 1 deletion crates/scroll/bin/scroll-reth-mpt/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn main() {
}
}

#[cfg(all(feature = "optimism", not(feature = "scroll")))]
#[cfg(any(feature = "optimism", not(feature = "scroll")))]
fn main() {
eprintln!("Scroll feature is not enabled");
std::process::exit(1);
Expand Down
2 changes: 1 addition & 1 deletion crates/scroll/bin/scroll-reth/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn main() {
}
}

#[cfg(all(feature = "optimism", not(feature = "scroll")))]
#[cfg(any(feature = "optimism", not(feature = "scroll")))]
fn main() {
eprintln!("Scroll feature is not enabled");
std::process::exit(1);
Expand Down
2 changes: 1 addition & 1 deletion crates/scroll/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ scroll = [
"reth-scroll-state-commitment/scroll",
"reth-scroll-evm/scroll",
]
scroll-mpt = ["scroll"]
skip-state-root-validation = []
2 changes: 1 addition & 1 deletion crates/stages/stages/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ scroll = [
"reth-scroll-storage/scroll",
"reth-scroll-primitives"
]
scroll-mpt = ["scroll"]
skip-state-root-validation = []

[[bench]]
name = "criterion"
Expand Down
4 changes: 2 additions & 2 deletions crates/stages/stages/src/stages/merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,9 @@ where
// Reset the checkpoint
self.save_execution_checkpoint(provider, None)?;

#[cfg(feature = "scroll-mpt")]
#[cfg(feature = "skip-state-root-validation")]
let _ = trie_root;
#[cfg(not(feature = "scroll-mpt"))]
#[cfg(not(feature = "skip-state-root-validation"))]
validate_state_root(trie_root, SealedHeader::seal(target_block), to_block)?;

Ok(ExecOutput {
Expand Down

0 comments on commit 6fb4656

Please sign in to comment.