git.delta.rocks / unique-network / refs/commits / 4fc7c3c8399c

difftreelog

Merge branch 'master' of https://github.com/usetech-llc/nft_parachain

str-mv2020-07-22parents: #5e168aa #bf3198e.patch.diff
in: master

5 files changed

modifiedDockerfile-testnetdiffbeforeafterboth
15#RUN git clone https://github.com/usetech-llc/nft_parachain /nft_parachain15#RUN git clone https://github.com/usetech-llc/nft_parachain /nft_parachain
16RUN mkdir nft_parachain16RUN mkdir nft_parachain
17WORKDIR /nft_parachain17WORKDIR /nft_parachain
18COPY . .
1918
20RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \19RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
21 export PATH="$PATH:$HOME/.cargo/bin" && \20 export PATH="$PATH:$HOME/.cargo/bin" && \
25 rustup target add wasm32-unknown-unknown --toolchain $WASM_TOOLCHAIN && \24 rustup target add wasm32-unknown-unknown --toolchain $WASM_TOOLCHAIN && \
26 rustup target list --installed && \25 rustup target list --installed && \
27 rustup show26 rustup show
27
28COPY . .
2829
29RUN export PATH="$PATH:$HOME/.cargo/bin" && \30RUN export PATH="$PATH:$HOME/.cargo/bin" && \
30 cargo build "--$PROFILE" 31 cargo build "--$PROFILE"
modifieddeploy-testnet.shdiffbeforeafterboth
13### Build and run Einstein node (bootnode) and Newton node13### Build and run Einstein node (bootnode) and Newton node
14docker-compose -f docker-compose-testnet.yml up -d --build14docker-compose -f docker-compose-testnet.yml up -d --build
15
16sleep 30
1517
16### Deploy aura store keys18### Deploy aura store keys
17# Einstein19# Einstein
27# Newton29# Newton
28curl 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"
31
32sleep 30
2933
30### Stop and restart nodes so that they start finalizing34### Stop and restart nodes so that they start finalizing
31docker-compose -f docker-compose-testnet.yml down35docker stop nft_parachain_node_einstein_1
32docker-compose -f docker-compose-testnet.yml up -d36docker stop nft_parachain_node_newton_1
37docker stop nft_parachain_node_bohr_1
38docker start nft_parachain_node_einstein_1
39docker start nft_parachain_node_newton_1
40docker start nft_parachain_node_bohr_1
3341
34### Cleanup42### Cleanup
3543
39# Delete store key files47# Delete store key files
40rm ./einstein_store_key.json48rm ./einstein_store_key.json
41rm ./newton_store_key.json49rm ./newton_store_key.json
50rm ./einstein_store_key_grandpa.json
51rm ./newton_store_key_grandpa.json
4252
modifieddocker-compose-testnet.ymldiffbeforeafterboth
4 node_einstein:4 node_einstein:
5 image: nft-parachain5 image: nft-parachain
6 ports:6 ports:
7 - 9944:9944
8 - 9935:99357 - 9935:9935
9 build:8 build:
10 context: ./9 context: ./
17 environment:16 environment:
18 - NODE=einstein17 - NODE=einstein
19 - P2PPORT=3033518 - P2PPORT=30335
20 - WSPORT=994419 - WSPORT=9945
21 - RPCPORT=993520 - RPCPORT=9935
22 - BOOTNODE=True21 - BOOTNODE=True
22 - VALIDATOR=True
2323
24 node_newton:24 node_newton:
25 image: nft-parachain25 image: nft-parachain
26 ports:26 ports:
27 - 9946:9946
28 - 9936:993627 - 9936:9936
29 build:28 build:
30 context: ./29 context: ./
41 - RPCPORT=993640 - RPCPORT=9936
42 - BOOTNODE=False41 - BOOTNODE=False
43 - BOOTPORT=3033542 - BOOTPORT=30335
44 - BOOTID=12D3KooWRYNrSRQvJ73esUhpyETQNJWGfC2LQ9dW3HJtzHJM28Hc43 - BOOTID=12D3KooWRLrjXxByPkSCzcsRyf6652brnJT9s4AQHR3uujJ35mxz
4544 - VALIDATOR=True
45
46 node_bohr:
47 image: nft-parachain
48 ports:
49 - 9944:9944
50 build:
51 context: ./
52 dockerfile: Dockerfile-testnet
53 volumes:
54 - ./chain-data-bohr:/chain-data
55 networks:
56 - substrate_network
57 restart: always
58 environment:
59 - NODE=bohr
60 - P2PPORT=30334
61 - WSPORT=9944
62 - RPCPORT=9934
63 - BOOTNODE=False
64 - BOOTPORT=30335
65 - BOOTID=12D3KooWRLrjXxByPkSCzcsRyf6652brnJT9s4AQHR3uujJ35mxz
66 - VALIDATOR=False
67
46networks: 68networks:
47 substrate_network:69 substrate_network:
modifiedrun-testnet.shdiffbeforeafterboth
8echo RPC Port : $RPCPORT8echo RPC Port : $RPCPORT
99
10echo Boot = $BOOTNODE10echo Boot = $BOOTNODE
11echo Validator = $VALIDATOR
1112
12if [ "$BOOTNODE" = True ]; 13if [ "$BOOTNODE" = True ];
13then14then
14echo This is a Bootnode;15echo This is a Bootnode;
15BOOTNODES="";16BOOTNODES="";
17NODEKEY="--node-key-file einstein_key_file";
16else18else
17echo Bootnode Port : $BOOTPORT19echo Bootnode Port : $BOOTPORT;
18echo Bootnode PeerID : $BOOTID20echo Bootnode PeerID : $BOOTID;
19BOOTNODES="--bootnodes /dns4/node_einstein/tcp/$BOOTPORT/p2p/$BOOTID";21BOOTNODES="--bootnodes /dns4/node_einstein/tcp/$BOOTPORT/p2p/$BOOTID";
22NODEKEY="";
20fi23fi
2124
25if [ "$VALIDATOR" = True ];
26then
27echo This is a Validator node;
22/usr/local/bin/nft \28/usr/local/bin/nft \
23 --base-path /chain-data \29 --base-path /chain-data \
24 --chain ./nftTestnetSpecRaw.json \30 --chain ./nftTestnetSpecRaw.json \
32 --rpc-external \38 --rpc-external \
33 -lruntime \39 -lruntime \
34 $BOOTNODES40 $BOOTNODES \
41 $NODEKEY;
42else
43echo This is a Gateway node;
44/usr/local/bin/nft \
45 --base-path /chain-data \
46 --chain ./nftTestnetSpecRaw.json \
47 --port $P2PPORT \
48 --ws-port $WSPORT \
49 --rpc-port $RPCPORT \
50 --name $NODE \
51 --ws-external \
52 --rpc-cors all \
53 -lruntime \
54 $BOOTNODES;
55fi
3556
36
addedupload_secrets.shdiffbeforeafterboth

no changes