Skip to content

Commit b3578dd

Browse files
authored
Merge pull request #390 from subspace/update-executor-readme
Update executor README
2 parents 8abea11 + ef66c9d commit b3578dd

File tree

1 file changed

+37
-75
lines changed

1 file changed

+37
-75
lines changed

cumulus/node/README.md

Lines changed: 37 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -7,105 +7,67 @@
77
Compile all the binaries:
88

99
```bash
10-
$ cargo build --release
10+
$ cargo build --release --bin subspace-farmer --bin subspace-node
1111
```
1212

1313
### Spin up a local testnet
1414

15-
1. Run a primary node.
15+
1. Run a primary node with an executor Alice running in authority mode.
1616

1717
```bash
18-
$ ./target/release/subspace-node --dev -d tmp --log=txpool=trace,gossip::executor=trace
19-
2022-04-16 11:40:57.269 INFO main sc_cli::runner: Subspace
20-
2022-04-16 11:40:57.269 INFO main sc_cli::runner: ✌️ version 0.1.0-ab4a59751
21-
2022-04-16 11:40:57.269 INFO main sc_cli::runner: ❤️ by Subspace Labs <https://subspace.network>, 2021-2022
22-
2022-04-16 11:40:57.269 INFO main sc_cli::runner: 📋 Chain specification: Development
23-
2022-04-16 11:40:57.269 INFO main sc_cli::runner: 🏷 Node name: harmonious-feast-4450
24-
2022-04-16 11:40:57.269 INFO main sc_cli::runner: 👤 Role: AUTHORITY
25-
2022-04-16 11:40:57.269 INFO main sc_cli::runner: 💾 Database: RocksDb at tmp/chains/dev/db/full
26-
2022-04-16 11:40:57.269 INFO main sc_cli::runner: ⛓ Native runtime: subspace-100 (subspace-1.tx1.au1)
27-
2022-04-16 11:40:57.484 INFO main sc_service::client::client: 🔨 Initializing Genesis block/state (state: 0x12cf…0724, header-hash: 0x42de…9335)
28-
2022-04-16 11:40:57.635 INFO main subspace: Starting archiving from genesis
29-
2022-04-16 11:40:57.667 INFO main subspace: Archiving already produced blocks 0..=0
30-
2022-04-16 11:40:57.756 WARN main sc_service::config: Using default protocol ID "sup" because none is configured in the chain specs
31-
2022-04-16 11:40:57.757 INFO main sub-libp2p: 🏷 Local node identity is: 12D3KooWMQYGEy2eEcci2RoLZSiBdMj34UjipYR4GryjHkNsDXYW
32-
2022-04-16 11:40:57.759 INFO main subspace: 🧑‍🌾 Starting Subspace Authorship worker
33-
2022-04-16 11:40:57.768 INFO main sc_sysinfo: 💻 Operating system: linux
34-
2022-04-16 11:40:57.768 INFO main sc_sysinfo: 💻 CPU architecture: x86_64
35-
2022-04-16 11:40:57.768 INFO main sc_sysinfo: 💻 Target environment: gnu
36-
2022-04-16 11:40:57.768 INFO main sc_sysinfo: 💻 CPU: AMD Ryzen 9 5900X 12-Core Processor
37-
2022-04-16 11:40:57.768 INFO main sc_sysinfo: 💻 CPU cores: 12
38-
2022-04-16 11:40:57.768 INFO main sc_sysinfo: 💻 Memory: 64252MB
39-
2022-04-16 11:40:57.768 INFO main sc_sysinfo: 💻 Kernel: 5.13.0-35-generic
40-
2022-04-16 11:40:57.768 INFO main sc_sysinfo: 💻 Linux distribution: Ubuntu 20.04.4 LTS
41-
2022-04-16 11:40:57.768 INFO main sc_sysinfo: 💻 Virtual machine: no
42-
2022-04-16 11:40:57.768 INFO main sc_service::builder: 📦 Highest known block at #0
43-
2022-04-16 11:40:57.768 INFO main parity_ws: Listening for new connections on 127.0.0.1:9944.
44-
2022-04-16 11:40:57.811 INFO ThreadId(84) parity_ws::io: Accepted a new tcp connection from 127.0.0.1:58000.
45-
2022-04-16 11:41:02.768 INFO tokio-runtime-worker substrate: 💤 Idle (0 peers), best: #0 (0x42de…9335), finalized #0 (0x42de…9335), ⬇ 0 ⬆ 0
46-
18+
$ ./target/release/subspace-node --dev -d tmp --log=runtime=debug -- --alice --dev --port 40333 --rpc-port 8845 --ws-port 8846
19+
2022-04-24 17:00:27.700 INFO main sc_cli::runner: Subspace
20+
2022-04-24 17:00:27.700 INFO main sc_cli::runner: ✌️ version 0.1.0-98f7e25b9
21+
2022-04-24 17:00:27.700 INFO main sc_cli::runner: ❤️ by Subspace Labs <https://subspace.network>, 2021-2022
22+
2022-04-24 17:00:27.700 INFO main sc_cli::runner: 📋 Chain specification: Subspace development
23+
2022-04-24 17:00:27.701 INFO main sc_cli::runner: 🏷 Node name: squeamish-notebook-7882
24+
2022-04-24 17:00:27.701 INFO main sc_cli::runner: 👤 Role: AUTHORITY
25+
2022-04-24 17:00:27.701 INFO main sc_cli::runner: 💾 Database: RocksDb at tmp/chains/subspace_dev/db/full
26+
2022-04-24 17:00:27.701 INFO main sc_cli::runner: ⛓ Native runtime: subspace-101 (subspace-1.tx1.au1)
27+
2022-04-24 17:00:27.873 INFO main sc_service::client::client: [PrimaryChain] 🔨 Initializing Genesis block/state (state: 0x1727…4544, header-hash: 0xa3b7…a36c)
28+
2022-04-24 17:00:28.003 INFO main subspace: [PrimaryChain] Starting archiving from genesis
29+
2022-04-24 17:00:28.028 INFO main subspace: [PrimaryChain] Archiving already produced blocks 0..=0
30+
2022-04-24 17:00:28.093 WARN main sc_service::config: [PrimaryChain] Using default protocol ID "sup" because none is configured in the chain specs
31+
2022-04-24 17:00:28.094 INFO main sub-libp2p: [PrimaryChain] 🏷 Local node identity is: 12D3KooWEna4n2m3B6EKXQE1jZhQ5sfYcr9TpVmr8Yk9S8zCpnm4
32+
2022-04-24 17:00:28.096 INFO main subspace: [PrimaryChain] 🧑‍🌾 Starting Subspace Authorship worker
33+
2022-04-24 17:00:28.099 INFO main sc_sysinfo: [PrimaryChain] 💻 Operating system: macos
34+
2022-04-24 17:00:28.099 INFO main sc_sysinfo: [PrimaryChain] 💻 CPU architecture: aarch64
35+
2022-04-24 17:00:28.099 INFO main sc_service::builder: [PrimaryChain] 📦 Highest known block at #0
36+
2022-04-24 17:00:28.099 INFO tokio-runtime-worker substrate_prometheus_endpoint: [PrimaryChain] 〽️ Prometheus exporter started at 127.0.0.1:9615
37+
2022-04-24 17:00:28.100 INFO main parity_ws: [PrimaryChain] Listening for new connections on 127.0.0.1:9944.
38+
2022-04-24 17:00:28.100 WARN main sc_cli::commands::run_cmd: [SecondaryChain] Running in --dev mode, RPC CORS has been disabled.
39+
2022-04-24 17:00:28.235 INFO main sc_service::client::client: [SecondaryChain] 🔨 Initializing Genesis block/state (state: 0x8e63…66a2, header-hash: 0x35d4…5e4f)
40+
2022-04-24 17:00:28.235 WARN main sc_service::config: [SecondaryChain] Using default protocol ID "sup" because none is configured in the chain specs
41+
2022-04-24 17:00:28.236 INFO main sub-libp2p: [SecondaryChain] 🏷 Local node identity is: 12D3KooWLDx1XEAyDWoxtJZhEj9WBspb8C9BQbyS7x4n6qoAFsAZ
42+
2022-04-24 17:00:28.326 INFO main sc_sysinfo: [SecondaryChain] 💻 Operating system: macos
43+
2022-04-24 17:00:28.326 INFO main sc_sysinfo: [SecondaryChain] 💻 CPU architecture: aarch64
44+
2022-04-24 17:00:28.326 INFO main sc_service::builder: [SecondaryChain] 📦 Highest known block at #0
45+
2022-04-24 17:00:28.326 INFO tokio-runtime-worker substrate_prometheus_endpoint: [SecondaryChain] 〽️ Prometheus exporter started at 127.0.0.1:9616
46+
2022-04-24 17:00:28.326 INFO main parity_ws: [SecondaryChain] Listening for new connections on 127.0.0.1:8846.
4747
```
4848

