forked from qtumproject/janus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated docker scripts, mock data and configs
- Loading branch information
Alex Belets
committed
Nov 22, 2024
1 parent
bca492c
commit 9f6a71a
Showing
20 changed files
with
261 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/janus-linux-amd64 | ||
/.qtum | ||
/eth-rpc-gate-linux-amd64 | ||
/.Kaon | ||
/supervisord.* | ||
/env.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM qtum/qtum | ||
FROM kaon/kaon | ||
|
||
COPY ./fill_user_account.sh ./ | ||
COPY ./populate_and_run.sh ./ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# Check if the kaond process is running | ||
if pgrep -x "kaond" > /dev/null | ||
then | ||
echo "kaond is running, executing stop command" | ||
docker exec kaon_mainnet kaon-cli stop | ||
sleep 3 #executing too fast causes some errors | ||
docker restart kaon_mainnet | ||
else | ||
echo "kaond is not running, restarting with -reindex" | ||
# Modify the restart command to include the -reindex parameter | ||
docker restart kaon_mainnet | ||
sleep 3 #executing too fast causes some errors | ||
docker exec kaon_mainnet kaond -reindex | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,47 @@ | ||
version: "3.3" | ||
|
||
networks: | ||
qtumd_mainnet_network: | ||
kaond_mainnet_network: | ||
volumes: | ||
qtumd_mainnet_volume: | ||
kaond_mainnet_volume: | ||
|
||
services: | ||
janus_mainnet: | ||
image: qtum/janus:latest | ||
container_name: janus_mainnet | ||
ethrpcgate_mainnet: | ||
image: kaon/eth-rpc-gate:latest | ||
container_name: ethrpcgate_mainnet | ||
build: | ||
context: ../../ | ||
cache_from: | ||
- golang:1.18-alpine | ||
ports: | ||
- "23890:23890" | ||
- "25996:25996" | ||
environment: | ||
- QTUM_RPC=http://qtum:testpasswd@qtum_mainnet:3890 | ||
- KAON_RPC=http://${RPC_USER}:${RPC_PASSWORD}@kaon_mainnet:51473 | ||
- COMPOSE_PROJECT_NAME=mainnet | ||
- FLAG_HIDE_KAOND_LOGS=true | ||
- HIDE_TCP_LOGS=true | ||
volumes: | ||
- ../standalone/myaccounts.txt:$GOPATH/github.com/qtumproject/janus/myaccounts.txt | ||
- ../standalone/myaccounts.txt:$GOPATH/github.com/kaonone/eth-rpc-gate/myaccounts.txt | ||
- ../../https:/https | ||
- ../../logs:/logs | ||
depends_on: | ||
- qtum_mainnet | ||
command: --bind 0.0.0.0 --port 23890 --ignoreTransactions --accounts $GOPATH/github.com/qtumproject/janus/myaccounts.txt --dev --https-key /https/key.pem --https-cert /https/cert.pem | ||
- kaon_mainnet | ||
command: --bind 0.0.0.0 --port 25996 --ignoreTransactions --accounts $GOPATH/github.com/kaonone/eth-rpc-gate/myaccounts.txt --https-key /https/key.pem --https-cert /https/cert.pem | ||
networks: | ||
- qtumd_mainnet_network | ||
- kaond_mainnet_network | ||
|
||
qtum_mainnet: | ||
kaon_mainnet: | ||
ports: | ||
- "3890:3890" | ||
image: qtum/qtum | ||
container_name: qtum_mainnet | ||
- "51473:51473" | ||
image: kaon/kaon | ||
container_name: kaon_mainnet | ||
environment: | ||
- COMPOSE_PROJECT_NAME=mainnet | ||
command: qtumd -txindex -addrindex=1 -rpcbind=0.0.0.0:3890 -rpcallowip=0.0.0.0/0 -rpcuser=qtum -rpcpassword=testpasswd -deprecatedrpc=accounts | ||
- RPC_USER=${RPC_USER} | ||
- RPC_PASSWORD=${RPC_PASSWORD} | ||
command: ["sh", "-c", "envsubst < /root/.Kaon/kaon.conf.mainnet.template > /root/.Kaon/kaon.conf && kaond"] | ||
volumes: | ||
- qtumd_mainnet_volume:/root/.qtum | ||
- kaond_mainnet_volume:/root/.Kaon | ||
- ./kaon.conf.mainnet.template:/root/.Kaon/kaon.conf.mainnet.template | ||
networks: | ||
- qtumd_mainnet_network | ||
- kaond_mainnet_network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,45 @@ | ||
version: "3.3" | ||
|
||
networks: | ||
qtumd_regtest_network: | ||
kaond_regtest_network: | ||
volumes: | ||
qtumd_regtest_volume: | ||
kaond_regtest_volume: | ||
|
||
services: | ||
janus_regtest: | ||
image: qtum/janus:dev | ||
container_name: janus_regtest | ||
ethrpcgate_regtest: | ||
image: kaon/eth-rpc-gate:dev | ||
container_name: ethrpcgate_regtest | ||
build: | ||
context: ../../ | ||
cache_from: | ||
- golang:1.18-alpine | ||
ports: | ||
- "23889:23889" | ||
- "25996:25996" | ||
environment: | ||
- QTUM_RPC=http://qtum:testpasswd@qtum_regtest:3889 | ||
- KAON_RPC=http://${RPC_USER}:${RPC_PASSWORD}@kaon_regtest:51474 | ||
- COMPOSE_PROJECT_NAME=regtest | ||
volumes: | ||
- ../standalone/myaccounts.txt:$GOPATH/github.com/qtumproject/janus/myaccounts.txt | ||
- ../standalone/myaccounts.txt:$GOPATH/github.com/kaonone/eth-rpc-gate/myaccounts.txt | ||
- ../../https:/https | ||
- ../../logs:/logs | ||
depends_on: | ||
- qtum_regtest | ||
command: --bind 0.0.0.0 --accounts $GOPATH/github.com/qtumproject/janus/myaccounts.txt --log-file /logs/janusLogs.txt --dev --https-key /https/key.pem --https-cert /https/cert.pem | ||
- kaon_regtest | ||
command: --bind 0.0.0.0 --accounts $GOPATH/github.com/kaonone/eth-rpc-gate/myaccounts.txt --log-file /logs/gateLogs.txt --dev --https-key /https/key.pem --https-cert /https/cert.pem | ||
networks: | ||
- qtumd_regtest_network | ||
- kaond_regtest_network | ||
|
||
qtum_regtest: | ||
kaon_regtest: | ||
ports: | ||
- "3889:3889" | ||
image: qtum/qtum | ||
container_name: qtum_regtest | ||
command: qtumd -regtest -txindex -addrindex=1 -rpcbind=0.0.0.0:3889 -rpcallowip=0.0.0.0/0 -logevents -rpcuser=qtum -rpcpassword=testpasswd -deprecatedrpc=accounts -printtoconsole | ||
- "51474:51474" | ||
image: kaon/kaon | ||
container_name: kaon_regtest | ||
environment: | ||
- COMPOSE_PROJECT_NAME=regtest | ||
- RPC_USER=${RPC_USER} | ||
- RPC_PASSWORD=${RPC_PASSWORD} | ||
command: ["sh", "-c", "envsubst < /root/.Kaon/kaon.conf.regtest.template > /root/.Kaon/kaon.conf && kaond"] | ||
volumes: | ||
- qtumd_regtest_volume:/root/.qtum | ||
- kaond_regtest_volume:/root/.Kaon | ||
- ./kaon.conf.regtest.template:/root/.Kaon/kaon.conf.regtest.template | ||
networks: | ||
- qtumd_regtest_network | ||
- kaond_regtest_network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,45 @@ | ||
version: "3.3" | ||
|
||
networks: | ||
qtumd_testnet_network: | ||
kaond_testnet_network: | ||
volumes: | ||
qtumd_testnet_volume: | ||
kaond_testnet_volume: | ||
|
||
services: | ||
janus_testnet: | ||
image: qtum/janus:dev | ||
container_name: janus_testchain | ||
ethrpcgate_testnet: | ||
image: kaon/eth-rpc-gate:dev | ||
container_name: ethrpcgate_testchain | ||
build: | ||
context: ../../ | ||
cache_from: | ||
- golang:1.18-alpine | ||
ports: | ||
- "23889:23889" | ||
- "25996:25996" | ||
environment: | ||
- QTUM_RPC=http://qtum:testpasswd@qtum_testnet:3889 | ||
- KAON_RPC=http://${RPC_USER}:${RPC_PASSWORD}@kaon_testnet:51474 | ||
- COMPOSE_PROJECT_NAME=testnet | ||
volumes: | ||
- ../standalone/myaccounts.txt:$GOPATH/github.com/qtumproject/janus/myaccounts.txt | ||
- ../standalone/myaccounts.txt:$GOPATH/github.com/kaonone/eth-rpc-gate/myaccounts.txt | ||
- ../../https:/https | ||
- ../../logs:/logs | ||
depends_on: | ||
- qtum_testnet | ||
command: --bind 0.0.0.0 --port 23889 --ignoreTransactions --accounts $GOPATH/github.com/qtumproject/janus/myaccounts.txt --dev --https-key /https/key.pem --https-cert /https/cert.pem | ||
- kaon_testnet | ||
command: --bind 0.0.0.0 --port 25996 --ignoreTransactions --accounts $GOPATH/github.com/kaonone/eth-rpc-gate/myaccounts.txt --dev --https-key /https/key.pem --https-cert /https/cert.pem | ||
networks: | ||
- qtumd_testnet_network | ||
- kaond_testnet_network | ||
|
||
qtum_testnet: | ||
kaon_testnet: | ||
ports: | ||
- "3889:3889" | ||
image: qtum/qtum | ||
container_name: qtum_testnet | ||
command: qtumd -testnet -txindex -addrindex=1 -rpcbind=0.0.0.0:3889 -rpcallowip=0.0.0.0/0 -logevents -rpcuser=qtum -rpcpassword=testpasswd -deprecatedrpc=accounts -printtoconsole | ||
- "51474:51474" | ||
image: kaon/kaon | ||
container_name: kaon_testnet | ||
environment: | ||
- COMPOSE_PROJECT_NAME=testnet | ||
- RPC_USER=${RPC_USER} | ||
- RPC_PASSWORD=${RPC_PASSWORD} | ||
command: ["sh", "-c", "envsubst < /root/.Kaon/kaon.conf.testnet.template > /root/.Kaon/kaon.conf && kaond"] | ||
volumes: | ||
- qtumd_testnet_volume:/root/.qtum | ||
- kaond_testnet_volume:/root/.Kaon | ||
- ./kaon.conf.testnet.template:/root/.Kaon/kaon.conf.testnet.template | ||
networks: | ||
- qtumd_testnet_network | ||
- kaond_testnet_network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
rpcuser=${RPC_USER} | ||
rpcpassword=${RPC_PASSWORD} | ||
dnsseed=0 | ||
upnp=0 | ||
daemon=1 | ||
server=1 | ||
staking=1 | ||
listen=1 | ||
maxconnections=256 | ||
rpcport=51473 | ||
rpcbind=0.0.0.0:51473 | ||
rpcallowip=0.0.0.0/0 | ||
txindex=1 | ||
txrlpindex=1 | ||
addrindex=1 | ||
deprecatedrpc=accounts | ||
|
||
rpcport=51474 | ||
# Options only for mainnet | ||
[main] | ||
port=9872 | ||
rpcport=51473 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
regtest=1 | ||
rpcuser=${RPC_USER} | ||
rpcpassword=${RPC_PASSWORD} | ||
dnsseed=0 | ||
upnp=0 | ||
debug=1 | ||
daemon=1 | ||
server=1 | ||
staking=1 | ||
listen=1 | ||
maxconnections=256 | ||
logtimestamps=1 | ||
txindex=1 | ||
txrlpindex=1 | ||
addrindex=1 | ||
logevents=1 | ||
printpriority=1 | ||
rpcport=51474 | ||
rpcbind=0.0.0.0:51474 | ||
rpcallowip=0.0.0.0/0 | ||
deprecatedrpc=accounts | ||
[main] | ||
port=9872 | ||
rpcport=51473 | ||
[regtest] | ||
# listen on different ports than default testnet | ||
port=5778 | ||
rpcport=51474 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
testnet=1 | ||
rpcuser=${RPC_USER} | ||
rpcpassword=${RPC_PASSWORD} | ||
dnsseed=0 | ||
upnp=0 | ||
debug=1 | ||
daemon=1 | ||
server=1 | ||
staking=1 | ||
listen=1 | ||
maxconnections=256 | ||
logtimestamps=1 | ||
txindex=1 | ||
txrlpindex=1 | ||
addrindex=1 | ||
logevents=1 | ||
printpriority=1 | ||
rpcport=51474 | ||
rpcbind=0.0.0.0:51474 | ||
rpcallowip=0.0.0.0/0 | ||
deprecatedrpc=accounts | ||
[main] | ||
port=9872 | ||
rpcport=51473 | ||
[testnet] | ||
# listen on different ports than default testnet | ||
port=5778 | ||
rpcport=51474 |
Oops, something went wrong.