Watchtower and other things
Switch branches/tags
Nothing to show
Clone or download
Latest commit 850dac3 Nov 17, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
project Make it compilable Nov 14, 2017
src Minor changes Nov 17, 2018
README.md Update docs Oct 9, 2018
build.sbt Add fiat currencies Nov 16, 2018
olympus.png Refactoring + updates to match developments in wallet Nov 1, 2017

README.md

olympus

Maintenance server for Lightning Wallet

Installation manual for Ubuntu 16.04

  1. Install Java by following steps described at https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04

  2. Install Bitcoin Core:

sudo apt-get update  
sudo apt-get install bitcoind
  1. Bitcoin config file should contain the following lines:
daemon=1
server=1

rpcuser=foo # set your own
rpcpassword=bar # set your own

rpcport=18332
port=8333

txindex=1 # recommended but not necessary
# prune=100000 not recommended but won't break anything if turned on, useful if you have less than 200Gb of disk space

zmqpubrawtx=tcp://127.0.0.1:29000
zmqpubhashblock=tcp://127.0.0.1:29000
zmqpubrawblock=tcp://127.0.0.1:29000
  1. Install and run a MongoDB by following steps described at https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

  2. Open MongoDB console and issue the following commands:

$ mongo

> use btc-olympus
> db.spentTxs.createIndex( { "createdAt": 1 }, { expireAfterSeconds: 3600 * 24 * 90 } )
> db.spentTxs.createIndex( { "prefix": 1 }, { unique: true } )
> db.spentTxs.createIndex( { "txids": 1 } )

> db.scheduledTxs.createIndex( { "createdAt": 1 }, { expireAfterSeconds: 3600 * 24 * 30 } )
> db.scheduledTxs.createIndex( { "cltv": 1 } )

> db.userData.createIndex( { "createdAt": 1 }, { expireAfterSeconds: 3600 * 24 * 365 * 5 } )
> db.userData.createIndex( { "key": 1 } )

> use btc-blindSignatures
> db.blindTokens.createIndex( { "createdAt": 1 }, { expireAfterSeconds: 3600 * 24 * 365 } )
> db.blindTokens.createIndex( { "seskey": 1 }, { unique: true } )

> use btc-watchedTxs
> db.watchedTxs.createIndex( { "createdAt": 1 }, { expireAfterSeconds: 3600 * 24 * 360 * 2 } )
> db.watchedTxs.createIndex( { "halfTxId": 1 } )

> "0123456789".split('').forEach(function(v) { db["clearTokens" + v].createIndex( { "token": 1 }, { unique: true } ) })
  1. Get Eclair fat JAR file, either by downloading it directly from a repository or by compiling from source:
git clone https://github.com/ACINQ/eclair.git  
cd eclair  
mvn package  
  1. Create an eclairdata directory and put an eclair.conf file there with the following lines:
eclair {
	chain = "test"
	spv = false

	server {
		public-ips = ["127.0.0.1"]
		binding-ip = "0.0.0.0"
		port = 9096
	}

	api {
		enabled = true
		binding-ip = "127.0.0.1"
		port = 8086
		password = "pass"
	}

	bitcoind {
		host = "localhost"
		rpcport = 18332
		rpcuser = "foo"
		rpcpassword = "bar"
		zmq = "tcp://127.0.0.1:29000"
	}
}

  1. Run Ecliar instance by issuing java -Declair.datadir=eclairdata/ -jar eclair-node.jar

  2. Get Olympus fat JAR file, either by downloading it directly from a repository or by compiling from source:

git clone https://github.com/btcontract/olympus.git  
cd olympus  
sbt  
assembly  
  1. Run Olympus instance by issuing:
$ java -jar olympus-assembly-1.0.jar production "{\"zmqApi\":\"tcp://127.0.0.1:29000\",\"ip\":\"127.0.0.1\",\"privKey\":\"17237641984433455757821928886025053286790003625266087739786982589470995742521\",\"btcApi\":\"http://foo:bar@127.0.0.1:18332\",\"eclairSockPort\":9735,\"rewindRange\":1,\"eclairSockIp\":\"127.0.0.1\",\"eclairNodeId\":\"03dc39d7f43720c2c0f86778dfd2a77049fa4a44b4f0a8afb62f3921567de41375\",\"paymentProvider\":{\"quantity\":50,\"priceMsat\":2000000,\"url\":\"http://127.0.0.1:8080\",\"description\":\"Storage tokens for backup Olympus server at 127.0.0.1\",\"tag\":\"EclairProvider\",\"pass\":\"pass\"}}"

Note: Olympus config is provided as a command line argument instead of a file because it contains private keys (the one for storage tokens and for Strike). Don't forget to use space before issuing a command (i.e. $ java -jar ..., NOT $java - jar ...) so it does not get recorded in history.