Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
33513b4
feat: add magic information to ASM state
prajwolrg Apr 1, 2026
77e7c4d
feat: use state magic bytes in STF
prajwolrg Apr 1, 2026
c207512
feat: add genesis information in the spec
prajwolrg Apr 1, 2026
083cea7
refactor: replace Loader trait with LoaderStage
prajwolrg Apr 1, 2026
3893bad
fix(worker): initialize genesis properly
prajwolrg Apr 1, 2026
0dcccb5
refactor(strata-asm-spec): restructure into spec and genesis
prajwolrg Apr 1, 2026
ca74753
refactor(asm-params): introduce L1Anchor as alternative to GenesisL1View
prajwolrg Apr 1, 2026
59e2c97
refactor(asm-params): use L1Anchor instead of GenesisL1View
prajwolrg Apr 1, 2026
ebca1ef
refactor(btc-verification): replace GenesisL1View with L1Anchor in He…
prajwolrg Apr 1, 2026
2ae2154
fix func tests
prajwolrg Apr 1, 2026
bef6783
refactor(proof-statements): use construct_genesis_state and derive ne…
prajwolrg Apr 1, 2026
84ff110
refactor(asm-spec): decouple strata-asm-spec from strata-asm-params
prajwolrg Apr 1, 2026
87a5779
refactor: remove irrelevant hash computation
prajwolrg Apr 2, 2026
688d73c
test(header-verification): use the new method for tests
prajwolrg Apr 2, 2026
05523b2
refactor(header-vs): reorder the checks so that the complex checks ha…
prajwolrg Apr 2, 2026
6372ad2
refactor(proof-statements): inline StrataAsmSpec instead of passing i…
prajwolrg Apr 2, 2026
053de1f
refactor(asm-worker): simplify builder
prajwolrg Apr 2, 2026
e40a146
feat: add SP1 proof generation
prajwolrg Apr 1, 2026
b86618d
test(functional-tests): support SP1 proof generation and increase pro…
prajwolrg Apr 2, 2026
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
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ jobs:
- name: Check docs leaving the dependencies out
env:
RUSTDOCFLAGS: -A rustdoc::private-doc-tests -D warnings
SP1_SKIP_PROGRAM_BUILD: true
run: cargo doc --no-deps
18 changes: 10 additions & 8 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ zkaleido = { git = "https://github.com/alpenlabs/zkaleido", tag = "v0.1.0-alpha-
zkaleido-native-adapter = { git = "https://github.com/alpenlabs/zkaleido", tag = "v0.1.0-alpha-rc22", features = [
"remote-prover",
] }
zkaleido-sp1-host = { git = "https://github.com/alpenlabs/zkaleido", tag = "v0.1.0-alpha-rc22" }

# external dependencies
anyhow = "1.0.86"
Expand Down
8 changes: 7 additions & 1 deletion bin/asm-runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ strata-asm-proof-db.workspace = true
strata-asm-proof-impl.workspace = true
strata-asm-proof-types.workspace = true
strata-asm-proto-bridge-v1.workspace = true
strata-asm-spec.workspace = true
strata-asm-txs-bridge-v1.workspace = true
strata-asm-worker.workspace = true
strata-btc-types.workspace = true
Expand All @@ -43,8 +42,15 @@ jsonrpsee = { workspace = true, features = ["server", "macros"] }
serde.workspace = true
serde_json.workspace = true
ssz.workspace = true
strata-asm-sp1-guest-builder = { path = "../../guest-builder/sp1", optional = true }
threadpool = "1.8"
tokio.workspace = true
toml.workspace = true
tracing.workspace = true
zkaleido.workspace = true
zkaleido-sp1-host = { workspace = true, optional = true, features = [
"remote-prover",
] }

[features]
sp1 = ["dep:zkaleido-sp1-host", "dep:strata-asm-sp1-guest-builder"]
24 changes: 18 additions & 6 deletions bin/asm-runner/src/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ use anyhow::Result;
use bitcoind_async_client::{Auth, Client};
use strata_asm_params::AsmParams;
use strata_asm_proof_db::SledProofDb;
use strata_asm_proof_impl::program::AsmStfProofProgram;
use strata_asm_spec::StrataAsmSpec;
use strata_asm_worker::AsmWorkerBuilder;
use strata_tasks::TaskExecutor;
use tokio::{
Expand Down Expand Up @@ -51,7 +49,7 @@ pub(crate) async fn bootstrap(
// 5. Set up BtcTracker to drive ASM
let start_height = match asm_worker.monitor().get_current().cur_block {
Some(blk) => blk.height(),
None => params.l1_view.height() + 1,
None => params.anchor.block.height() + 1,
};
let btc_tracker = Arc::new(
setup_btc_tracker(&config.bitcoin, bitcoin_client.clone(), start_height as u64).await?,
Expand All @@ -65,12 +63,26 @@ pub(crate) async fn bootstrap(
let proof_db = SledProofDb::open(&orch_config.proof_db_path)?;
let proof_db_clone = proof_db.clone();

let spec = StrataAsmSpec::from_asm_params(&params);
let native_host = AsmStfProofProgram::native_host(spec);
#[cfg(feature = "sp1")]
let host = {
use std::fs;

use strata_asm_sp1_guest_builder::ASM_ELF_PATH;
use zkaleido_sp1_host::SP1Host;
let elf = fs::read(ASM_ELF_PATH)
.unwrap_or_else(|err| panic!("failed to read guest elf at {ASM_ELF_PATH}: {err}"));
SP1Host::init(&elf)
};

#[cfg(not(feature = "sp1"))]
let host = {
use strata_asm_proof_impl::program::AsmStfProofProgram;
AsmStfProofProgram::native_host()
};

let input_builder = InputBuilder::new(asm_manager.clone(), bitcoin_client.clone());
let mut orchestrator =
ProofOrchestrator::new(proof_db, native_host, orch_config, input_builder, rx);
ProofOrchestrator::new(proof_db, host, orch_config, input_builder, rx);

// ZkVmRemoteProver is !Send (#[async_trait(?Send)]), so the orchestrator
// future cannot be spawned on a multi-threaded runtime directly. We run it
Expand Down
6 changes: 2 additions & 4 deletions bin/prover-perf/src/programs/asm_stf.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
use std::fs;

use strata_asm_proof_impl::{
program::AsmStfProofProgram, test_utils::create_runtime_input_and_spec,
};
use strata_asm_proof_impl::{program::AsmStfProofProgram, test_utils::create_runtime_input};
use strata_asm_sp1_guest_builder::ASM_ELF_PATH;
use zkaleido::{PerformanceReport, ZkVmProgramPerf};
use zkaleido_sp1_host::SP1Host;

pub(crate) fn gen_perf_report() -> PerformanceReport {
let (input, _spec) = create_runtime_input_and_spec();
let input = create_runtime_input();
let elf = fs::read(ASM_ELF_PATH)
.unwrap_or_else(|err| panic!("failed to read guest elf at {ASM_ELF_PATH}: {err}"));
let host = SP1Host::init(&elf);
Expand Down
Loading
Loading