Skip to content

Instantly share code, notes, and snippets.

@insipx
Created August 11, 2023 17:25
Show Gist options
  • Save insipx/09fd20cb7bb184644a681d734d2c8383 to your computer and use it in GitHub Desktop.
Save insipx/09fd20cb7bb184644a681d734d2c8383 to your computer and use it in GitHub Desktop.
Launch
#!/bin/bash
RELAY_PEER_ID=$(curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "system_localPeerId"}' http://localhost:9955 | jq -r '.result')
./target/release/matrix --alice \
--force-authoring \
--collator \
--chain ./realdata-efinity.dev.json \
--base-path /tmp/parachain/alice \
--port 40446 \
--rpc-port 8844 \
-l runtime=debug,parachain=debug,system=debug,sc_basic_authorship=debug,cumulus-consensus=trace,cumulus-collator=trace,collator_protocol=trace,collation_generation=trace,aura=debug \
-- \
--execution wasm \
--chain ./realdata-enjin.dev.json \
--port 30447 \
--rpc-port 9988 --bootnodes /dns/127.0.0.1/tcp/30444/p2p/$RELAY_PEER_ID &> alice.log &
# Get peerid of Alice collator
sleep 20
COLLATOR_PEER_ID=$(curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "system_localPeerId"}' http://localhost:8844 | jq -r '.result')
echo "COLLATOR"
echo $COLLATOR_PEER_ID
./target/release/matrix --bob \
--force-authoring \
--collator \
--chain ./realdata-efinity.dev.json \
--base-path /tmp/parachain/bob \
--port 40447 \
--rpc-port 8855 \
-l runtime=debug,parachain=debug,system=debug,sc_basic_authorship=debug,cumulus-consensus=trace,cumulus-collator=trace,collator_protocol=trace,collation_generation=trace,aura=debug \
--bootnodes /dns/127.0.0.1/tcp/40446/p2p/$COLLATOR_PEER_ID \
-- \
--execution wasm \
--chain ./realdata-enjin.dev.json \
--port 30448 \
--rpc-port 9989 --bootnodes /dns/127.0.0.1/tcp/30444/p2p/$RELAY_PEER_ID &> bob.log &
#!/bin/bash
./target/release/enjin \
--alice --force-authoring \
--validator \
--base-path /tmp/relay/alice \
--chain ./realdata-enjin.dev.json \
--port 30444 \
-lsystem=debug,runtime=debug,parachain=debug,sc_basic_authorship=debug \
--rpc-port 9955 &> alice.log &
sleep 4
PEER_ID=$(curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "system_localPeerId"}' http://localhost:9955 | jq -r '.result')
echo $PEER_ID
./target/release/enjin \
--bob --force-authoring \
--validator \
--base-path /tmp/relay/bob \
--chain ./realdata-enjin.dev.json \
--port 30445 \
--rpc-port 9956 \
--bootnodes /dns/127.0.0.1/tcp/30444/p2p/$PEER_ID &> bob.log &
./target/release/enjin \
--charlie --force-authoring \
--validator \
--base-path /tmp/relay/charlie \
--chain ./realdata-enjin.dev.json \
--port 30446 \
--rpc-port 9957 \
--bootnodes /dns/127.0.0.1/tcp/30444/p2p/$PEER_ID &> charlie.log &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment