Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
run: docker exec bitcoind-regtest bitcoin-cli -regtest --rpcuser=user --rpcpassword=PaSsWoRd -generate 101

- name: Run
run: ./target/release/collidervm_toy
run: ./target/release/demo

- name: Stop Bitcoin Regtest
working-directory: scripts/demo
Expand Down
3 changes: 3 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ anyhow = "1.0.98"
bitcoincore-rpc = "0.19.0"
serde_json = "1.0"
musig2 = { version = "0.2.4", features = ["serde", "rand", "k256"]}
byteorder = "1.5.0"
num-bigint = "0.4.6"
num-traits = "0.2.19"

[profile.dev]
opt-level = 3
Expand Down
15 changes: 9 additions & 6 deletions src/main.rs → src/bin/demo.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
//! ColliderVM Signet Demo Binary
// ...existing code from main.rs...
// ...existing code...

//! ColliderVM Signet Demo Binary
//!
//! This binary generates **real Bitcoin Signet transactions** that execute the
Expand Down Expand Up @@ -38,6 +42,10 @@ use bitcoincore_rpc::{Auth, Client, RpcApi};
use clap::Parser;
use collidervm_toy::core::{find_valid_nonce, flow_id_to_prefix_bytes};
use collidervm_toy::musig2::simulate_musig2;
use collidervm_toy::output::{
DemoOutput, DemoParameters, KeyInfo, KeyPair, TransactionInfo, TxInfo,
write_demo_output_to_file,
};
use collidervm_toy::transactions::{
create_f1_tx, create_f2_tx, create_spending_tx, finalize_f1_tx,
finalize_lock_tx,
Expand All @@ -46,13 +54,8 @@ use collidervm_toy::utils::inner_from;
use collidervm_toy::utils::{
wait_for_confirmation, wrap_network, write_transaction_to_file,
};
use std::str::FromStr;

mod output;
use output::{
DemoOutput, DemoParameters, KeyInfo, KeyPair, TransactionInfo, TxInfo,
write_demo_output_to_file,
};
use std::str::FromStr;

/// Minimal amount we ask the user to deposit (200 000 sat ≈ 0.002 BTC)
const REQUIRED_AMOUNT_SAT: u64 = 150_000;
Expand Down
Loading
Loading