Skip to content

Commit a2e1cf3

Browse files
Updated docker file to use the current directory as the code to build. Updated start_collator script to account for substrate binary parameter changes. Added a zombinet configuration file to run a local relay chain.
1 parent 0fd934b commit a2e1cf3

File tree

3 files changed

+35
-9
lines changed

3 files changed

+35
-9
lines changed

Dockerfile

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
FROM paritytech/ci-linux:dafdd6fb-20230127
1+
FROM paritytech/ci-linux:1.71.0-bullseye
22

3-
WORKDIR /var/www
3+
WORKDIR /var/www/hashed-substrate
44

5-
RUN git clone https://github.com/hashed-io/hashed-substrate-parachain.git hashed-substrate && cd hashed-substrate && git checkout main && cargo build --release
5+
COPY . .
6+
RUN cargo build --release
7+
# RUN git clone https://github.com/hashed-io/hashed-substrate-parachain.git hashed-substrate && cd hashed-substrate && git checkout main && cargo build --release
68

79
# COPY ./target/release/hashed-parachain .
810
# COPY ./resources/* resources/.

scripts/start_collator.sh

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env bash
22

33
# Run locally
4-
# ./target/release/hashed-parachain --collator --base-path /tmp/chain-170223/collator-data/ --force-authoring --port 40333 --ws-port 9946 --ws-external --rpc-external --rpc-cors all --rpc-methods unsafe --chain hashed -- --execution wasm --base-path /tmp/chain-170223/relay-data/ --chain ./resources/polkadot.json --port 30333 --ws-port 9944 --ws-external --rpc-external --rpc-cors all --rpc-methods unsafe --wasm-execution Compiled --pruning 10000
5-
# ./target/release/hashed-parachain --collator --base-path /tmp/chain-170223/collator-data/ --force-authoring --port 40333 --ws-port 9946 --ws-external --rpc-external --rpc-cors all --rpc-methods unsafe --chain /home/sebastian/Downloads/hashed-chain-spec-raw-170223.json -- --execution wasm --base-path /tmp/chain-170223/relay-data/ --chain ./resources/polkadot.json --port 30333 --ws-port 9944 --ws-external --rpc-external --rpc-cors all --rpc-methods unsafe --wasm-execution Compiled --pruning 10000
4+
# ./target/release/hashed-parachain --collator --base-path /tmp/chain-170223/collator-data/ --force-authoring --port 40333 --rpc-port 9946 --rpc-external --rpc-cors all --rpc-methods unsafe --chain hashed -- --execution wasm --base-path /tmp/chain-170223/relay-data/ --chain ./resources/polkadot.json --port 30333 --rpc-port 9944 --rpc-external --rpc-cors all --rpc-methods unsafe --wasm-execution Compiled --pruning 10000
5+
# ./target/release/hashed-parachain --collator --base-path /tmp/chain-170223/collator-data/ --force-authoring --port 40333 --rpc-port 9946 --rpc-external --rpc-cors all --rpc-methods unsafe --chain /home/sebastian/Downloads/hashed-chain-spec-raw-170223.json -- --execution wasm --base-path /tmp/chain-170223/relay-data/ --chain ./resources/polkadot.json --port 30333 --rpc-port 9944 --rpc-external --rpc-cors all --rpc-methods unsafe --wasm-execution Compiled --pruning 1000
66

77
usage="./start_collator.sh [hashed|luhn|md5] <base-data-path>"
88
if [ $# -ne 2 ]; then
@@ -34,8 +34,7 @@ collator_args=(
3434
--collator
3535
--base-path $2/collator-data/
3636
--force-authoring
37-
--ws-port 9946
38-
--ws-external
37+
--rpc-port 9946
3938
--rpc-external
4039
--rpc-cors all
4140
--rpc-methods unsafe
@@ -72,8 +71,7 @@ relay_args=(
7271
--base-path $2/relay-data/
7372
--chain $RESOURCES_PATH/${relay_chain}.json
7473
--port 30333
75-
--ws-port 9944
76-
--ws-external
74+
--rpc-port 9944
7775
--rpc-external
7876
--rpc-cors all
7977
--rpc-methods unsafe

zombienet/small_network.toml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[relaychain]
2+
default_image = "parity/polkadot:latest"
3+
default_command = "polkadot"
4+
chain = "rococo-local"
5+
6+
[[relaychain.nodes]]
7+
name = "alice"
8+
validator = true
9+
10+
[[relaychain.nodes]]
11+
name = "bob"
12+
validator = true
13+
14+
[[parachains]]
15+
id = 2000
16+
cumulus_based = true
17+
chain = "md5"
18+
19+
# run charlie as parachain collator
20+
[[parachains.collators]]
21+
name = "charlie"
22+
validator = true
23+
# image = "sebastianmontero/hashed-substrate-collator:latest"
24+
command = "../target/release/hashed-parachain"
25+
args = ["--force-authoring"]
26+
# args = ["--chain", "/var/www/hashed-substrate/md5-collator-raw-spec.json", "--force-authoring"]

0 commit comments

Comments
 (0)