Skip to content

Commit dacc3d0

Browse files
committed
chore: update zkaleido to rc23 and strata-common to rc14
1 parent f26ff90 commit dacc3d0

File tree

14 files changed

+186
-189
lines changed

14 files changed

+186
-189
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -87,33 +87,33 @@ strata-test-utils-btc = { path = "crates/test-utils/btc" }
8787
strata-test-utils-btcio = { path = "crates/test-utils/btcio" }
8888
strata-test-utils-checkpoint = { path = "crates/test-utils/checkpoint" }
8989

90-
strata-ssz-tests = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc13" }
90+
strata-ssz-tests = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc14" }
9191

9292
# Dependencies from alpenlabs/strata-bridge pinned to commit fc966d5 (STR-2598-asm-stf-proof-statements @ 2026-03-17)
9393
btc-tracker = { git = "https://github.com/alpenlabs/strata-bridge.git", rev = "fc966d5f81c773de10a4ef3a66666687ec11d715" }
9494
strata-bridge-common = { git = "https://github.com/alpenlabs/strata-bridge.git", rev = "fc966d5f81c773de10a4ef3a66666687ec11d715" }
9595

96-
# Dependencies from alpenlabs/moho (dc8e6b5 = strata-common rc13)
97-
moho-recursive-proof = { git = "https://github.com/alpenlabs/moho", rev = "dc8e6b536852ee38aa4280cfda8e7cd009b37eab" }
98-
moho-runtime-impl = { git = "https://github.com/alpenlabs/moho", rev = "dc8e6b536852ee38aa4280cfda8e7cd009b37eab" }
99-
moho-runtime-interface = { git = "https://github.com/alpenlabs/moho", rev = "dc8e6b536852ee38aa4280cfda8e7cd009b37eab" }
100-
moho-types = { git = "https://github.com/alpenlabs/moho", rev = "dc8e6b536852ee38aa4280cfda8e7cd009b37eab" }
96+
# Dependencies from alpenlabs/moho (dc8e6b5 = strata-common rc14)
97+
moho-recursive-proof = { git = "https://github.com/alpenlabs/moho", rev = "28ef75cf39758c4214cb383a4de2b2dcf0a3dd67" }
98+
moho-runtime-impl = { git = "https://github.com/alpenlabs/moho", rev = "28ef75cf39758c4214cb383a4de2b2dcf0a3dd67" }
99+
moho-runtime-interface = { git = "https://github.com/alpenlabs/moho", rev = "28ef75cf39758c4214cb383a4de2b2dcf0a3dd67" }
100+
moho-types = { git = "https://github.com/alpenlabs/moho", rev = "28ef75cf39758c4214cb383a4de2b2dcf0a3dd67" }
101101

102-
# Dependencies from alpenlabs/strata-common - current version := rc13
103-
strata-btc-types = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc13" }
102+
# Dependencies from alpenlabs/strata-common - current version := rc14
103+
strata-btc-types = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc14" }
104104
strata-codec = { git = "https://github.com/alpenlabs/strata-common", features = [
105105
"derive",
106-
], tag = "v0.1.0-alpha-rc13" }
107-
strata-codec-utils = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc13" }
108-
strata-crypto = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc13" }
109-
strata-identifiers = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc13" }
110-
strata-l1-envelope-fmt = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc13" }
111-
strata-l1-txfmt = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc13" }
112-
strata-merkle = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc13" }
113-
strata-msg-fmt = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc13" }
114-
strata-predicate = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc13" }
115-
strata-service = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc13" }
116-
strata-tasks = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc13" }
106+
], tag = "v0.1.0-alpha-rc14" }
107+
strata-codec-utils = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc14" }
108+
strata-crypto = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc14" }
109+
strata-identifiers = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc14" }
110+
strata-l1-envelope-fmt = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc14" }
111+
strata-l1-txfmt = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc14" }
112+
strata-merkle = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc14" }
113+
strata-msg-fmt = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc14" }
114+
strata-predicate = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc14" }
115+
strata-service = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc14" }
116+
strata-tasks = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc14" }
117117

118118
# dependencies from alpenlabs/ssz-gen
119119
ssz = { git = "https://github.com/alpenlabs/ssz-gen", tag = "v0.14.0" }
@@ -125,15 +125,15 @@ tree_hash = { git = "https://github.com/alpenlabs/ssz-gen", tag = "v0.14.0" }
125125
tree_hash_derive = { git = "https://github.com/alpenlabs/ssz-gen", tag = "v0.14.0" }
126126

