Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
CeciliaZ030 committed Feb 7, 2024
1 parent 6867af4 commit ef4172f
Show file tree
Hide file tree
Showing 17 changed files with 825 additions and 155 deletions.
271 changes: 143 additions & 128 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ bonsai-sdk = "0.5"
hashbrown = { version = "0.14", features = ["inline-more"] }
risc0-build = "0.19"
risc0-zkvm = { version = "0.19", default-features = false }
revm-primitives = { git = "https://github.com/bluealloy/revm.git", rev = "6cd0bfc96da64513affe01c1964dd80beeb8c620", default_features = false }
revm = { git = "https://github.com/bluealloy/revm.git", rev = "6cd0bfc96da64513affe01c1964dd80beeb8c620", default-features = false, features = [
revm-primitives = { git = "https://github.com/ceciliaz030/revm.git", branch = "sync-taiko-v3.5", default_features = false }
revm = { git = "https://github.com/ceciliaz030/revm.git", branch = "sync-taiko-v3.5", default-features = false, features = [
"std",
"serde",
"optimism",
] }
9 changes: 5 additions & 4 deletions guests/eth-block/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions guests/op-block/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion guests/op-block/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"

[dependencies]
risc0-zkvm = { version = "0.19", default-features = false, features = ['std'] }
zeth-lib = { path = "../../lib", default-features = false }
zeth-lib = { path = "../../lib", default-features = false, features = ["optimism"]}

[patch.crates-io]
# use optimized risc0 circuit
Expand Down
9 changes: 5 additions & 4 deletions guests/op-derive/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ ruint = { version = "1.10", default-features = false }
serde = "1.0"
thiserror = "1.0"
zeth-primitives = { path = "../primitives", features = ["revm", "ethers"] }
alloy-primitives = { version = "0.6", default-features = false, features = [
"rlp",
] }

[target.'cfg(not(target_os = "zkvm"))'.dependencies]
chrono = { version = "0.4", default-features = false }
Expand All @@ -30,3 +33,8 @@ zeth-primitives = { path = "../primitives", features = ["revm", "ethers"] }
[dev-dependencies]
bincode = "1.3"
serde_with = "3.1"

[features]
default = ["optimism"]
taiko = ["revm/taiko"]
optimism = ["revm/optimism"]
3 changes: 2 additions & 1 deletion lib/src/builder/execute/ethereum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ impl TxExecStrategy<EthereumTxEssence> for EthTxExecStrategy {
.modify_cfg_env(|cfg_env| {
// set the EVM configuration
cfg_env.chain_id = block_builder.chain_spec.chain_id();
cfg_env.optimism = false;
// Added features "optimism" in revm
// cfg_env.optimism = false;
})
.modify_block_env(|blk_env| {
// set the EVM block environment
Expand Down
3 changes: 3 additions & 0 deletions lib/src/builder/execute/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ use zeth_primitives::transactions::TxEssence;
use super::BlockBuilder;

pub(super) mod ethereum;
#[cfg(feature = "optimism")]
pub(super) mod optimism;
#[cfg(feature = "taiko")]
pub (super) mod taiko;

pub trait TxExecStrategy<E: TxEssence> {
fn execute_transactions<D>(block_builder: BlockBuilder<D, E>) -> Result<BlockBuilder<D, E>>
Expand Down
Loading

0 comments on commit ef4172f

Please sign in to comment.