Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
43 changes: 22 additions & 21 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ authors = ["0xSasaPrsic"]
sp1-helios-primitives = { path = "primitives" }

# helios
helios = { git = "https://github.com/a16z/helios", version = "0.9.3" }
helios-consensus-core = { git = "https://github.com/a16z/helios", version = "0.9.3" }
helios-ethereum = { git = "https://github.com/a16z/helios", version = "0.9.3" }
helios = { git = "https://github.com/a16z/helios", version = "0.10.2" }
helios-consensus-core = { git = "https://github.com/a16z/helios", version = "0.10.2" }
helios-ethereum = { git = "https://github.com/a16z/helios", version = "0.10.2" }

# general
dotenv = "0.15.0"
Expand Down
Binary file modified elf/sp1-helios-elf
Binary file not shown.
7 changes: 7 additions & 0 deletions script/bin/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ pub async fn main() -> Result<()> {
.beacon()
.tree_hash_root();
let head = helios_client.store.finalized_header.clone().beacon().slot;

// prevents genesis to have a slot that is not checkpoint.
assert!(
head.is_multiple_of(32),
"Head is not a checkpoint slot, please deploy again."
);

let sync_committee_hash = helios_client
.store
.current_sync_committee
Expand Down
2 changes: 1 addition & 1 deletion script/bin/operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ mod tests {
let (_pk, vk) = client.setup(ELF);

assert_eq!(
"0x00e4a67e24bd5c04e4a9f8fc80512128f86a8c6a92ce7ff713a57025f6e2e87b",
"0x0075d6f4f88a23c736b22799f725b7fe45cd25d4ddb6933c328bf8608f3a5e22",
vk.bytes32()
);
}
Expand Down
12 changes: 3 additions & 9 deletions script/bin/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use anyhow::Result;
use clap::Parser;
use helios_ethereum::rpc::ConsensusRpc;
use sp1_helios_primitives::types::ProofInputs;
use sp1_helios_script::{get_checkpoint, get_client, get_latest_checkpoint, get_updates};
use sp1_helios_script::{get_checkpoint, get_client, get_updates};
use sp1_sdk::{utils::setup_logger, ProverClient, SP1Stdin};

#[derive(Parser, Debug, Clone)]
Expand All @@ -18,15 +18,9 @@ const ELF: &[u8] = include_bytes!("../../elf/sp1-helios-elf");
async fn main() -> Result<()> {
dotenv::dotenv().ok();
setup_logger();
let args = GenesisArgs::parse();

let slot = 8985920;
// Get the current slot from the contract or fetch the latest checkpoint
let checkpoint = if let Some(slot) = args.slot {
get_checkpoint(slot).await
} else {
// test slot
get_latest_checkpoint().await
};
let checkpoint = get_checkpoint(slot).await;

// Setup client.
let helios_client = get_client(checkpoint).await;
Expand Down
Loading