127127
# dependencies from alpenlabs/zkaleido
128-
zkaleido = { git = "https://github.com/alpenlabs/zkaleido", tag = "v0.1.0-alpha-rc22", features = [
128+
zkaleido = { git = "https://github.com/alpenlabs/zkaleido", tag = "v0.1.0-alpha-rc23", features = [
129129
"borsh",
130130
"remote-prover",
131131
"serde",
132132
] }
133-
zkaleido-native-adapter = { git = "https://github.com/alpenlabs/zkaleido", tag = "v0.1.0-alpha-rc22", features = [
133+
zkaleido-native-adapter = { git = "https://github.com/alpenlabs/zkaleido", tag = "v0.1.0-alpha-rc23", features = [
134134
"remote-prover",
135135
] }
136-
zkaleido-sp1-host = { git = "https://github.com/alpenlabs/zkaleido", tag = "v0.1.0-alpha-rc22" }
136+
zkaleido-sp1-host = { git = "https://github.com/alpenlabs/zkaleido", tag = "v0.1.0-alpha-rc23" }
137137

138138
# external dependencies
139139
anyhow = "1.0.86"

bin/prover-perf/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ sp1-sdk = "5.2.1"
3838
sp1-verifier = "5.2.1"
3939
ssz.workspace = true
4040
zkaleido = { workspace = true, features = ["perf"] }
41-
zkaleido-sp1-groth16-verifier = { git = "https://github.com/alpenlabs/zkaleido", tag = "v0.1.0-alpha-rc22" }
42-
zkaleido-sp1-host = { git = "https://github.com/alpenlabs/zkaleido", tag = "v0.1.0-alpha-rc22", features = [
41+
zkaleido-sp1-groth16-verifier = { git = "https://github.com/alpenlabs/zkaleido", tag = "v0.1.0-alpha-rc23" }
42+
zkaleido-sp1-host = { git = "https://github.com/alpenlabs/zkaleido", tag = "v0.1.0-alpha-rc23", features = [
4343
"perf",
4444
] }

crates/common/src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use ssz::DecodeError;
33
pub use strata_asm_manifest_types::{AsmManifestError, AsmManifestResult, Mismatched};
44
use strata_btc_verification::{L1BodyError, L1VerificationError};
55
use strata_l1_txfmt::SubprotocolId;
6-
use strata_merkle::error::MerkleError;
6+
use strata_merkle::MerkleError;
77
use thiserror::Error;
88

99
use crate::aux::AuxError;

crates/common/src/mmr.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
//! History accumulator for ASM.
22
33
use strata_asm_manifest_types::{AsmManifest, Hash32};
4-
use strata_merkle::{CompactMmr64, Mmr, Mmr64B32, Sha256Hasher, error::MerkleError};
4+
use strata_merkle::{MerkleError, Mmr, Mmr64B32, MmrState, Sha256Hasher};
55

66
use crate::AsmHistoryAccumulatorState;
77

8-
/// Capacity of the ASM MMR as a power of 2.
9-
///
10-
/// With a value of 64, the MMR supports up to 2^64 leaves
11-
const ASM_MMR_CAP_LOG2: u8 = 64;
12-
138
/// The hasher used for ASM manifest MMR operations.
149
///
1510
/// Uses SHA-256 with full 32-byte hash output.
@@ -23,7 +18,7 @@ impl AsmHistoryAccumulatorState {
2318
/// The internal `offset` is set to `genesis_height + 1` since manifests
2419
/// start from the first block after genesis.
2520
pub fn new(genesis_height: u64) -> Self {
26-
let manifest_mmr = Mmr64B32::from_generic(&CompactMmr64::<Hash32>::new(ASM_MMR_CAP_LOG2));
21+
let manifest_mmr = Mmr64B32::new_empty();
2722
Self {
2823
manifest_mmr,
2924
offset: genesis_height + 1,

crates/storage/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ strata-asm-worker.workspace = true
1212
strata-identifiers.workspace = true
1313
strata-merkle = { workspace = true, features = ["ssz"] }
1414

15-
1615
anyhow.workspace = true
1716
borsh.workspace = true
1817
sled.workspace = true
18+
ssz.workspace = true
1919

2020
[dev-dependencies]
2121
tempfile.workspace = true

crates/storage/src/mmr.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
//! Sled-backed Merkle Mountain Range for manifest hashes.
22
33
use anyhow::{Context, Result};
4+
use ssz::{Decode, Encode};
45
use strata_identifiers::Buf32;
5-
use strata_merkle::{CompactMmr64, MerkleProofB32, Mmr, Sha256Hasher};
6+
use strata_merkle::{MerkleProofB32, Mmr, Mmr64B32, MmrState, Sha256Hasher};
67

78
/// Sled-backed MMR for manifest hashes.
89
///
@@ -81,7 +82,7 @@ impl MmrDb {
8182
/// Rebuilds the MMR from stored leaves up to `at_leaf_count`, then
8283
/// extracts the proof for the given index.
8384
pub fn generate_proof(&self, index: u64, at_leaf_count: u64) -> Result<MerkleProofB32> {
84-
let mut compact = CompactMmr64::new(64);
85+
let mut compact = Mmr64B32::new_empty();
8586
let mut proof_list = Vec::with_capacity(at_leaf_count as usize);
8687

8788
for i in 0..at_leaf_count {
@@ -105,15 +106,16 @@ impl MmrDb {
105106
.context(format!("no proof for index {index}"))
106107
}
107108

108-
fn load_compact_mmr(&self) -> Result<CompactMmr64<[u8; 32]>> {
109+
fn load_compact_mmr(&self) -> Result<Mmr64B32> {
109110
match self.meta.get(MMR_STATE_KEY)? {
110-
Some(bytes) => borsh::from_slice(&bytes).context("failed to deserialize compact MMR"),
111-
None => Ok(CompactMmr64::new(64)),
111+
Some(bytes) => Mmr64B32::from_ssz_bytes(bytes.as_ref())
112+
.context("failed to deserialize compact MMR"),
113+
None => Ok(Mmr64B32::new_empty()),
112114
}
113115
}
114116

115-
fn save_compact_mmr(&self, mmr: &CompactMmr64<[u8; 32]>) -> Result<()> {
116-
let bytes = borsh::to_vec(mmr)?;
117+
fn save_compact_mmr(&self, mmr: &Mmr64B32) -> Result<()> {
118+
let bytes = mmr.as_ssz_bytes();
117119
self.meta.insert(MMR_STATE_KEY, bytes)?;
118120
Ok(())
119121
}
@@ -122,7 +124,6 @@ impl MmrDb {
122124
#[cfg(test)]
123125
mod tests {
124126
use strata_identifiers::Buf32;
125-
use strata_merkle::Mmr64B32;
126127

127128
use super::*;
128129

@@ -189,7 +190,7 @@ mod tests {
189190
mmr_db.append_leaf(leaf).unwrap();
190191

191192
let proof = mmr_db.generate_proof(0, 1).unwrap();
192-
let compact = Mmr64B32::from_generic(&mmr_db.load_compact_mmr().unwrap());
193+
let compact = mmr_db.load_compact_mmr().unwrap();
193194
assert!(compact.verify(&proof, &leaf.0));
194195
}
195196

@@ -219,7 +220,7 @@ mod tests {
219220
for i in 0u8..4 {
220221
mmr_db.append_leaf(make_leaf(i)).unwrap();
221222
}
222-
let compact_at_4 = Mmr64B32::from_generic(&mmr_db.load_compact_mmr().unwrap());
223+
let compact_at_4 = mmr_db.load_compact_mmr().unwrap();
223224

224225
// Append 4 more.
225226
for i in 4u8..8 {

crates/test-utils/checkpoint/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ strata-asm-txs-checkpoint.workspace = true
1313
strata-checkpoint-types-ssz.workspace = true
1414
strata-crypto.workspace = true
1515
strata-identifiers.workspace = true
16-
strata-merkle.workspace = true
16+
strata-merkle = { workspace = true, features = ["ssz"] }
1717
strata-predicate.workspace = true
1818
strata-test-utils-arb.workspace = true
1919
strata-test-utils-btc.workspace = true

crates/test-utils/checkpoint/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use strata_checkpoint_types_ssz::{
1717
};
1818
use strata_crypto::hash;
1919
use strata_identifiers::{OLBlockCommitment, OLBlockId};
20-
use strata_merkle::{CompactMmr64, Mmr, Sha256Hasher};
20+
use strata_merkle::{Mmr, Mmr64B32, MmrState, Sha256Hasher};
2121
use strata_predicate::{PredicateKey, PredicateTypeId};
2222
use strata_test_utils_arb::ArbitraryGenerator;
2323
use strata_test_utils_btc as _;
@@ -180,7 +180,7 @@ impl CheckpointTestHarness {
180180
let leaves = self.gen_manifest_leaves(new_tip);
181181
let mut proof_list = Vec::new();
182182

183-
let mut manifest_mmr = CompactMmr64::new(64);
183+
let mut manifest_mmr = Mmr64B32::new_empty();
184184
let mut asm_accumulator_state =
185185
AsmHistoryAccumulatorState::new(self.genesis_l1_height as u64);
186186

0 commit comments

Comments
 (0)