Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/core-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install Rust nightly
run: rustup install nightly

- name: Install rustfmt for nightly
run: rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt

- name: Run rustfmt
run: cargo fmt -- --check
run: cargo +nightly fmt -- --check

cargo-sort:
runs-on: ubuntu-latest
Expand All @@ -30,7 +36,7 @@ jobs:
run: cargo install cargo-sort

- name: Run cargo sort
run: cargo sort --grouped --check
run: cargo sort --workspace --grouped --check

build:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ edition = "2024"

[workspace.dependencies]
ethereum_ssz = "0.8.2"
tracing = "0.1.40"
ream-consensus = { git = "https://github.com/ReamLabs/ream", package = "ream-consensus" }
tracing = "0.1.40"

[patch.crates-io]
ethereum_hashing = { git = "https://github.com/ReamLabs/ethereum_hashing" }
8 changes: 4 additions & 4 deletions host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ name = "consenzero-script"
path = "src/bin/main.rs"

[dependencies]
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
serde = { version = "1.0.200", default-features = false, features = ["derive"] }
derive_more = { version = "2.0.1", features = ["full"] }
clap = { version = "4.0", features = ["derive", "env"] }
hex = "0.4.3"
derive_more = { version = "2.0.1", features = ["full"] }
dotenv = "0.15.0"
hex = "0.4.3"
methods = { path = "../methods" }
risc0-zkvm = { version = "2.0.1" }
serde = { version = "1.0.200", default-features = false, features = ["derive"] }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
tracing = { workspace = true }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

Expand Down
17 changes: 15 additions & 2 deletions host/src/bin/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use clap::Parser;
use risc0_zkvm::{default_prover, ExecutorEnv};
use risc0_zkvm::{default_prover, ExecutorEnv, ProverOpts};
use tracing::{error, info};

use ream_consensus::deneb::beacon_state::BeaconState as ReamBeaconState;
Expand Down Expand Up @@ -122,15 +122,28 @@ fn main() {

// Execute the program
let prover = default_prover();
let opts = ProverOpts::succinct();

// Proof information by proving the specified ELF binary.
// This struct contains the receipt along with statistics about execution of the guest
let prove_info = prover.prove(env, CONSENSUS_STF_ELF).unwrap();
let prove_info = prover
.prove_with_opts(env, CONSENSUS_STF_ELF, &opts)
.unwrap();

info!("Proving complete");

// Extract the receipt.
let receipt = prove_info.receipt;

info!("Seal size: {:#?}", receipt.seal_size());
info!("Receipt: {:#?}", receipt);
info!(
"New state root: {:?}",
receipt.journal.decode::<tree_hash::Hash256>().unwrap()
);

receipt.verify(CONSENSUS_STF_ID).unwrap();
info!("Verfication complete");

info!("----- Cycle Tracker End -----");

Expand Down
2 changes: 1 addition & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ edition = "2021"

[dependencies]
ethereum_ssz = { workspace = true }
serde = { version = "1.0.200", default-features = false, features = ["derive"] }
snap = "1.1.1"
tracing = { workspace = true }
serde = { version = "1.0.200", default-features = false, features = ["derive"] }

# ReamBeaconState
alloy-primitives = { version = "0.8", features = ['serde'] }
Expand Down
2 changes: 1 addition & 1 deletion methods/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "methods"
version = "0.1.0"
edition = "2024"
version = "0.1.0"

[build-dependencies]
risc0-build = { version = "2.0.1" }
Expand Down
Loading