49-
Note the `Local node identity`(`12D3KooWRreNzoMVgM6HtPVP27enDaAuPuPbYgGCrSr2RWD8UBGf`) from the log output. the embedded primary node will use it to craft a bootnode for connecting to the primary node. You can also directly retrieve the primary peer id using the RPC `system_localPeerId`.
49+
Note the `Primary node identity`(`12D3KooWEna4n2m3B6EKXQE1jZhQ5sfYcr9TpVmr8Yk9S8zCpnm4`) from the log output. We'll start another primary node running an executor full node in next step and will use it to as a bootnode to connect to this primary node. You can also directly retrieve the primary peer id using the RPC `system_localPeerId`.
5050

5151
Start a farmer:
5252

5353
```bash
54-
$ ./target/release/subspace-farmer wipe && ./target/release/subspace-farmer farm
54+
$ ./target/release/subspace-farmer wipe && ./target/release/subspace-farmer farm --reward-address REWARD_ADDRESS --plot-size 10G
5555
```
5656

5757
Now the primary node should be producing blocks.
5858

59-
2. Run an executor as an authority node.
60-
61-
Ensure the bootnode for the primary node is correct and run this command to start an executor:
59+
2. Run another executor running as a full node.
6260

6361
```bash
6462
$ ./target/release/subspace-node \
6563
--chain dev \
6664
-d db1 \
67-
--log=trace \
68-
--bootnodes "/ip4/127.0.0.1/tcp/30333/p2p/PRIMARY_PEER_ID" \
69-
--port 30343 \
70-
--ws-port 9977 \
71-
-- \
72-
--alice \
73-
--port 40333 \
74-
--log=txpool=trace,gossip=trace \
75-
--rpc-port 8845 \
76-
--ws-port 8846 \
77-
78-
```
79-
80-
The log for running the secondary node will be prefixed as `[Secondarychain]`, you should see it start to produce blocks as well.
81-
82-
```
83-
...
84-
2022-04-01 09:34:56.010 TRACE tokio-runtime-worker cirrus::executor: [Secondarychain] Origin deduplicated extrinsics extrinsics=[]
85-
2022-04-01 09:34:56.011 TRACE tokio-runtime-worker cirrus::executor: [Secondarychain] Shuffled extrinsics shuffled_extrinsics=[]
86-
2022-04-01 09:34:56.013 TRACE tokio-runtime-worker txpool: [Secondarychain] Pruning transactions: []
87-
2022-04-01 09:34:56.013 DEBUG tokio-runtime-worker txpool: [Secondarychain] Starting pruning of block BlockId::Hash(0x7089dfba167eeb17b361126db248dbb0bb2a1ded9f485e20c517b3a8f5800604) (extrinsics: 0)
88-
2022-04-01 09:34:56.013 DEBUG tokio-runtime-worker txpool: [Secondarychain] Pruning at BlockId::Hash(0x7089dfba167eeb17b361126db248dbb0bb2a1ded9f485e20c517b3a8f5800604)
89-
2022-04-01 09:34:56.013 TRACE tokio-runtime-worker txpool: [Secondarychain] Pruning at BlockId::Hash(0x7089dfba167eeb17b361126db248dbb0bb2a1ded9f485e20c517b3a8f5800604). Resubmitting transactions.
90-
2022-04-01 09:34:56.013 INFO tokio-runtime-worker substrate: [Secondarychain] ✨ Imported #18 (0x7089…0604)
91-
2022-04-01 09:34:56.013 DEBUG tokio-runtime-worker cirrus::executor: [Secondarychain] Trace root calculated for #0x7089…0604 trace=[0xe99ff5a2f994e4832ffc093c10b4d1d294a401b0bbd9d52db7523716d9864140, 0x63cf7a793cc3c20f68cd3d683ba9effe7d87245ddf3b0c52ba9bac43eef7b653] trace_root=[23, 87, 107, 20, 223, 81, 204, 197, 221, 24, 70, 36, 204, 4, 23, 135, 162, 250, 135, 179, 131, 83, 169, 73, 9, 72, 122, 237, 90, 139, 239, 25]
92-
...
93-
94-
```
95-
96-
3. Run another executor as a full node.
97-
98-
```bash
99-
$ ./target/release/subspace-node \
100-
--chain dev \
101-
-d db2 \
10265
--bootnodes "/ip4/127.0.0.1/tcp/30333/p2p/PRIMARY_PEER_ID" \
10366
--port 30443 \
104-
--ws-port 9987
67+
--ws-port 9987 \
10568
-- \
106-
--alice \
69+
-- \
10770
--port 40233 \
108-
--log=cirrus=trace,txpool=trace,gossip=trace \
10971
--rpc-port 8745 \
110-
--ws-port 8746 \
72+
--ws-port 8746
11173
```

0 commit comments

Comments
 (0)