1

I am following the tutorial on running a basic 2 node private network in substrate. I have used subkey to generate aura and grandpa keys for both of the nodes and added the keys to keystore.

I thought I did everything correctly, both of the nodes are running and producing the blocks but the blocks are not being finalized. I am not sure what is the problem, aura keys are responsible for block production and grandpa keys are responsible for block finalization, aura keys are clearly working, because the blocks are produced, so I suspect there is something wrong with grandpa keys, but the process of adding the keys is practically identical for both aura and grandpa, so I don't understand why is it working for one and not working for another.

I purged the chain using the purge-chain command after I added both pairs of keys to restart the nodes, but the blocks were not still being finalized.

Also, I am using a single Linux machine to run both nodes in separate terminal windows, I don't know if that might be an issue. Any ideas?

Yunnosch
  • 21,438
  • 7
  • 35
  • 44
beqaabu
  • 19
  • 6
  • You shouldn't need to run `purge-chain` after adding the GRANDPA keys, but you do need to restart both nodes. Did you restart the nodes after adding the GRANDPA keys? Before you do this, the nodes will author blocks but not finalize them. – Dan Forbes Dec 11 '20 at 22:12
  • @DanForbes How do I restart the nodes? I just used `ctrl c` in the terminal to stop the nodes and then ran the same commands as in the beginning to start the nodes again, but still, the blocks were not being finalized. Does that count as a restart or am I doing something very stupid? :D – beqaabu Dec 12 '20 at 05:52
  • No I would expect that to work. Are you certain you are adding the correct keys? – Dan Forbes Dec 12 '20 at 15:57
  • I'm pretty sure I am doing things correctly, but I will redo everything once more to be 100% sure, thanks @DanForbes ! – beqaabu Dec 12 '20 at 16:05
  • 2
    Please do not edit solution announcements into the question. Accept (i.e. click the "tick" next to it) one of the existing answer, if there are any. You can also create your own answer, and even accept it, if your solution is not yet covered by an existing answer. – Yunnosch May 05 '21 at 19:37

2 Answers2

0

I think the restart will work.

And could you paste your boot command here? And I will update the answer for you.

AurevoirXavier
  • 1,030
  • 1
  • 8
  • 17
  • `./target/release/node-template \ --base-path /tmp/node01 \ --chain ./customSpecRaw.json \ --port 30333 \ --ws-port 9944 \ --rpc-port 9933 \ --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \ --validator \ --rpc-methods Unsafe \ --name MyNode01` this is the command I used to start the first node – beqaabu Dec 19 '20 at 08:12
  • `./target/release/node-template \ --base-path /tmp/node02 \ --chain ./customSpecRaw.json \ --port 30334 \ --ws-port 9945 \ --rpc-port 9934 \ --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \ --validator \ --rpc-methods Unsafe \ --name MyNode02 \ --bootnodes /ip4//tcp//p2p/` and this is the command for the second node, with proper IP address, tcp port and peer id – beqaabu Dec 19 '20 at 08:15
  • I am following the tutorial and the commands are given [here](https://substrate.dev/docs/en/tutorials/start-a-private-network/customchain) – beqaabu Dec 19 '20 at 08:17
0

using the terminal to add the keys to Keystore did not work for whatever reason, but you can add the keys using the polkadot.js.org/apps interface, and the blocks work fine after that, they are being produced and finalized. that step is discussed in the tutorial itself, but it is said that its not the most secure way to add the keys

beqaabu
  • 19
  • 6