Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
209 changes: 209 additions & 0 deletions .docker/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
services:
bitcoin:
image: kajoseph/bitcoin-core:22.0
ports:
- "8333:8333"
networks:
default:
ipv4_address: 172.28.0.3
command:
-printtoconsole
-regtest=1
-txindex=1
-listen=1
-server=1
-dnsseed=0
-upnp=0
-port=8332
-rpcport=8333
-rpcallowip=172.0.0.0/8
-rpcbind=0.0.0.0
-rpcuser=bitcoinnode
-rpcpassword=local321
-fallbackfee=0.0002
-zmqpubrawblock=tcp://0.0.0.0:38332
-zmqpubrawtx=tcp://0.0.0.0:38333
restart: always

bitcoin-cash:
image: zquestz/bitcoin-cash-node:28.0.1
ports:
- "9333:9333"
networks:
default:
ipv4_address: 172.28.0.4
command:
bitcoind
-printtoconsole
-regtest=1
-txindex=1
-listen=1
-server=1
-dnsseed=0
-upnp=0
-port=9332
-rpcport=9333
-rpcallowip="172.0.0.0/8"
-rpcbind="bitcoin-cash"
-deprecatedrpc=generate
-discover=0
-rpcuser=cryptorpc
-rpcpassword=local321
restart: always

dogecoin:
image: casperstack/dogecoin
ports:
- "22555:22555"
networks:
default:
ipv4_address: 172.28.0.6
command:
dogecoind
-printtoconsole
-regtest=1
-txindex=1
-listen=1
-server=1
-dnsseed=0
-upnp=0
-port=22555
-rpcport=22555
-rpcallowip="172.0.0.0/8"
-rpcbind="dogecoin"
-deprecatedrpc=generate
-discover=0
-rpcuser=cryptorpc
-rpcpassword=local321
restart: always

geth:
image: ethereum/client-go:v1.14.13
volumes:
- ./test/docker/geth-keystore:/keystore
ports:
- "9545:8545"
networks:
default:
ipv4_address: 172.28.0.7
command:
--dev
--datadir /geth
--networkid 1337
--http
--http.api web3,eth,debug,net
--http.corsdomain '*'
--http.vhosts '*'
--http.addr 0.0.0.0
--http.port 8545
--keystore /keystore
--allow-insecure-unlock
--unlock 00a329c0648769a73afac7f9381e08fb43dbea72
--password /keystore/pw

rippled:
networks:
default:
ipv4_address: 172.28.0.8
build:
context: .
dockerfile: ./rippled.Dockerfile

litecoin:
image: uphold/litecoin-core:0.16.3
ports:
- "10333:10333"
networks:
default:
ipv4_address: 172.28.0.9
command:
-printtoconsole
-regtest=1
-txindex=1
-listen=1
-server=1
-irc=0
-dnsseed=0
-upnp=0
-port=10332
-rpcport=10333
-rpcallowip=172.0.0.0/8
-rpcbind="litecoin"
-rpcuser=cryptorpc
-rpcpassword=local321
restart: always

lightning:
image: lightninglabs/lnd:v0.14.1-beta
ports:
- "11009:11009"
volumes:
- my_data1:/root/.lnd
networks:
default:
ipv4_address: 172.28.0.5
command:
--tlsextraip=172.28.0.5
--tlsextradomain=lightning
--rpclisten=0.0.0.0:11009
--bitcoin.active
--bitcoin.regtest
--bitcoin.node=bitcoind
--bitcoind.rpchost=bitcoin:8333
--bitcoind.rpcuser=cryptorpc
--bitcoind.rpcpass=local321
--bitcoind.zmqpubrawblock=tcp://bitcoin:38332
--bitcoind.zmqpubrawtx=tcp://bitcoin:38333
restart: always

lightning2:
image: sbhat96/lnd-v0.14.1-beta:latest
ports:
- "11010:11010"
volumes:
- my_data2:/root/.lnd2
networks:
default:
ipv4_address: 172.28.0.10
command:
--lnddir=/root/.lnd2
--tlsextraip=172.28.0.10
--tlsextradomain=lightning
--rpclisten=0.0.0.0:11010
--bitcoin.active
--bitcoin.regtest
--bitcoin.node=bitcoind
--bitcoind.rpchost=bitcoin:8333
--bitcoind.rpcuser=cryptorpc
--bitcoind.rpcpass=local321
--bitcoind.zmqpubrawblock=tcp://bitcoin:38332
--bitcoind.zmqpubrawtx=tcp://bitcoin:38333
restart: always

solana:
image: solanalabs/solana:v1.18.26
networks:
default:
ipv4_address: 172.28.0.12
build:
context: .
dockerfile: ./test/docker/solana.Dockerfile
ports:
- "8899:8899"
- "8900:8900"
environment:
- RUST_LOG=solana=info

volumes:
my_data1:
driver: local
my_data2:
driver: local

networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.28.0.0/16
3 changes: 2 additions & 1 deletion .docker/rippled.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM node:18-bullseye
WORKDIR /.docker

