I'm trying to build a 5 node network (all validators and members of Aura & GRANPA) and my goal is to use custom keys, not the predefined Alice, etc. Thus added the SR and ED authority keys in the custom spec JSON file. The node-template version is an unchanged V3 from Github.
I followed the tutorial (https://substrate.dev/docs/en/tutorials/start-a-private-network/customchain) but this error shows up:
2021-07-26 09:17:35 Substrate Node
2021-07-26 09:17:35 ✌️ version 3.0.0-unknown-x86_64-linux-gnu
2021-07-26 09:17:35 ❤️ by Substrate DevHub <https://github.com/substrate-developer-hub>, 2017-2021
2021-07-26 09:17:35 📋 Chain specification: The Batman Chain
2021-07-26 09:17:35 🏷 Node name: Node1
2021-07-26 09:17:35 👤 Role: AUTHORITY
2021-07-26 09:17:35 💾 Database: RocksDb at /peer-data-1/chains/TBC_testnet/db
2021-07-26 09:17:35 ⛓ Native runtime: node-template-100 (node-template-1.tx1.au1)
2021-07-26 09:17:36 🔨 Initializing Genesis block/state (state: 0x531c…653b, header-hash: 0x4c1f…570d)
2021-07-26 09:17:36 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.
2021-07-26 09:17:36 ⏱ Loaded block-time = 6000 milliseconds from genesis on first-launch
2021-07-26 09:17:36 Using default protocol ID "sup" because none is configured in the chain specs
2021-07-26 09:17:36 🏷 Local node identity is: 12D3KooWRzP2WuCbHENdXkf5ZvBStmgYn2N8mkwPofQparf58tkF
2021-07-26 09:17:36 📦 Highest known block at #0
2021-07-26 09:17:36 〽️ Prometheus server started at 0.0.0.0:9615
2021-07-26 09:17:36 Listening for new connections on 0.0.0.0:9944.
2021-07-26 09:17:37 🔍 Discovered new external address for our node: /ip4/10.42.0.82/tcp/30333/p2p/12D3KooWRzP2WuCbHENdXkf5ZvBStmgYn2N8mkwPofQparf58tkF
2021-07-26 09:17:37 GRANDPA voter error: Signing("Failed to sign GRANDPA vote for round 1 targetting 0x4c1f6404ff3236cbd58fa62dffe9b8e2b2ac670f06516541a641158c0a0a570d")
2021-07-26 09:17:37 Essential task `grandpa-voter` failed. Shutting down service.
Error: Service(Other("Essential task failed."))
To start the node I use this command:
node-template key insert \
--base-path /peer-data-1 \
--chain local \
--key-type aura \
--suri "0x0e32f2687f1234deb25e20a50c39db5cdf0a2f2ccb84995189522fc9f20beb37";
node-template key insert \
--base-path /peer-data-1 \
--chain local \
--key-type gran \
--suri "0x0e32f2687f1234deb25e20a50c39db5cdf0a2f2ccb84995189522fc9f20beb37";
ls -l /peer-data-1/chains/local_testnet/keystore;
RUST_LOG=runtime=debug
node-template \
--base-path /peer-data-1 \
--name Node1 \
--node-key 0x0e32f2687f1234deb25e20a50c39db5cdf0a2f2ccb84995189522fc9f20beb37 \
--chain /genesis/customSpecRaw.json \
--keystore-path /peer-data-1/chains/local_testnet/keystore/ \
--port 30333 \
--ws-port 9944 \
--rpc-port 9933 \
--unsafe-ws-external \
--unsafe-rpc-external \
--rpc-cors=all \
--prometheus-external \
--log info \
--wasm-execution Compiled \
--ws-max-connections 1000 \
--pool-limit 10000 \
--pool-kbytes 20480 \
--max-runtime-instances 100 \
--validator \
--bootnodes /ip4/$SUBSTRATE_0_SERVICE_HOST/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp
Custom spec JSON file is:
{
"...": "...",
"palletAura": {
"authorities": [
"5HVmrhNjMCfqRmjfcWTeEhgLMm1mgG9wAeQtKv1jZsUXrJjR",
"5ChaeMbZEqvCYkh6ZZudYEPdwqApTCQzhbUPyX6Hxs5VX6yd",
"5DB3vFrmvn49dpwzczYtFqxbfgn5U7DV8AHkkWFBcp3tWxwG",
"5GT9aamoicKpUNRkWzQs83kLzufWZGt7aHX8ZWaAxKLmBdCW",
"5CeaUtvsDQJHmuS1PJPns9kNuYEYCZdJE4ze8tdXSzgZkd4a"
]
},
"palletGrandpa": {
"authorities": [
[
"5DvLRumQ8R9uSqV5xPmDsFBwQfjZCHzh6ebT5wqmARVRo9XE",
1
],
[
"5CvYJbuiAyeGiBiPUtDp1Y5u3547f5AVai6qSXQBanR1j9m9",
1
],
[
"5DPmV9GaQke2jUb7DmtRaf7fmrEX4aWSwzPzUsPtUNZUnYhU",
1
],
[
"5FvcixYnySyxCEpv5QRQ9vj3h6QUH3ogpnXjGc4x4NahSXhH",
1
],
[
"5CCuMSKoa13eeyKShzsNyGKMk5iicgnQn19zach8D2yznWgz",
1
]
]
},
"...": "...",
}
Found the answer myself.
node-template key insert \
--base-path /peer-data-1 \
--chain local \
--key-type aura \
--scheme Sr25519 \
--suri "0x0e32f2687f1234deb25e20a50c39db5cdf0a2f2ccb84995189522fc9f20beb37";
node-template key insert \
--base-path /peer-data-1 \
--chain local \
--key-type gran \
--scheme Ed25519 \
--suri "0x0e32f2687f1234deb25e20a50c39db5cdf0a2f2ccb84995189522fc9f20beb37";
ls -l /peer-data-1/chains/local_testnet/keystore;
RUST_LOG=runtime=debug
node-template \
--base-path /peer-data-1 \
--name Node1 \
--chain /genesis/customSpecRaw.json \
--keystore-path /peer-data-1/chains/local_testnet/keystore/ \
--node-key 0x0e32f2687f1234deb25e20a50c39db5cdf0a2f2ccb84995189522fc9f20beb37 \
--port 30333 \
--ws-port 9944 \
--rpc-port 9933 \
--unsafe-ws-external \
--unsafe-rpc-external \
--rpc-cors=all \
--prometheus-external \
--log info \
--wasm-execution Compiled \
--ws-max-connections 1000 \
--pool-limit 10000 \
--pool-kbytes 20480 \
--max-runtime-instances 100 \
--validator \
--bootnodes /ip4/$SUBSTRATE_0_SERVICE_HOST/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp