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
38 changes: 37 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,42 @@ jobs:
chmod +x ./testconfig/scripts/wait_for_electrs.sh
./testconfig/scripts/wait_for_electrs.sh
- name: Run test
run: RUST_BACKTRACE=1 ${{ matrix.tests }} --ignored
run: RUST_BACKTRACE=1 RUST_MIN_STACK=4194304 ${{ matrix.tests }} --ignored
- name: Stop bitcoin node
run: docker compose down -v

test_splicing:
name: test splicing
runs-on: ubuntu-latest
timeout-minutes: 30
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: testdb
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/testdb
steps:
- uses: actions/checkout@v4
- name: Start bitcoin node
run: docker compose up -d
- name: Wait for container to run
run: |
chmod +x ./testconfig/scripts/wait_for_container.sh
./testconfig/scripts/wait_for_container.sh bitcoin
- name: Wait for electrs to be ready
run: |
chmod +x ./testconfig/scripts/wait_for_electrs.sh
./testconfig/scripts/wait_for_electrs.sh
- name: Run test
run: RUST_MIN_STACK=4194304 cargo test -p ddk-manager single_oracle_numerical_splice_test -- --ignored --nocapture
- name: Stop bitcoin node
run: docker compose down -v
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
/testconfig/kormir-server

/ddk/.env
.env
26 changes: 22 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[workspace]
resolver = "2"
members = ["ddk", "payouts", "ddk-node", "ddk-manager"]
members = ["ddk", "dlc", "dlc-messages", "dlc-trie", "payouts", "ddk-node", "ddk-manager", "kormir"]
Binary file added contract_binaries/Accepted
Binary file not shown.
Binary file added contract_binaries/Closed
Binary file not shown.
Binary file added contract_binaries/Confirmed
Binary file not shown.
Binary file added contract_binaries/Offered
Binary file not shown.
Binary file added contract_binaries/PreClosed
Binary file not shown.
Binary file added contract_binaries/Signed
Binary file not shown.
12 changes: 3 additions & 9 deletions ddk-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,9 @@ use-serde = ["serde", "dlc/use-serde", "dlc-messages/use-serde", "dlc-trie/use-s
async-trait = "0.1.50"
bitcoin = { version = "0.32.2", default-features = false }

# dlc = { version = "0.7.1", features = ["use-serde"] }
# dlc-messages = { version = "0.7.1", features = [ "use-serde"] }
# dlc-trie = { version = "0.7.1", features = ["use-serde"] }
# dlc = { path = "../../rust-dlc/dlc", features = ["use-serde"] }
# dlc-messages = { path = "../../rust-dlc/dlc-messages", features = [ "use-serde"] }
# dlc-trie = { path = "../../rust-dlc/dlc-trie", features = ["use-serde"] }
dlc = { git = "https://github.com/bennyhodl/rust-dlc", branch = "single-funded-dlc", features = ["use-serde"] }
dlc-messages = { git = "https://github.com/bennyhodl/rust-dlc", branch = "single-funded-dlc", features = [ "use-serde"] }
dlc-trie = { git = "https://github.com/bennyhodl/rust-dlc", branch = "single-funded-dlc", features = ["use-serde"] }
dlc = { path = "../dlc", features = ["use-serde"] }
dlc-messages = { path = "../dlc-messages", features = [ "use-serde"] }
dlc-trie = { path = "../dlc-trie", features = ["use-serde"] }

futures = "0.3.31"
hex = { package = "hex-conservative", version = "0.1" }
Expand Down
2 changes: 2 additions & 0 deletions ddk-manager/benches/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ fn create_transactions(payouts: &[Payout]) -> DlcTransactions {
inputs: create_txinputinfo_vec(),
input_amount: Amount::from_sat(300000000),
collateral: Amount::from_sat(100000000),
dlc_inputs: vec![],
};

let accept_params = PartyParams {
Expand All @@ -203,6 +204,7 @@ fn create_transactions(payouts: &[Payout]) -> DlcTransactions {
inputs: create_txinputinfo_vec(),
input_amount: Amount::from_sat(300000000),
collateral: Amount::from_sat(100000000),
dlc_inputs: vec![],
};
create_dlc_transactions(&offer_params, &accept_params, payouts, 1000, 2, 0, 1000, 3).unwrap()
}
Expand Down
4 changes: 3 additions & 1 deletion ddk-manager/src/channel/offered_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use secp256k1_zkp::PublicKey;

use crate::{
contract::offered_contract::OfferedContract, conversion_utils::get_tx_input_infos,
error::Error, ChannelId, ContractId, KeysId,
dlc_input::get_dlc_inputs_from_funding_inputs, error::Error, ChannelId, ContractId, KeysId,
};

use super::party_points::PartyBasePoints;
Expand Down Expand Up @@ -97,6 +97,7 @@ impl OfferedChannel {
};

let (inputs, input_amount) = get_tx_input_infos(&offer_channel.funding_inputs)?;
let dlc_inputs = get_dlc_inputs_from_funding_inputs(&offer_channel.funding_inputs);

let contract = OfferedContract {
id: offer_channel.temporary_contract_id,
Expand All @@ -113,6 +114,7 @@ impl OfferedChannel {
payout_serial_id: offer_channel.payout_serial_id,
collateral: offer_channel.offer_collateral,
inputs,
dlc_inputs,
input_amount,
},
cet_locktime: offer_channel.cet_locktime,
Expand Down
Loading
Loading