diff --git a/docker-compose-etcd-notls.yml b/docker-compose-etcd-notls.yml new file mode 100644 index 0000000..e886132 --- /dev/null +++ b/docker-compose-etcd-notls.yml @@ -0,0 +1,75 @@ +version: '3.4' +services: + bitcoind: + image: kylemanna/bitcoind + volumes: + - ./bitcoin.conf:/bitcoin/.bitcoin/bitcoin.conf + + etcd-alice: + restart: unless-stopped + image: 'bitnami/etcd:3.4.16' + environment: + - ALLOW_NONE_AUTHENTICATION=yes + - ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 + - ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379 + - ETCD_MAX_TXN_OPS=16384 + - ETCD_MAX_REQUEST_BYTES=104857600 + + etcd-bob: + restart: unless-stopped + image: 'bitnami/etcd:3.4.16' + environment: + - ALLOW_NONE_AUTHENTICATION=yes + - ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 + - ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379 + - ETCD_MAX_TXN_OPS=16384 + - ETCD_MAX_REQUEST_BYTES=104857600 + + lnd-alice: + restart: unless-stopped + build: + context: lnd + args: + checkout: v0.13.0-beta.rc5 + tags: signrpc walletrpc chainrpc invoicesrpc monitoring kvdb_etcd + depends_on: + - bitcoind + - etcd-alice + volumes: + - ./lnd.conf:/root/.lnd/lnd.conf + - lnd-alice:/cfg + ports: + - 5000:5000 + command: --tlsextradomain=lnd-alice --db.backend=etcd --db.etcd.host=etcd-alice:2379 --db.etcd.disabletls + + lnd-bob: + restart: unless-stopped + build: + context: lnd + args: + checkout: v0.13.0-beta.rc5 + tags: signrpc walletrpc chainrpc invoicesrpc monitoring kvdb_etcd + depends_on: + - bitcoind + - etcd-bob + volumes: + - ./lnd.conf:/root/.lnd/lnd.conf + - lnd-bob:/cfg + ports: + - 5001:5000 + command: --tlsextradomain=lnd-bob --db.backend=etcd --db.etcd.host=etcd-bob:2379 --db.etcd.disabletls + + loadtest: + build: loadtest + depends_on: + - lnd-alice + - lnd-bob + volumes: + - lnd-alice:/lnd-alice + - lnd-bob:/lnd-bob + - ./${LOADTEST_CONFIG_FILE}:/loadtest.yml + +volumes: + lnd-alice: + lnd-bob: + diff --git a/docker-compose-etcd.yml b/docker-compose-etcd.yml index 976c4e9..d2ecf7f 100644 --- a/docker-compose-etcd.yml +++ b/docker-compose-etcd.yml @@ -7,7 +7,7 @@ services: etcd-alice: restart: unless-stopped - image: 'bitnami/etcd:3.3.10' + image: 'bitnami/etcd:3.4.16' environment: - ALLOW_NONE_AUTHENTICATION=yes - ETCD_LISTEN_CLIENT_URLS=https://0.0.0.0:2379 @@ -18,7 +18,7 @@ services: etcd-bob: restart: unless-stopped - image: 'bitnami/etcd:3.3.10' + image: 'bitnami/etcd:3.4.16' environment: - ALLOW_NONE_AUTHENTICATION=yes - ETCD_LISTEN_CLIENT_URLS=https://0.0.0.0:2379 @@ -32,7 +32,7 @@ services: build: context: lnd args: - checkout: v0.12.1-beta + checkout: v0.13.0-beta.rc5 tags: signrpc walletrpc chainrpc invoicesrpc monitoring kvdb_etcd depends_on: - bitcoind @@ -49,7 +49,7 @@ services: build: context: lnd args: - checkout: v0.12.1-beta + checkout: v0.13.0-beta.rc5 tags: signrpc walletrpc chainrpc invoicesrpc monitoring kvdb_etcd depends_on: - bitcoind @@ -74,4 +74,4 @@ services: volumes: lnd-alice: lnd-bob: - \ No newline at end of file + diff --git a/loadtest/cmd_setup.go b/loadtest/cmd_setup.go index 74a0b70..dac834a 100644 --- a/loadtest/cmd_setup.go +++ b/loadtest/cmd_setup.go @@ -73,44 +73,67 @@ func setup(_ *cli.Context) error { return err } - log.Infow("Fund sender") + log.Infow("Fund sender and receiver") senderClient, err := getNodeConnection(&cfg.Sender) if err != nil { return err } defer senderClient.Close() - addrResp, err := senderClient.NewAddress() + receiverClient, err := getNodeConnection(&cfg.Receiver) + if err != nil { + return err + } + defer receiverClient.Close() + + addrSenderResp, err := senderClient.NewAddress() + if err != nil { + return err + } + + log.Infow("Generated funding address for sender", "address", addrSenderResp) + + addrReceiverResp, err := receiverClient.NewAddress() + if err != nil { + return err + } + + log.Infow("Generated funding address for receiver", "address", addrReceiverResp) + + senderAddr, err := btcutil.DecodeAddress(addrSenderResp, &chaincfg.RegressionNetParams) if err != nil { return err } - log.Infow("Generated funding address", "address", addrResp) - senderAddr, err := btcutil.DecodeAddress(addrResp, &chaincfg.RegressionNetParams) + receiverAddr, err := btcutil.DecodeAddress(addrReceiverResp, &chaincfg.RegressionNetParams) if err != nil { return err } + _, err = bitcoindConn.GenerateToAddress(1, senderAddr, nil) if err != nil { return err } - log.Infow("Mature coin") + _, err = bitcoindConn.GenerateToAddress(1, receiverAddr, nil) + if err != nil { + return err + } + + log.Infow("Mature coins") _, err = bitcoindConn.GenerateToAddress(105, addr, nil) if err != nil { return err } - log.Infow("Wait for coin to appear in wallet") + log.Infow("Wait for coin to appear in wallets") if err := senderClient.HasFunds(); err != nil { return err } - receiverClient, err := getNodeConnection(&cfg.Receiver) - if err != nil { + if err := receiverClient.HasFunds(); err != nil { return err } - defer receiverClient.Close() infoResp, err := receiverClient.GetInfo() if err != nil { diff --git a/run.sh b/run.sh index c169224..fb6f2db 100755 --- a/run.sh +++ b/run.sh @@ -2,7 +2,7 @@ if [[ $1 == "" ]] then - echo "usage: run.sh lnd-bbolt | lnd-bbolt-keysend | lnd-etcd | lnd-etcd-cluster | clightning | eclair" + echo "usage: run.sh lnd-bbolt | lnd-bbolt-keysend | lnd-etcd | lnd-etcd-notls | lnd-etcd-notls-keysend | lnd-etcd-cluster | clightning | eclair" exit 0 fi @@ -21,6 +21,16 @@ case $1 in DOCKER_COMPOSE_FILE=docker-compose-etcd.yml export LOADTEST_CONFIG_FILE=loadtest-lnd.yml ;; + + "lnd-etcd-notls") + DOCKER_COMPOSE_FILE=docker-compose-etcd-notls.yml + export LOADTEST_CONFIG_FILE=loadtest-lnd.yml + ;; + + "lnd-etcd-notls-keysend") + DOCKER_COMPOSE_FILE=docker-compose-etcd-notls.yml + export LOADTEST_CONFIG_FILE=loadtest-lnd-keysend.yml + ;; "lnd-etcd-cluster") DOCKER_COMPOSE_FILE=docker-compose-etcd-cluster.yml