Skip to content

Commit b156f48

Browse files
authored
Reapply "fix: use the correct l2_chain_id (succinctlabs#782)" (#107)
* Reapply "fix: use the correct l2_chain_id (succinctlabs#782)" This reverts commit 18c6583. The next commits should resolve the problems that made it necessary to skip that commit. * Use celo-org/hokulea with custom BootInfo parameter See celo-org/hokulea#1 * Pass CeloBootInfo to hokulea so that hokulea does not have to rely on kona-registry. * Update ELF files * Update hokulea to avoid using a fork Layr-Labs/hokulea@bf561cc is merged in upstream and provides what we need, so we can stop depending on our own hokulea fork. * Update ELF files
1 parent 4595cb5 commit b156f48

File tree

9 files changed

+432
-251
lines changed

9 files changed

+432
-251
lines changed

Cargo.lock

Lines changed: 411 additions & 238 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@ hana-host = { git = "https://github.com/celestiaorg/hana", tag = "1.5.0-mocha" }
116116
hana-oracle = { git = "https://github.com/celestiaorg/hana", tag = "1.5.0-mocha" }
117117

118118
# hokulea
119-
hokulea-compute-proof = { git = "https://github.com/Layr-Labs/hokulea", tag = "hokulea-client/v1.1.4" }
120-
hokulea-eigenda = { git = "https://github.com/Layr-Labs/hokulea", tag = "hokulea-client/v1.1.4" }
121-
hokulea-host-bin = { git = "https://github.com/Layr-Labs/hokulea", tag = "hokulea-client/v1.1.4" }
122-
hokulea-proof = { git = "https://github.com/Layr-Labs/hokulea", tag = "hokulea-client/v1.1.4" }
123-
hokulea-witgen = { git = "https://github.com/Layr-Labs/hokulea", tag = "hokulea-client/v1.1.4" }
124-
hokulea-zkvm-verification = { git = "https://github.com/Layr-Labs/hokulea", tag = "hokulea-client/v1.1.4" }
125-
canoe-sp1-cc-host = { git = "https://github.com/Layr-Labs/hokulea", tag = "hokulea-client/v1.1.4" }
126-
canoe-sp1-cc-verifier = { git = "https://github.com/Layr-Labs/hokulea", tag = "hokulea-client/v1.1.4" }
127-
canoe-verifier-address-fetcher = { git = "https://github.com/Layr-Labs/hokulea", tag = "hokulea-client/v1.1.4" }
119+
hokulea-compute-proof = { git = "https://github.com/Layr-Labs/hokulea", rev = "bf561cc" }
120+
hokulea-eigenda = { git = "https://github.com/Layr-Labs/hokulea", rev = "bf561cc" }
121+
hokulea-host-bin = { git = "https://github.com/Layr-Labs/hokulea", rev = "bf561cc" }
122+
hokulea-proof = { git = "https://github.com/Layr-Labs/hokulea", rev = "bf561cc" }
123+
hokulea-witgen = { git = "https://github.com/Layr-Labs/hokulea", rev = "bf561cc" }
124+
hokulea-zkvm-verification = { git = "https://github.com/Layr-Labs/hokulea", rev = "bf561cc" }
125+
canoe-sp1-cc-host = { git = "https://github.com/Layr-Labs/hokulea", rev = "bf561cc" }
126+
canoe-sp1-cc-verifier = { git = "https://github.com/Layr-Labs/hokulea", rev = "bf561cc" }
127+
canoe-verifier-address-fetcher = { git = "https://github.com/Layr-Labs/hokulea", rev = "bf561cc" }
128128

129129
# op-succinct
130130
op-succinct-prove = { path = "scripts/prove" }

elf/aggregation-elf

-108 Bytes
Binary file not shown.

elf/eigenda-range-elf-embedded

-19.6 KB
Binary file not shown.

elf/range-elf-bump

-524 Bytes
Binary file not shown.

elf/range-elf-embedded

-916 Bytes
Binary file not shown.

programs/range/eigenda/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ serde_cbor.workspace = true
1515
# kona
1616
kona-proof.workspace = true
1717

18+
# celo-kona
19+
celo-proof.workspace = true
20+
1821
# hokulea
1922
hokulea-proof.workspace = true
2023
hokulea-zkvm-verification.workspace = true

programs/range/eigenda/src/main.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ sp1_zkvm::entrypoint!(main);
1111

1212
use canoe_sp1_cc_verifier::CanoeSp1CCVerifier;
1313
use canoe_verifier_address_fetcher::CanoeVerifierAddressFetcherDeployedByEigenLabs;
14+
use celo_proof::CeloBootInfo;
1415
use hokulea_proof::eigenda_witness::EigenDAWitness;
1516
use hokulea_zkvm_verification::eigenda_witness_to_preloaded_provider;
1617
use op_succinct_client_utils::witness::{EigenDAWitnessData, WitnessData};
@@ -35,12 +36,17 @@ fn main() {
3536
.await
3637
.expect("Failed to load oracle and blob provider");
3738

39+
// Load boot info using CeloBootInfo which uses celo_registry (has Celo chain configs)
40+
let celo_boot =
41+
CeloBootInfo::load(oracle.as_ref()).await.expect("Failed to load boot info");
42+
3843
let eigenda_witness: EigenDAWitness = serde_cbor::from_slice(
3944
&witness_data.eigenda_data.clone().expect("eigenda witness data is not present"),
4045
)
4146
.expect("cannot deserialize eigenda witness");
4247
let preloaded_preimage_provider = eigenda_witness_to_preloaded_provider(
4348
oracle.clone(),
49+
&celo_boot.op_boot_info,
4450
CanoeSp1CCVerifier {},
4551
CanoeVerifierAddressFetcherDeployedByEigenLabs {},
4652
eigenda_witness,

utils/host/src/fetcher.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -678,10 +678,9 @@ impl OPSuccinctDataFetcher {
678678
l2_end_block: u64,
679679
l1_head_hash: B256,
680680
) -> Result<SingleChainHost> {
681-
// If the rollup config is not already loaded, fetch and save it.
682-
if self.rollup_config.is_none() {
681+
let Some(rollup_config) = &self.rollup_config else {
683682
return Err(anyhow::anyhow!("Rollup config not loaded."));
684-
}
683+
};
685684

686685
if l2_start_block >= l2_end_block {
687686
return Err(anyhow::anyhow!(
@@ -744,7 +743,7 @@ impl OPSuccinctDataFetcher {
744743
agreed_l2_head_hash,
745744
claimed_l2_output_root,
746745
claimed_l2_block_number: l2_end_block,
747-
l2_chain_id: None,
746+
l2_chain_id: Some(rollup_config.l2_chain_id.id()),
748747
// Trim the trailing slash to avoid double slashes in the URL.
749748
l2_node_address: Some(
750749
self.rpc_config.l2_rpc.as_str().trim_end_matches('/').to_string(),

0 commit comments

Comments
 (0)