From f5e6ba18e03362e8ff8471dd38c32ca32777019a Mon Sep 17 00:00:00 2001 From: rishflab Date: Wed, 17 Mar 2021 15:26:44 +1100 Subject: [PATCH 1/3] Use different address for redeem and punish Having the same address could potentially cause issues when subscribing to transactions by script --- swap/src/protocol/alice/state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swap/src/protocol/alice/state.rs b/swap/src/protocol/alice/state.rs index 263aee10..9eacc87b 100644 --- a/swap/src/protocol/alice/state.rs +++ b/swap/src/protocol/alice/state.rs @@ -106,7 +106,7 @@ impl State0 { let a = bitcoin::SecretKey::new_random(rng); let v_a = monero::PrivateViewKey::new_random(rng); let redeem_address = bitcoin_wallet.new_address().await?; - let punish_address = redeem_address.clone(); + let punish_address = bitcoin_wallet.new_address().await?; let s_a = monero::Scalar::random(rng); let (dleq_proof_s_a, (S_a_bitcoin, S_a_monero)) = CROSS_CURVE_PROOF_SYSTEM.prove(&s_a, rng); From 8675d88727d2f69f54d877d93d1a9f5719c311e0 Mon Sep 17 00:00:00 2001 From: rishflab Date: Wed, 17 Mar 2021 15:34:29 +1100 Subject: [PATCH 2/3] Don't wait for tx lock confirmed after broadcast Bob does not care whether tx lock is confirmed. That is alice's problem. This wait was introduced to remedy a bug in status_of_script() which was failing when called on a transaction with no confirmations. --- swap/src/protocol/bob/swap.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/swap/src/protocol/bob/swap.rs b/swap/src/protocol/bob/swap.rs index 197e5fd9..bd460bb9 100644 --- a/swap/src/protocol/bob/swap.rs +++ b/swap/src/protocol/bob/swap.rs @@ -106,10 +106,6 @@ async fn run_until_internal( .context("Failed to sign Bitcoin lock transaction")?; let (..) = bitcoin_wallet.broadcast(signed_tx, "lock").await?; - bitcoin_wallet - .watch_until_status(&tx_lock, |status| status.is_confirmed()) - .await?; - let state = BobState::BtcLocked(state3); let db_state = state.clone().into(); db.insert_latest_state(swap_id, Swap::Bob(db_state)).await?; From 4ea8068d6f294d301230c8e6067220bad2b69b74 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Wed, 17 Mar 2021 16:20:41 +1100 Subject: [PATCH 3/3] Create dependabot.yml --- .github/dependabot.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..d8223718 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "cargo" + directory: "/" + schedule: + interval: "daily" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily"