Skip to content

Commit 5ee6eea

Browse files
committed
fuck rebases
1 parent 16eb810 commit 5ee6eea

File tree

4 files changed

+118
-82
lines changed

4 files changed

+118
-82
lines changed

Cargo.lock

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

crates/proof/statements/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ strata-asm-params = { workspace = true, optional = true }
1818
strata-asm-spec.workspace = true
1919
strata-asm-stf.workspace = true
2020
strata-btc-types = { workspace = true, optional = true }
21-
strata-btc-verification = { workspace = true, optional = true }
2221
strata-identifiers.workspace = true
2322
strata-l1-txfmt = { workspace = true, optional = true }
2423
strata-predicate.workspace = true
@@ -37,7 +36,6 @@ test-utils = [
3736
"dep:serde_json",
3837
"dep:strata-asm-params",
3938
"dep:strata-btc-types",
40-
"dep:strata-btc-verification",
4139
"dep:strata-l1-txfmt",
4240
"dep:strata-test-utils-btc",
4341
]

crates/proof/statements/src/test_utils.rs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ use bitcoin::Block;
77
use moho_runtime_impl::RuntimeInput;
88
use moho_runtime_interface::MohoProgram;
99
use moho_types::{ExportState, MohoState};
10-
use strata_asm_common::{AnchorState, AsmHistoryAccumulatorState, AuxData, ChainViewState};
10+
use ssz::Encode;
11+
use strata_asm_common::{
12+
AnchorState, AsmHistoryAccumulatorState, AuxData, ChainViewState, HeaderVerificationState,
13+
};
1114
use strata_asm_params::{AsmParams, SubprotocolInstance};
1215
use strata_asm_spec::StrataAsmSpec;
1316
use strata_btc_types::{BlockHashExt, GenesisL1View};
14-
use strata_btc_verification::HeaderVerificationState;
1517
use strata_identifiers::L1BlockCommitment;
1618
use strata_l1_txfmt::MagicBytes;
1719
use strata_predicate::PredicateKey;
@@ -31,10 +33,7 @@ const SUBPROTOCOLS_JSON: &str = r#"[
3133
/// Creates a single-step input from a fixed test Bitcoin block.
3234
pub fn create_asm_step_input() -> AsmStepInput {
3335
let block = BtcChainSegment::load_full_block();
34-
AsmStepInput {
35-
block: L1Block(block),
36-
aux_data: AuxData::default(),
37-
}
36+
AsmStepInput::new(L1Block(block), AuxData::default())
3837
}
3938

4039
/// Builds a genesis L1 view whose tip is the parent of `block`.
@@ -65,7 +64,7 @@ pub fn create_genesis_anchor_state(block: &Block) -> AnchorState {
6564

6665
AnchorState {
6766
chain_view,
68-
sections: Vec::new(),
67+
sections: Vec::new().into(),
6968
}
7069
}
7170

@@ -97,19 +96,21 @@ pub fn create_moho_prestate(block: &Block) -> MohoState {
9796

9897
/// Creates a runtime input for a single ASM STF step.
9998
pub fn create_runtime_input(step_input: &AsmStepInput) -> RuntimeInput {
100-
let inner_pre_state = create_genesis_anchor_state(&step_input.block.0);
101-
let moho_pre_state = create_moho_prestate(&step_input.block.0);
99+
let block = step_input.block();
100+
let inner_pre_state = create_genesis_anchor_state(&block.0);
101+
let moho_pre_state = create_moho_prestate(&block.0);
102102
RuntimeInput::new(
103103
moho_pre_state,
104-
borsh::to_vec(&inner_pre_state).expect("borsh encode inner state"),
105-
borsh::to_vec(step_input).expect("borsh encode step input"),
104+
inner_pre_state.as_ssz_bytes(),
105+
step_input.as_ssz_bytes(),
106106
)
107107
}
108108

109109
/// Creates a matching `(RuntimeInput, StrataAsmSpec)` test pair.
110110
pub fn create_runtime_input_and_spec() -> (RuntimeInput, StrataAsmSpec) {
111111
let step_input = create_asm_step_input();
112-
let l1view = create_genesis_l1_view_to_process_block(&step_input.block.0);
112+
let block = step_input.block();
113+
let l1view = create_genesis_l1_view_to_process_block(&block.0);
113114
let spec = create_asm_spec(l1view);
114115
let runtime_input = create_runtime_input(&step_input);
115116
(runtime_input, spec)

0 commit comments

Comments
 (0)