difftreelog
Merge branch 'master' of https://github.com/usetech-llc/nft_parachain
in: master
5 files changed
Dockerfile-testnetdiffbeforeafterboth--- a/Dockerfile-testnet
+++ b/Dockerfile-testnet
@@ -15,7 +15,6 @@
#RUN git clone https://github.com/usetech-llc/nft_parachain /nft_parachain
RUN mkdir nft_parachain
WORKDIR /nft_parachain
-COPY . .
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
export PATH="$PATH:$HOME/.cargo/bin" && \
@@ -26,6 +25,8 @@
rustup target list --installed && \
rustup show
+COPY . .
+
RUN export PATH="$PATH:$HOME/.cargo/bin" && \
cargo build "--$PROFILE"
# && \
deploy-testnet.shdiffbeforeafterboth13### Build and run Einstein node (bootnode) and Newton node13### Build and run Einstein node (bootnode) and Newton node14docker-compose -f docker-compose-testnet.yml up -d --build14docker-compose -f docker-compose-testnet.yml up -d --build1516sleep 30151716### Deploy aura store keys18### Deploy aura store keys17# Einstein19# Einstein27# Newton29# Newton28curl http://localhost:9936 -H "Content-Type:application/json;charset=utf-8" -d "@./newton_store_key_grandpa.json"30curl http://localhost:9936 -H "Content-Type:application/json;charset=utf-8" -d "@./newton_store_key_grandpa.json"3132sleep 30 293330### Stop and restart nodes so that they start finalizing34### Stop and restart nodes so that they start finalizing31docker-compose -f docker-compose-testnet.yml down35docker stop nft_parachain_node_einstein_132docker-compose -f docker-compose-testnet.yml up -d36docker stop nft_parachain_node_newton_137docker stop nft_parachain_node_bohr_138docker start nft_parachain_node_einstein_139docker start nft_parachain_node_newton_140docker start nft_parachain_node_bohr_1334134### Cleanup42### Cleanup354339# Delete store key files47# Delete store key files40rm ./einstein_store_key.json48rm ./einstein_store_key.json41rm ./newton_store_key.json49rm ./newton_store_key.json50rm ./einstein_store_key_grandpa.json51rm ./newton_store_key_grandpa.json4252docker-compose-testnet.ymldiffbeforeafterboth--- a/docker-compose-testnet.yml
+++ b/docker-compose-testnet.yml
@@ -4,7 +4,6 @@
node_einstein:
image: nft-parachain
ports:
- - 9944:9944
- 9935:9935
build:
context: ./
@@ -17,14 +16,14 @@
environment:
- NODE=einstein
- P2PPORT=30335
- - WSPORT=9944
+ - WSPORT=9945
- RPCPORT=9935
- BOOTNODE=True
+ - VALIDATOR=True
node_newton:
image: nft-parachain
ports:
- - 9946:9946
- 9936:9936
build:
context: ./
@@ -41,8 +40,31 @@
- RPCPORT=9936
- BOOTNODE=False
- BOOTPORT=30335
- - BOOTID=12D3KooWRYNrSRQvJ73esUhpyETQNJWGfC2LQ9dW3HJtzHJM28Hc
+ - BOOTID=12D3KooWRLrjXxByPkSCzcsRyf6652brnJT9s4AQHR3uujJ35mxz
+ - VALIDATOR=True
+ node_bohr:
+ image: nft-parachain
+ ports:
+ - 9944:9944
+ build:
+ context: ./
+ dockerfile: Dockerfile-testnet
+ volumes:
+ - ./chain-data-bohr:/chain-data
+ networks:
+ - substrate_network
+ restart: always
+ environment:
+ - NODE=bohr
+ - P2PPORT=30334
+ - WSPORT=9944
+ - RPCPORT=9934
+ - BOOTNODE=False
+ - BOOTPORT=30335
+ - BOOTID=12D3KooWRLrjXxByPkSCzcsRyf6652brnJT9s4AQHR3uujJ35mxz
+ - VALIDATOR=False
+
networks:
substrate_network:
driver: bridge
run-testnet.shdiffbeforeafterboth--- a/run-testnet.sh
+++ b/run-testnet.sh
@@ -8,17 +8,23 @@
echo RPC Port : $RPCPORT
echo Boot = $BOOTNODE
+echo Validator = $VALIDATOR
if [ "$BOOTNODE" = True ];
then
echo This is a Bootnode;
BOOTNODES="";
+NODEKEY="--node-key-file einstein_key_file";
else
-echo Bootnode Port : $BOOTPORT
-echo Bootnode PeerID : $BOOTID
+echo Bootnode Port : $BOOTPORT;
+echo Bootnode PeerID : $BOOTID;
BOOTNODES="--bootnodes /dns4/node_einstein/tcp/$BOOTPORT/p2p/$BOOTID";
+NODEKEY="";
fi
+if [ "$VALIDATOR" = True ];
+then
+echo This is a Validator node;
/usr/local/bin/nft \
--base-path /chain-data \
--chain ./nftTestnetSpecRaw.json \
@@ -31,5 +37,19 @@
--ws-external \
--rpc-external \
-lruntime \
- $BOOTNODES
-
+ $BOOTNODES \
+ $NODEKEY;
+else
+echo This is a Gateway node;
+/usr/local/bin/nft \
+ --base-path /chain-data \
+ --chain ./nftTestnetSpecRaw.json \
+ --port $P2PPORT \
+ --ws-port $WSPORT \
+ --rpc-port $RPCPORT \
+ --name $NODE \
+ --ws-external \
+ --rpc-cors all \
+ -lruntime \
+ $BOOTNODES;
+fi
upload_secrets.shdiffbeforeafterboth--- /dev/null
+++ b/upload_secrets.sh
@@ -0,0 +1,7 @@
+scp -P 8022 ./einstein_key_file developer@212.248.19.53:~/nft_parachain/einstein_key_file
+
+scp -P 8022 ./einstein_store_key.json developer@212.248.19.53:~/nft_parachain/einstein_store_key.json
+scp -P 8022 ./newton_store_key.json developer@212.248.19.53:~/nft_parachain/newton_store_key.json
+
+scp -P 8022 ./einstein_store_key_grandpa.json developer@212.248.19.53:~/nft_parachain/einstein_store_key_grandpa.json
+scp -P 8022 ./newton_store_key_grandpa.json developer@212.248.19.53:~/nft_parachain/newton_store_key_grandpa.json