* wip
* filter out destinations with zero amount
* add changelog entry
* do not use subtract_fee_from_outputs for multi lock tx
* make developer tip address configurable
* create developer_tip_monero_wallet in integration test
* add happy_path_alice_developer_tip integration test
* run happy_path_alice_developer_tip integration test in ci
* make stub tests
* document `developer_tip` and add log at startup
* take tip consideration when crafting quote
* remove double g++
* fix bash
* full stack trace in logs
* add DEFAULT_DEVELOPER_TIP_ADDRESS_STAGENET
* fix issue where --testnet could not be detected
* triple bitcoin testnet timelocks
* assert hardcoded developer tip address is on the correct network
* fix: interpret developer_tip = 0 as no tip in log at startup
* change developer_tip type to non-option, clamp tips below 100_00 piconero to 0
* create dedidcated TipConfig struct to replace (Decimal, monero::Address)
* small refactorings
* move tip config init out of of function call params
* refactoring
* unit tests wrong arguments passed in
* document `developer_tip` allows configuring your maker to donate a small part of swaps to funding further development of the project. This is disabled by default. You can manually enable it if you choose to do so. Set it to a number between 0 and 1. Setting it to 0.02 will donate 2% of each swap to the donation address of the project. The tip is sent by adding an additional output the Monero lock transaction of a swap. This means this will not impact document `maker.developer_tip` in docs/pages/becoming_a_maker/overview.mdx
* do not panic if cxx_addrs / cxx_amounts is null
* formatting, full error stack trace in swap/src/asb/event_loop.rs when we cannot construct a quote
* increase MIN_USEFUL_TIP_AMOUNT_PICONERO to 30m piconero (usd), correct params in unit tests
* prompt for developer_tip in orchestrator and asb wizard
* just fmt
* fmt
* address comments
* fmt
* spelling mistakes
---------
Co-authored-by: binarybaron <binarybaron@mail.mail>
Some network and application specific code does not belong in the protocol module and was moved.
Eventloop, recovery and the outside behaviour were moved to the respective application module because they are application specific.
The `swap_setup` was moved into the network module because upon change both sides will have to be changed and should thus stay close together.
1. Split up image::Monero into Monerod and MoneroWalletRpc
2. Don't use `bash` to run the internal command. Instead we disable
the entrypoint script as per https://github.com/XMRto/monero#raw-commands
3. Remove the start up delay by listening for the correct log message.
To make this more resilient, we make the log level NOT configurable and
instead always log verbosely.
Instead of spawning the swap inside the event loop we send the swap back
to the caller to be spawned. This means we no longer need the remote handle
that was only used in the tests.
This now properly logs the swap results in production.
It also gives us more control over Alice's swap in the tests.
Alice was attempting to create a new event loop using the same listen addr as the old one which was still running. This commit aborts the event loop before creating a new one.
- Introduce Test abstraction instead of tow harnesses, move test specific data into Test
- Change the abstraction from actors to swap, because we are creating swaps, not actors
- rename actor::swap to run, because we are running a swap
This makes the redeem assertion reusable for all tests with a redeem scenario.
Since the factory was not a clean factory before and is now doing even more it was renamed to harness.
This includes the introduction of the --data-dir parameter instead of the --database.
Both the seed file and the database are stored in the data-dir, the database in sub-folder `database`.
Created network, storage and protocol modules. Organised
files into the modules where the belong.
xmr_btc crate moved into isolated modulein swap crate.
Remove the xmr_btc module and integrate into swap crate.
Consolidate message related code
Reorganise imports
Remove unused parent Message enum
Remove unused parent State enum
Remove unused dependencies from Cargo.toml
As Bob is dialing Alice, we now ensure that we are connected to Alice
at each step that needs communication.
If we are not connected, we proceed with dialing.
In an attempt to improve libp2p usage, we also add known address of
Alice first and only use peer_id to dial.
This ensures that we use the expected peer id.