Skip to content

Commit 15f0ef8

Browse files
authored
feat(bob): Non-interactive transfer proof (#818)
* Upgrade toolchain to rustc 1.89.0 * Switch from curve25519-dalek-ng to curve25519-dalek in most places except the DLEQ proof system * Remove CliCommand::BuyXmr everywhere * New monero-wallet-ng with confirmations / scanner subscriptions and transaction verification * monero-wallet-ng: examples (could be pruned) * monero-wallet: split into wallets, listener, lib modules * monero-sys: remove Wallets::wait_until_confirmed(...) in favour of monero-wallet-ng * swap(alice): replace monero-sys in favour monero-wallet-ng of wait_until_confirmed * swap(bob): rename XmrLockProofReceived -> XmrLockTransactionCandidate, add new XmrLockTransactionSeen, extract helpers into common.rs, use monero-wallet-ng helpers, add new TransferProofMaybeWithTxKey * gui: add BobStateName.XmrLockTransactionSeen to guards * helpers: state3.infallible_recv_transfer_proof(...), infallible_wait_for_xmr_lock_confirmation(...), never go into XmrLockTransactionSeen directly * fmt * monero-wallet-ng: remove examples * progress * nitpick: remove _ng suffix * fix underflow in absolute_confirmations_into_relative, use GuaranteedScanner * rename .wait_for_incoming_transfer_ng to .wait_for_incoming_transfer * replace map_err with context * document some more behaviour * clarify naiveness of scanner * add changelog entry * prune: remove old WatchRequest everywhere * bump rust toolchain to 1.90 and move shared deps into workspace * bob: add intermediate WaitingForCancelTimelockExpiration state * bob: do not explicitly check for tx lock timelock status before watching for tx redeem * bob: use env_config.monero_finality_confirmations, dont try to redeem indefinitely upon cooperative redeem * add monero_wallet_ng to tracing * monero-wallet-ng: reset backoff upon success, instrument span into tokio tasks * add VerifyingXmrLockTx and VerifyingXmrLockTx tauri state * bob: check for tx_redeem and timelock state concurrently during pre-requisite check before sending enc sig * fix(monero-wallet-ng): correctly instrument span * monero-wallet-ng: use normal Scanner instead of GuaranteedScanner * storeListener.ts: do init tasks in parallel * nitpick: remove dead code in background.ts * add PreflightEncSig and InflightEncSig tauri events * fix closure calls * final nitpciks * fix setup-build-environment/action.yml * fix typo * zeroize to match monero-oxide version * last nitpicks * scan blocks in batches * nitpick * add happy_path_alice_does_not_send_transfer_proof integration test
1 parent 7e3955c commit 15f0ef8

Some content is hidden

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

62 files changed

+3531
-2239
lines changed

.github/actions/setup-build-environment/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ runs:
3333
corepack enable
3434
3535
- name: Install Rust stable
36-
uses: dtolnay/rust-toolchain@1.88
36+
uses: dtolnay/rust-toolchain@1.90
3737
with:
3838
targets: ${{ inputs.target }}
3939

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ jobs:
180180
test_name: alice_empty_balance_after_started_btc_early_refund
181181
- package: swap
182182
test_name: alice_broken_wallet_rpc_after_started_btc_early_refund
183+
- package: swap
184+
test_name: happy_path_alice_does_not_send_transfer_proof
183185
- package: monero-tests
184186
test_name: reserve_proof
185187
- package: monero-tests

.github/workflows/draft-new-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
id: make-commit
7575
env:
7676
DPRINT_VERSION: "0.50.0"
77-
RUST_TOOLCHAIN: "1.88.0"
77+
RUST_TOOLCHAIN: "1.90.0"
7878
run: |
7979
rustup component add rustfmt --toolchain "$RUST_TOOLCHAIN-x86_64-unknown-linux-gnu"
8080
curl -fsSL https://dprint.dev/install.sh | sh -s $DPRINT_VERSION

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
- GUI (Taker): Previously takers had to receive the Monero transfer proof from the maker over the network. This required interactivity meaning that if the peer-to-peer connection was lost, the taker might not detect that the Monero were locked. This would cause unnecessary refunds of swaps that could have otherwise succeded. The taker will now scan the view-only Monero wallet in the background (while concurrently waiting for the transfer proof over the network). The taker will detect if the Monero are locked even if peer-to-peer connection to the other party is lost. This significantly improves the reliability of swaps.
11+
- GUI: Fix an issue where it'd take a while for swaps to show up after a restart.
12+
1013
## [3.5.2] - 2025-12-08
1114

1215
## [3.5.1] - 2025-12-07

0 commit comments

Comments
 (0)