Skip to content

Commit 480b247

Browse files
Add NETWORK_ID variable (#2330)
Same variable BOOTNODE_PORT was used for p2p port of bootnode and testnet Chain and Network ID. Adding variable NETWORK_ID to make scripts less confusing and create option to choose arbitrary ID. Co-authored-by: Mário Havel <[email protected]> Co-authored-by: Michael Sproul <[email protected]>
1 parent cb47388 commit 480b247

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

scripts/local_testnet/ganache_test_node.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ ganache-cli \
99
--mnemonic "$ETH1_NETWORK_MNEMONIC" \
1010
--port 8545 \
1111
--blockTime 3 \
12-
--networkId 4242 \
13-
--chainId 4242
12+
--networkId "$NETWORK_ID" \
13+
--chainId "$NETWORK_ID"

scripts/local_testnet/setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ lcli \
3030
--min-genesis-time $GENESIS_TIME \
3131
--genesis-delay $GENESIS_DELAY \
3232
--genesis-fork-version $GENESIS_FORK_VERSION \
33-
--eth1-id $BOOTNODE_PORT \
33+
--eth1-id $NETWORK_ID \
3434
--eth1-follow-distance 1 \
3535
--seconds-per-eth1-block 1 \
3636
--force
@@ -54,4 +54,4 @@ lcli \
5454
--testnet-dir $TESTNET_DIR \
5555
$GENESIS_VALIDATOR_COUNT
5656

57-
echo Created genesis state in $TESTNET_DIR
57+
echo Created genesis state in $TESTNET_DIR

scripts/local_testnet/vars.env

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,9 @@ GENESIS_VALIDATOR_COUNT=80
1919
NODE_COUNT=4
2020

2121
GENESIS_DELAY=180
22+
23+
# Port for P2P communication with bootnode
2224
BOOTNODE_PORT=4242
25+
26+
# Network ID and Chain ID of local eth1 test network
27+
NETWORK_ID=4242

0 commit comments

Comments
 (0)