RUN apt-get update
RUN apt-get install sudo
Expand All @@ -15,7 +16,7 @@ RUN sudo apt -y update
RUN sudo apt -y install rippled

RUN sudo rm /etc/opt/ripple/rippled.cfg
COPY ./.docker/rippled.cfg /home/docker
COPY ./rippled.cfg /home/docker
RUN sudo cp /home/docker/rippled.cfg /etc/opt/ripple/rippled.cfg

ENTRYPOINT ["sudo", "rippled", "-a", "--start", "--conf=/home/docker/rippled.cfg"]
Expand Down
22 changes: 22 additions & 0 deletions .docker/solana.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM node:lts-bullseye
WORKDIR /.docker
RUN npm install @solana/kit

# Use the official Solana image
FROM solanalabs/solana:v1.18.26

# Copy keypair files to the container
COPY ./solana/keypair/id.json /solana/keypair/id.json
COPY ./solana/keypair/id2.json /solana/keypair/id2.json
COPY ./solana/keypair/id3.json /solana/keypair/id3.json
COPY ./solana/keypair/validator.json /root/.config/solana/id.json

# Add a script to start the validator and fund the addresses
COPY ./solana/startSolana.sh /solana/startSolana.sh

# Make the script executable
RUN chmod +x /solana/startSolana.sh

ENTRYPOINT ["./solana/startSolana.sh"]
EXPOSE 8899
EXPOSE 8900
1 change: 1 addition & 0 deletions .docker/solana/keypair/id.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[116,69,205,66,216,181,214,32,36,171,241,160,150,232,188,235,103,123,252,48,214,24,3,3,62,30,86,207,200,244,51,112,125,28,121,144,126,16,219,102,36,155,53,86,197,85,53,212,14,162,165,146,107,170,151,139,23,187,186,201,157,175,125,199]
1 change: 1 addition & 0 deletions .docker/solana/keypair/id2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[19,189,139,88,24,12,146,155,177,19,9,59,186,134,90,197,54,198,110,190,228,206,214,210,197,3,136,89,194,202,118,20,111,175,224,31,149,241,173,89,124,232,38,93,248,58,106,3,88,205,241,132,179,247,87,188,201,124,78,151,39,146,242,210]
1 change: 1 addition & 0 deletions .docker/solana/keypair/id3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[111,197,242,14,118,44,66,203,60,194,40,110,92,232,238,66,8,252,188,88,11,83,103,105,48,172,125,30,146,126,150,226,209,157,201,11,117,149,72,146,24,180,136,1,49,113,203,216,165,60,57,180,135,207,103,204,255,56,145,144,182,123,224,245]
1 change: 1 addition & 0 deletions .docker/solana/keypair/validator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[50,57,96,110,221,151,159,36,174,191,52,239,243,169,72,157,10,95,137,220,237,228,197,172,118,74,37,66,217,252,56,97,183,145,113,187,216,48,172,206,249,11,61,133,155,192,8,176,80,159,150,207,99,148,128,70,36,230,216,146,105,54,202,22]
22 changes: 22 additions & 0 deletions .docker/solana/startSolana.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Start the Solana test validator
solana-test-validator --reset --ledger /solana/data > solana-validator.log & echo "Starting Solana"

# Wait for the validator to start
sleep 5

# Extract the public key from the keypair file
export PUBLIC_KEY=$(solana-keygen pubkey /solana/keypair/id.json)
export PUBLIC_KEY2=$(solana-keygen pubkey /solana/keypair/id2.json)
export PUBLIC_KEY3=$(solana-keygen pubkey /solana/keypair/id3.json)

# Airdrop SOL to the provided keypair
solana airdrop 100 $PUBLIC_KEY --url localhost
echo "Public Key1: $PUBLIC_KEY"
solana airdrop 100 $PUBLIC_KEY2 --url localhost
echo "Public Key2: $PUBLIC_KEY2"
echo "Public Key3: $PUBLIC_KEY3"

# Tail the logs
tail -f solana-validator.log
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,16 @@
"lerna:ci:all": "npx lerna run test:ci --concurrency 1 --stream",
"lerna:ci:unit": "npx run test:ci:unit --concurrency 1 --stream",
"lerna:ci:integration": "npx run test:ci:integration --concurrency 1 --stream",
"lerna:ci:coverage": "npx run coverage --concurrency 1 --stream"
"lerna:ci:coverage": "npx run coverage --concurrency 1 --stream",
"bitcoin": "docker compose -f .docker/compose.yaml up bitcoin -d",
"bitcoin-cash": "docker compose -f .docker/compose.yaml up bitcoin-cash -d",
"dogecoin": "docker compose -f .docker/compose.yaml up dogecoin -d",
"litecoin": "docker compose -f .docker/compose.yaml up litecoin -d",
"rippled": "docker compose -f .docker/compose.yaml up rippled -d",
"geth": "docker compose -f .docker/compose.yaml up geth -d",
"solana": "docker compose -f .docker/compose.yaml up solana -d",
"lightning": "docker compose -f .docker/compose.yaml up lightning -d",
"lightning2": "docker compose -f .docker/compose.yaml up lightning2 -d"
},
"config": {
"commitizen": {
Expand Down