- 3 GB memory
- 250 GB Disk for MainNet or 40 GB Disk for TestNet
- 1 CPU
System specifications are based off of current Application size (Docker images and source code), and Blockchain size. Blockchain size will increase as time goes on, so make sure your machines have adequate space to handle this growth into the future.
Disk estimates are based off of current blockchain sizes:
- 208 GB (BTC) and 21 GB (LTC) for MainNet
- 22 GB (BTC) and 1.5 GB (LTC) for TestNet
The system specifications above are up-to-date as of February 2019
Users should understand that the machine that will be running Sparkswap will also be running the blockchain and lightning network nodes that contain the private keys to their assets. Since these are connected to the Internet (and must be in order to perform their function), they are more exposed to asset loss than cold storage wallets.
Machines that run Sparkswap should likely be single purposed, and locked down in nearly every way, including what personnel have access to them.
You are responsible for your own security.
Brokers are always online
Due to the nature of Payment Channel Networks as they are currently designed, Sparkswap Brokers are required to stay online for the duration of their trading session. When a Broker disconnects from the Relayer, the Relayer immediately cancels all of their orders, since the Broker will be unreachable to both prepare for and execute a swap for the order.
In addition, current Payment Channel Network implementations have severe consequences for data loss, which can result in loss of funds in channels. Work is being done to mitigate these potential failure scenarios, but you should plan to run your software in a highly available environment (e.g. using RAID and an UPS unit to avoid data loss). However, even with these mitigations data loss is still possible and will result in a loss of funds in channels.
Full Node for each Blockchain
Due to current constraints with our Payment Channel Network implementations, every Blockchain that you use on Sparkswap requires running a Full Node. With current support, that means running a full Bitcoin node and a Full Litecoin node, which is what leads to the large storage requirements for running Sparkswap.
Full Payment Channel Network Node
Each broker is required to run a separate instance of a Payment Channel Network node (currently LND) for each blockchain.
Before you begin
- Install nvm:
curl -o install-nvm.sh https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh bash install-nvm.sh
- Install NodeJS LTS 8.11.x with the latest npm version
nvm install 8.11 --latest-npm
- Install a Docker CE version of 18.03 or greater
- Make sure your you can run
dockerfrom your user (see: Manage Docker as a non-root user)
- Install Docker Compose version 1.23 or greater
You will need to expose inbound connections to the following ports in order to use Sparkswap:
These ports allow other nodes to connect to your node on the Lightning Network.
If you are running Sparkswap behind a router or firewall, you may need to forward those ports to your machine.
Installation & Setup
We've created a script to download and configure Sparkswap:
curl https://get.sparkswap.com/latest -o install-sparkswap.sh
Run the script with:
You'll be prompted for additional information including your Public IP Address and what network you want to run the Broker on (TestNet or MainNet).
By default, the script will use the pre-built Sparkswap Docker images that can be found on the Sparkswap Docker Hub.
To build the Docker images from source, use the
bash install-sparkswap.sh --build
Building takes much longer (10-15 minutes), and will prompt you for additional information during the build. To avoid these additional prompts, you can provide the following command line options:
--yesAgrees to create a
sparkswapdirectory in your home directory
--network=<m or t>Designate which Network to run the Broker on,
mfor MainNet or
--public-ip=<your ip address>Your publicly accessible IP address (required for running the Payment Channel Network nodes)
If you'd rather not use the script, you can also follow the Manual Installation guide.
To run Sparkswap on MainNet, you will need access to the Sparkswap Private Beta. Request an invite here.
Maintenance of the Broker Daemon
Once your daemon is up, synced with the blockchains, and running, you can check on the internal logs of the broker and related services with:
docker-compose logs -f
While you are actively using the broker, and particularly when you have outstanding orders, you should check on the status of your Broker and Payment Channel Network nodes at least once a day with:
If either your Broker or either of your Payment Channel Network nodes have exited, you should take a look at the logs and potentially restart them. This is important to maintain the software's assumptions about atomicity of transactions.
Additionally, we provide utilities for troubleshooting the broker daemon and your orders, in the CLI.