Skip to content

Commit 947ace2

Browse files
authored
chore: remove local ASM crates (#1642)
* everything compiles with asm deps using cargo check --workspace * chore: remove unused files * refactor: rename existing bridge types crate to strata-ol-bridge-types and consolidate existing types from asm * chore: remove asm-logs crate * purge local checkpoint-types-ssz * fix lints * style: put asm deps together
1 parent 5a60f65 commit 947ace2

260 files changed

Lines changed: 1059 additions & 19435 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

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

Cargo.toml

Lines changed: 23 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,16 @@ members = [
1616
"crates/alpen-ee/rpc/server",
1717
"crates/alpen-ee/rpc/types",
1818
"crates/alpen-ee/sequencer",
19-
"crates/asm/common",
20-
"crates/asm/logs",
21-
"crates/asm/params",
22-
"crates/asm/msgs/bridge",
23-
"crates/asm/msgs/checkpoint",
24-
"crates/asm/stf",
25-
"crates/asm/manifest-types",
2619
"crates/asm/spec",
2720
"crates/asm/spec-debug",
28-
"crates/asm/subprotocols/bridge-v1",
29-
"crates/asm/subprotocols/debug-v1",
30-
"crates/asm/subprotocols/admin",
31-
"crates/asm/txs/admin",
3221
"crates/asm/txs/checkpoint-v0",
33-
"crates/asm/txs/checkpoint",
3422
"crates/asm/subprotocols/checkpoint-v0",
35-
"crates/asm/subprotocols/checkpoint",
36-
"crates/asm/txs/test-utils",
37-
"crates/asm/txs/bridge-v1",
38-
"crates/asm/worker",
39-
"crates/btc-verification",
4023
"crates/btcio",
4124
"crates/chainexec",
4225
"crates/chaintsn",
4326
"crates/chain-worker",
4427
"crates/chain-worker-new",
4528
"crates/checkpoint-types",
46-
"crates/checkpoint-types-ssz",
4729
"crates/cli-common",
4830
"crates/codec-utils",
4931
"crates/common",
@@ -112,7 +94,6 @@ members = [
11294
"crates/storage",
11395
"crates/storage-common",
11496
"crates/sync",
115-
"crates/test-utils/btc",
11697
"crates/test-utils/btcio",
11798
"crates/test-utils/evm-ee",
11899
"crates/test-utils/l2",
@@ -188,35 +169,16 @@ alpen-reth-rpc = { path = "crates/reth/rpc" }
188169
alpen-reth-statediff = { path = "crates/reth/statediff" }
189170
alpen-reth-witness = { path = "crates/reth/witness" }
190171
strata-acct-types = { path = "crates/acct-types" }
191-
strata-asm-bridge-msgs = { path = "crates/asm/msgs/bridge" }
192-
strata-asm-checkpoint-msgs = { path = "crates/asm/msgs/checkpoint" }
193-
strata-asm-common = { path = "crates/asm/common" }
194-
strata-asm-logs = { path = "crates/asm/logs" }
195-
strata-asm-manifest-types = { path = "crates/asm/manifest-types" }
196-
strata-asm-params = { path = "crates/asm/params" }
197-
strata-asm-proto-administration = { path = "crates/asm/subprotocols/admin" }
198-
strata-asm-proto-bridge-v1 = { path = "crates/asm/subprotocols/bridge-v1" }
199-
strata-asm-proto-checkpoint = { path = "crates/asm/subprotocols/checkpoint" }
200172
strata-asm-proto-checkpoint-v0 = { path = "crates/asm/subprotocols/checkpoint-v0" }
201-
strata-asm-proto-debug-v1 = { path = "crates/asm/subprotocols/debug-v1" }
202173
strata-asm-spec = { path = "crates/asm/spec" }
203174
strata-asm-spec-debug = { path = "crates/asm/spec-debug" }
204-
strata-asm-stf = { path = "crates/asm/stf" }
205-
strata-asm-txs-admin = { path = "crates/asm/txs/admin" }
206-
strata-asm-txs-bridge-v1 = { path = "crates/asm/txs/bridge-v1" }
207-
strata-asm-txs-checkpoint = { path = "crates/asm/txs/checkpoint" }
208175
strata-asm-txs-checkpoint-v0 = { path = "crates/asm/txs/checkpoint-v0" }
209-
strata-asm-txs-test-utils = { path = "crates/asm/txs/test-utils" }
210-
strata-asm-worker = { path = "crates/asm/worker" }
211-
strata-bridge-types = { path = "crates/bridge-types" }
212-
strata-btc-verification = { path = "crates/btc-verification" }
213176
strata-btcio = { path = "crates/btcio" }
214177
strata-chain-worker = { path = "crates/chain-worker" }
215178
strata-chain-worker-new = { path = "crates/chain-worker-new" }
216179
strata-chainexec = { path = "crates/chainexec" }
217180
strata-chaintsn = { path = "crates/chaintsn" }
218181
strata-checkpoint-types = { path = "crates/checkpoint-types" }
219-
strata-checkpoint-types-ssz = { path = "crates/checkpoint-types-ssz" }
220182
strata-cli-common = { path = "crates/cli-common" }
221183
strata-codec-utils = { path = "crates/codec-utils" }
222184
strata-common = { path = "crates/common" }
@@ -240,6 +202,7 @@ strata-ledger-types = { path = "crates/ledger-types" }
240202
strata-mpt = { path = "crates/mpt" }
241203
strata-node-context = { path = "crates/node-context" }
242204
strata-ol-block-assembly = { path = "crates/ol/block-assembly" }
205+
strata-ol-bridge-types = { path = "crates/bridge-types" }
243206
strata-ol-chain-types = { path = "crates/ol-chain-types" }
244207
strata-ol-chain-types-new = { path = "crates/ol/chain-types" }
245208
strata-ol-chainstate-types = { path = "crates/ol-chainstate-types" }
@@ -280,7 +243,6 @@ strata-storage = { path = "crates/storage" }
280243
strata-storage-common = { path = "crates/storage-common" }
281244
strata-sync = { path = "crates/sync" }
282245
strata-test-utils = { path = "crates/test-utils/test-utils" }
283-
strata-test-utils-btc = { path = "crates/test-utils/btc" }
284246
strata-test-utils-btcio = { path = "crates/test-utils/btcio" }
285247
strata-test-utils-evm-ee = { path = "crates/test-utils/evm-ee" }
286248
strata-test-utils-l2 = { path = "crates/test-utils/l2" }
@@ -305,6 +267,28 @@ strata-predicate = { git = "https://github.com/alpenlabs/strata-common", tag = "
305267
strata-service = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc15" }
306268
strata-tasks = { git = "https://github.com/alpenlabs/strata-common", tag = "v0.1.0-alpha-rc15" }
307269

270+
# asm
271+
strata-asm-bridge-msgs = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
272+
strata-asm-checkpoint-msgs = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
273+
strata-asm-common = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
274+
strata-asm-logs = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
275+
strata-asm-manifest-types = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
276+
strata-asm-params = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
277+
strata-asm-proto-administration = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
278+
strata-asm-proto-bridge-v1 = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
279+
strata-asm-proto-checkpoint = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
280+
strata-asm-proto-debug-v1 = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
281+
strata-asm-stf = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
282+
strata-asm-txs-admin = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
283+
strata-asm-txs-bridge-v1 = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
284+
strata-asm-txs-checkpoint = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
285+
strata-asm-txs-test-utils = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
286+
strata-asm-worker = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
287+
strata-bridge-types = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
288+
strata-btc-verification = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
289+
strata-checkpoint-types-ssz = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
290+
strata-test-utils-btc = { git = "https://github.com/alpenlabs/asm", rev = "49c381ec0f3e11a32d3aa20a521ee49270662b21" }
291+
308292
# sled wrapper
309293
typed-sled = { git = "https://github.com/alpenlabs/typed-sled" }
310294

bin/alpen-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ path = "src/main.rs"
1313
[dependencies]
1414
alpen-reth-primitives.workspace = true
1515
strata-asm-txs-bridge-v1.workspace = true
16-
strata-bridge-types.workspace = true
1716
strata-cli-common.workspace = true
1817
strata-identifiers.workspace = true
1918
strata-l1-txfmt.workspace = true
19+
strata-ol-bridge-types.workspace = true
2020
strata-params.workspace = true
2121
strata-primitives.workspace = true
2222

bin/alpen-cli/src/cmd/deposit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ use indicatif::ProgressBar;
1919
use rand_core::OsRng;
2020
use shrex::encode;
2121
use strata_asm_txs_bridge_v1::deposit_request::DrtHeaderAux;
22-
use strata_bridge_types::DepositDescriptor;
2322
use strata_cli_common::errors::{DisplayableError, DisplayedError};
2423
use strata_identifiers::{AccountSerial, SubjectIdBytes};
2524
use strata_l1_txfmt::{MagicBytes, ParseConfig};
25+
use strata_ol_bridge_types::DepositDescriptor;
2626
use strata_primitives::crypto::even_kp;
2727

2828
use crate::{

bin/alpen-cli/src/cmd/withdraw.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use alpen_reth_primitives::WithdrawalCalldata;
88
use argh::FromArgs;
99
use bdk_wallet::{bitcoin::Address, KeychainKind};
1010
use indicatif::ProgressBar;
11-
use strata_bridge_types::OperatorSelection;
1211
use strata_cli_common::errors::{DisplayableError, DisplayedError};
12+
use strata_ol_bridge_types::OperatorSelection;
1313
use strata_primitives::bitcoin_bosd::Descriptor;
1414

1515
use crate::{

bin/datatool/src/cmd/asm_params.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use strata_asm_params::{
1111
SubprotocolInstance,
1212
};
1313
use strata_btc_types::BitcoinAmount;
14+
use strata_btc_verification::L1Anchor;
1415
use strata_crypto::{
1516
keys::compressed::CompressedPublicKey, threshold_signature::ThresholdConfig, EvenPublicKey,
1617
};
@@ -152,9 +153,15 @@ pub(super) fn exec(cmd: SubcAsmParams, ctx: &mut CmdContext) -> anyhow::Result<(
152153
};
153154

154155
// Assemble ASM params.
156+
let anchor = L1Anchor {
157+
block: genesis_l1_view.blk,
158+
next_target: genesis_l1_view.next_target,
159+
epoch_start_timestamp: genesis_l1_view.epoch_start_timestamp,
160+
network: ctx.bitcoin_network,
161+
};
155162
let asm_params = AsmParams {
156163
magic,
157-
l1_view: genesis_l1_view,
164+
anchor,
158165
subprotocols: vec![
159166
SubprotocolInstance::Admin(admin),
160167
SubprotocolInstance::Checkpoint(checkpoint),

bin/strata-client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ strata-asm-params.workspace = true
1515
strata-asm-proto-bridge-v1.workspace = true
1616
strata-asm-txs-bridge-v1.workspace = true
1717
strata-asm-txs-checkpoint-v0.workspace = true
18-
strata-bridge-types.workspace = true
1918
strata-btcio.workspace = true
2019
strata-checkpoint-types.workspace = true
2120
strata-common = { workspace = true, default-features = true }
@@ -28,6 +27,7 @@ strata-db-types.workspace = true
2827
strata-eectl.workspace = true
2928
strata-evmexec.workspace = true
3029
strata-l1-txfmt.workspace = true
30+
strata-ol-bridge-types.workspace = true
3131
strata-ol-chain-types.workspace = true
3232
strata-ol-chainstate-types.workspace = true
3333
strata-params.workspace = true

bin/strata-client/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ use strata_config::Config;
2525
use strata_consensus_logic::{
2626
genesis::{self, make_genesis_block},
2727
sync_manager::{self, SyncManager},
28+
AsmBlockSubmitter,
2829
};
2930
use strata_db_store_sled::SledBackend;
3031
use strata_db_types::{
@@ -381,7 +382,7 @@ fn start_core_tasks(
381382
Arc::new(config.btcio.reader.clone()),
382383
btcio_params,
383384
status_channel.clone(),
384-
sync_manager.get_asm_ctl(),
385+
Arc::new(AsmBlockSubmitter::new(sync_manager.get_asm_ctl())),
385386
),
386387
);
387388

bin/strata-client/src/rpc_server.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use jsonrpsee::core::RpcResult;
88
use strata_asm_proto_bridge_v1::{BridgeV1State, BridgeV1Subproto};
99
use strata_asm_txs_bridge_v1::BRIDGE_V1_SUBPROTOCOL_ID;
1010
use strata_asm_txs_checkpoint_v0::{CHECKPOINT_V0_SUBPROTOCOL_ID, OL_STF_CHECKPOINT_TX_TYPE};
11-
use strata_bridge_types::{PublickeyTable, WithdrawalIntent};
1211
use strata_btcio::{broadcaster::L1BroadcastHandle, writer::EnvelopeHandle};
1312
use strata_checkpoint_types::{Checkpoint, EpochSummary, SignedCheckpoint};
1413
#[cfg(feature = "debug-utils")]
@@ -21,10 +20,12 @@ use strata_db_types::types::{
2120
CheckpointConfStatus, CheckpointProvingStatus, L1TxEntry, L1TxStatus,
2221
};
2322
use strata_l1_txfmt::TagData;
23+
use strata_ol_bridge_types::{PublickeyTable, WithdrawalIntent};
2424
use strata_ol_chain_types::{L2Block, L2BlockBundle, L2BlockId, L2Header};
2525
use strata_ol_chainstate_types::Chainstate;
2626
use strata_params::Params;
2727
use strata_primitives::{
28+
bitcoin_bosd::Descriptor,
2829
buf::Buf32,
2930
crypto::EvenPublicKey,
3031
epoch::EpochCommitment,
@@ -452,7 +453,10 @@ impl StrataApiServer for StrataRpcImpl {
452453
.map(|a| RpcWithdrawalAssignment {
453454
deposit_idx: a.deposit_idx(),
454455
amt: a.withdrawal_command().net_amount(),
455-
destination: a.withdrawal_command().destination().clone(),
456+
destination: Descriptor::from_bytes(
457+
&a.withdrawal_command().destination().to_bytes(),
458+
)
459+
.expect("ASM descriptor should deserialize into RPC descriptor"),
456460
operator_idx: a.current_assignee(),
457461
})
458462
.collect::<Vec<RpcWithdrawalAssignment>>();

bin/strata-test-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ strata-acct-types.workspace = true
1616
strata-asm-logs.workspace = true
1717
strata-asm-manifest-types.workspace = true
1818
strata-asm-txs-bridge-v1 = { workspace = true, features = ["test-utils"] }
19-
strata-bridge-types.workspace = true
2019
strata-cli-common.workspace = true
2120
strata-codec.workspace = true
2221
strata-crypto.workspace = true
2322
strata-identifiers.workspace = true
2423
strata-l1-txfmt.workspace = true
2524
strata-msg-fmt.workspace = true
25+
strata-ol-bridge-types.workspace = true
2626
strata-ol-msg-types.workspace = true
2727
strata-ol-stf.workspace = true
2828
strata-primitives.workspace = true

0 commit comments

Comments
 (0)