Skip to content

Commit

Permalink
Perf: recover signer during preflight (#128)
Browse files Browse the repository at this point in the history
* nondet sigs + genesis serde + refactors

* nits, formatting

* Remove unused dependencies

* cleanups

---------

Co-authored-by: Rami Khalil <the.rami.khalil@gmail.com>
  • Loading branch information
Wollac and hashcashier authored Dec 12, 2024
1 parent 80e3c5d commit a0662cf
Show file tree
Hide file tree
Showing 37 changed files with 439 additions and 236 deletions.
79 changes: 40 additions & 39 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@ default-features = false
alloy = { version = "0.4.2", features = ["full"] }
alloy-chains = "0.1.38"
alloy-consensus = "0.4.2"
alloy-genesis = "0.4.2"
alloy-primitives = { version = "0.8.8", default-features = false }
alloy-rlp = "0.3.8"
op-alloy-consensus = "0.4.0"
op-alloy-network = "0.4.0"
op-alloy-protocol = "0.4.0"
op-alloy-provider = "0.4.0"
op-alloy-rpc-types = "0.4.0"

# Reth
Expand Down Expand Up @@ -92,13 +91,14 @@ bincode = "1.3.3"
bytemuck = "1.19.0"
clap = { version = "4.0", features = ["derive"] }
env_logger = "0.11.5"
hashbrown = { version = "0.15.0", features = ["inline-more"] }
k256 = { version = "0.13.3", features = ["serde", "pem"] }
log = "0.4.22"
flate2 = "1.0.34"
once_cell = "1.20.2"
pot = "3.0.1"
serde = { version = "1.0.210", features = ["derive"] }
serde_json = { version = "1.0.128", features = ["alloc"] }
serde_with = "3.7.0"
serde_with = "3.11.0"
thiserror = "1.0.64"
tiny-keccak = "2.0.2"
tokio = { version = "1.41.0", features = ["full"] }
Expand Down
7 changes: 3 additions & 4 deletions bin/benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ workspace = true
[dependencies]
alloy.workspace = true
alloy-chains.workspace = true
anyhow.workspace = true
clap.workspace = true
env_logger.workspace = true
tracing.workspace = true
log = "0.4.22"

[features]
metal = ["zeth/metal"]
cuda = ["zeth/cuda"]
disable-dev-mode = ["zeth/disable-dev-mode"]
cuda = ["zeth/cuda"]
metal = ["zeth/metal"]
prove = ["zeth/prove"]
16 changes: 4 additions & 12 deletions bin/ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,13 @@ workspace = true


[dependencies]
alloy.workspace = true
anyhow.workspace = true
bincode.workspace = true
bytemuck.workspace = true
clap.workspace = true
env_logger.workspace = true
log.workspace = true
pot.workspace = true
reth-chainspec.workspace = true
serde.workspace = true
tokio.workspace = true
tracing.workspace = true

[features]
metal = ["zeth/metal"]
cuda = ["zeth/cuda"]
debug-guest-build = ["zeth-guests/debug-guest-build"]
disable-dev-mode = ["zeth/disable-dev-mode"]
debug-guest-build = ["zeth-guests/debug-guest-build"]
cuda = ["zeth/cuda"]
metal = ["zeth/metal"]
prove = ["zeth/prove"]
17 changes: 7 additions & 10 deletions bin/ethereum/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,16 @@
// limitations under the License.

use reth_chainspec::NamedChain;
use tokio::task::spawn_blocking;
use zeth_guests::{ZETH_GUESTS_RETH_ETHEREUM_ELF, ZETH_GUESTS_RETH_ETHEREUM_ID};
use zeth_preflight_ethereum::RethBlockBuilder;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
spawn_blocking(move || {
zeth::run::<RethBlockBuilder, _, _, _, _>(
ZETH_GUESTS_RETH_ETHEREUM_ELF,
ZETH_GUESTS_RETH_ETHEREUM_ID,
NamedChain::Mainnet,
"ethereum",
)
})
.await?
zeth::run::<RethBlockBuilder, _, _, _, _>(
ZETH_GUESTS_RETH_ETHEREUM_ELF,
ZETH_GUESTS_RETH_ETHEREUM_ID,
NamedChain::Mainnet,
"ethereum",
)
.await
}
16 changes: 4 additions & 12 deletions bin/optimism/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,13 @@ workspace = true


[dependencies]
alloy.workspace = true
anyhow.workspace = true
bincode.workspace = true
bytemuck.workspace = true
clap.workspace = true
env_logger.workspace = true
log.workspace = true
pot.workspace = true
reth-chainspec.workspace = true
serde.workspace = true
tokio.workspace = true
tracing.workspace = true

[features]
metal = ["zeth/metal"]
cuda = ["zeth/cuda"]
debug-guest-build = ["zeth-guests/debug-guest-build"]
disable-dev-mode = ["zeth/disable-dev-mode"]
debug-guest-build = ["zeth-guests/debug-guest-build"]
cuda = ["zeth/cuda"]
metal = ["zeth/metal"]
prove = ["zeth/prove"]
Binary file not shown.
17 changes: 7 additions & 10 deletions bin/optimism/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,16 @@
// limitations under the License.

use reth_chainspec::NamedChain;
use tokio::task::spawn_blocking;
use zeth_guests::{ZETH_GUESTS_RETH_OPTIMISM_ELF, ZETH_GUESTS_RETH_OPTIMISM_ID};
use zeth_preflight_optimism::OpRethBlockBuilder;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
spawn_blocking(move || {
zeth::run::<OpRethBlockBuilder, _, _, _, _>(
ZETH_GUESTS_RETH_OPTIMISM_ELF,
ZETH_GUESTS_RETH_OPTIMISM_ID,
NamedChain::Optimism,
"optimism",
)
})
.await?
zeth::run::<OpRethBlockBuilder, _, _, _, _>(
ZETH_GUESTS_RETH_OPTIMISM_ELF,
ZETH_GUESTS_RETH_OPTIMISM_ID,
NamedChain::Optimism,
"optimism",
)
.await
}
Loading

0 comments on commit a0662cf

Please sign in to comment.