* 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> |
||
|---|---|---|
| .. | ||
| src | ||
| tests | ||
| build.rs | ||
| Cargo.toml | ||
| README.md | ||
Orchestrator
The orchestrator tool helps you setup a secure, reliable and production environment for running an ASB. It guides you through a series of prompts to generate a customized Docker environment using Docker Compose.
Getting started
Ensure you have Docker and Docker Compose installed on your machine.
If you're not compiling the orchestrator from source you can grab the latest release from the download section.
Tip
Linux x86_64 quick install
Run the commands below if you're on a Linux x86 server. It'll download the latest archive from Github, extract the binary and make it executable. You can also run this to update a pre-existing
orchestratorinstall.Download the archive which contains the pre-compiled binary:
name="$( curl -fsSL https://api.github.com/repos/eigenwallet/core/releases/latest \ | grep -oE '"name":\s*"orchestrator_[^"]*_Linux_x86_64\.tar"' \ | head -n1 | cut -d'"' -f4 )" curl -fL -o "orchestrator_linux.tar" "https://github.com/eigenwallet/core/releases/latest/download/$name"Extract the archive to get the
orchestratorbinarytar -xf ./orchestrator_linux.tarMake the binary executable
chmod +x orchestrator
Run the command below to start the wizard. It’ll guide you through a bunch of questions to generate the config.toml file and the docker-compose.yml file based on your needs. You can always modify the config.toml later on to modify specific things about your asb like the minimum swap amount or the configured markup.
./orchestrator
To start the environment, run a command such as:
docker compose up -d --build
To view logs, run commands such as:
docker compose logs -f --tail 100
docker compose logs -f --tail 100 asb
docker compose logs -f --tail 100 bitcoind
docker compose logs -f --tail 100 electrs
To view high-verbosity logs of the asb, peek inside the asb-tracing-logger container by running commands such as:
docker compose logs -f --tail 100 asb-tracing-logger
Once the asb is running properly you can get a shell
$ docker compose attach asb-controller
ASB Control Shell - Type 'help' for commands, 'quit' to exit
asb> help
Available commands:
Usage: <COMMAND>
Commands:
check-connection Check connection to ASB server
bitcoin-balance Get Bitcoin balance
monero-balance Get Monero balance
monero-address Get Monero wallet address
multiaddresses Get external multiaddresses
active-connections Get active connection count
get-swaps Get list of swaps
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
Additional shell commands:
help Show this help message
quit, exit, :q Exit the shell
asb>
Architecture
The orchestrator generates a docker-compose.yml file that includes the following containers:
asb: Accepts connections from the outside world. Provides sell offers to the outside world. Manages your Bitcoin and Monero wallet. Controls the swap process.asb-controller: Shell to send control commands to theasbcontainer.bitcoind: Bitcoin node.electrs: Electrum server.monerod: Monero node.
Why Docker?
Your ASB will potentially be managing fairly large amounts of funds. This means you have to keep it secure and running reliably. Docker handles some of this for you.
Most importantly Docker provides:
- System Isolation: Containers are isolated from each other on the operating system level. If one of the nodes were to be affected by a vulnerability, your funds are still safe.
- Network Isolation: Docker only exposes the peer-to-peer port of your ASB to the outside world. Bitcoin, Monero and Electrum containers are only allowed outbound connections. The RPC control port of your ASB is only accessible within Docker inside of an internal network, accessible only to the
asb-controllercontainer. - Reproducibility: A virtual environment is created for each container. This means that quirks on your system (e.g outdated
glibc) will not become an issue. - Building from source: Building from source is as simple as passing a flag to Docker. You do not have to install any dependencies on your system.