xmr-btc-swap/libp2p-rendezvous-node
Mohan 801ce8fd9d
feat(taker): Improve maker discovery (#692)
* mvp

* only redial if DisconnectedAndNotDialing

* progress

* progress

* progress

* some progress

* progress

* extract common logic into behaviour_util::ConnectionTracker

* extract common logic into BackoffTracker helper struct

* add comment in quote::background behaviour

* BackoffTracker rename get_backoff to get(...)

* cleanup, fix some things that got lost during rebase

* properly propagate quote::background ToSwarm events

* actually persist event loop, add quotes and rendezvous::discovery to cli behaviour

* some progress, cleanup, comments

* progress

* redial all peers that we dont know dont support quote, use quotes_cached behaviour in example, add remove_peer(...) to redial behaviour, don't redial discovered rendezvous peers

* remove old todo

* quotes_cached.rs: cache last connected endpoint

* rename: add_peer_address -> queue_peer_address

* extract p2p defaults into swap-p2p/defaults.rs

* split rendezvous.rs into two sub-modules

* remove unused bob::BackgroundQuoteReceived

* replace usage of list_sellers with event loop

* prune: remove list_sellers command

* use backoff helper in swap-p2p/src/protocols/quotes.rs

* refactor rendezvous::register behaviour, getting some unit tests working again

* add all peer addresses to the swarm on init

* less agressive redials

* extract magic backoff numbers

* proof of concept: drill tracing span into event loop through channels

* add BackoffTracker::increment, re-schedule register when we lose connection to rendezvous point

* fetch identify version and propagate into UI

* forbid private/local/loopback ip addresses to be shared/accepted through Identify

* remove legacy list_sellers code

* ensure uuids are unique for alice during swap_setup

* formatting and nitpicks

* fix: allow multiple swap setup requests over the same connection handler

* small cleanups

* fix: protocols/quotes.rs unit tests

* revert: listen on 0.0.0.0 for asb p2p

* propagate handle_pending_inbound_connection and handle_pending_outbound_connection to identify patch source

* replace loop with repeated return Poll::Ready in discovery.rs

* format

* MultiAddrVecExt trait, emit rendezvous addresses to rendezvous-node swarm

* fix: strictly disallow concurrent swap setup requests for the same swap on the same connection

* fix tests etc

* remove slop from futures_util.rs

* address some comments

* behaviour_util.rs: track inflight dials, add tests, return Some(peer_id) if internal state was changed

* replace boring-avatars with jidenticon

* feat: add peer discovery status dialog

* remove buy-xmr cli command, remove "sellers" arg for BuyXmrArgs, add changelog

* disable body overscroll

* add changelog for jidenticon

* increase quote fetch interval to 45s

* fix rendezvous::register_and_discover_together test
2025-12-01 18:03:13 +01:00
..
src feat(taker): Improve maker discovery (#692) 2025-12-01 18:03:13 +01:00
Cargo.toml refactor(alice): concretize enc sig publication requirement (#664) 2025-11-01 00:44:58 +01:00
Dockerfile fix(rendezvous-node): fix docker image 2025-10-26 13:29:35 +01:00
README.md refactor: rename "rendezvous-server" to "rendezvous-node" 2025-10-25 23:50:16 +02:00

Standalone Rendezvous Server

A standalone libp2p rendezvous server binary.

Usage

Build the binary:

cargo build --release

Run the libp2p-rendezvous-node:

cargo run --release

The server will use default values:

  • Secret file: rendezvous-server-secret.key (created automatically if it doesn't exist)
  • Listen port: 8888

You can customize these with:

cargo run --release -- --secret-file <PATH-TO-SECRET-FILE> --listen-tcp <PORT>

Tor Onion Service Support

By default, the rendezvous server listens on both TCP and a Tor onion service for enhanced privacy. This will:

  • Bootstrap a connection to the Tor network
  • Create a new onion service
  • Listen on both TCP (port 8888) and the onion address
  • Print the onion address in the logs

To disable the onion service and use only TCP:

cargo run --release -- --no-onion

You can specify a custom port for the onion service:

cargo run --release -- --onion-port 9999

Options

If the provided secret file doesn't exist, it will be created with a new random secret key.

Run cargo run --release -- --help for all available options:

  • --secret-file: Path to the secret key file
  • --listen-tcp: TCP port to listen on (default: 8888)
  • --no-onion: Disable Tor onion service (enabled by default)
  • --onion-port: Port for the onion service (default: 8888)
  • --json: Format logs as JSON
  • --no-timestamp: Don't include timestamp in logs