TMichel
TMichel

Reputation: 4442

Parity Substrate - blocks are not being finalized

Problem

I am running a private chain with 2 local nodes using custom accounts and keys.

Peer discovery works, but blocks are not being finalized.

Idle (1 peers), best: #0 (0xb166…8ad2), finalized #0 (0xb166…8ad2),
Idle (1 peers), best: #0 (0xb166…8ad2), finalized #0 (0xb166…8ad2),
...

Description

In chain_spec.rs:

This results in a build-spec like:

palletSession

{
    "keys": [
        [
        "<STASH_ID>",
        {
            "grandpa": "...",
            "babe": "<CONTROLLER_ID>",
            "im_online": "<CONTROLLER_ID>",
            "authority_discovery": "<CONTROLLER_ID>"
        }
        ],
        [
        "<STASH_ID>",
        {
            "grandpa": "...",
            "babe": "<CONTROLLER_ID>",
            "im_online": "<CONTROLLER_ID>",
            "authority_discovery": "<CONTROLLER_ID>"
        }
        ]
    ]
}

palletStaking

"stakers": [
    [
        "<STASH_ID>",
        "<CONTROLLER_ID>",
        <STASH_AMOUNT>,
        "Validator"
    ],
    [
        "<STASH_ID>",
        "<CONTROLLER_ID>",
        <STASH_AMOUNT>,
        "Validator"
    ]
]

Polkadot.js UI

enter image description here

enter image description here enter image description here

enter image description here enter image description here

Upvotes: 4

Views: 1189

Answers (1)

user3655581
user3655581

Reputation: 9

  1. check, that you've added grandpa private keys to the node's storage (author_insertKey, or rotate). When you start alice/bob chain private keys are already in storage
  2. there is an issue that node is checking that private keys are in storage at start (spawning grandpa thread), so if you insert grandpa private keys you need to restart the node.

Upvotes: 1

Related Questions