Skip to main content
19 votes
Accepted

What is the difference between Babe, Aura, and Grandpa?

For a blockchain to continue growing and adding new transactions in a meaningful way, two things must happen to solve the problem of distributed consensus. Typically, these jobs are performed by full ...
JoshOrndorff's user avatar
  • 1,201
11 votes
Accepted

How to build a "super light" bridge based on Beefy?

GRANDPA light clients don't need to download or store all the blocks. In fact, https://github.com/paritytech/smoldot/ is an example of what you're referring to as a super-light client. It only stores ...
rob's user avatar
  • 2,126
10 votes

GRANDPA not finalizing with 2 of 3 nodes on network

You can't do that in any safe manner. Every BFT consensus algorithm requires the total number of nodes to be at least 3f + 1 where f is the number of faulty nodes. In your case you have one faulty ...
André's user avatar
  • 2,455
9 votes

In substrate, does the genesis block get finalised the same way as the subsequent blocks?

The first block is #0 (genesis block) and it is always considered finalized by default since it is explicitly defined as part of the chain spec, any subsequent blocks (#1 included) are treated equally ...
André's user avatar
  • 2,455
9 votes

How to revert a bricked chain due to bad setCode

You can use the revert command to revert unfinalized blocks. If you need to revert finalized blocks then I suggest you do the following: Assuming you want to revert to block #42; Add the hash of ...
André's user avatar
  • 2,455
8 votes

What is the internal logic of `--force-authoring` flag?

The --force-authoring flag tells a node to produce blocks when it is "offline", i.e. has no other peers. By default, a node assumes if it has no peers, that it is not connected to the ...
Shawn Tabrizi's user avatar
  • 16.1k
7 votes
Accepted

How to use noteStalled to recover from a finality lagging chain?

You should pass #57281 as the second parameter to the noteStalled call since that is the last block that was finalized, this means that when the GRANDPA validator set is forcibly changed it will ...
André's user avatar
  • 2,455
7 votes
Accepted

Recovering from stalled finality (babe/grandpa)

The issue lacks details to know exactly what went wrong in the first place (why did finality stop?). That said here are the steps you should have taken in order to debug the problem. Use the ...
André's user avatar
  • 2,455
7 votes
Accepted

are justification in the Block the actual votes cast by validators in GRANDPA?

In GRANDPA there are two phases of voting per round: prevote and precommit. On a very high-level the first phase of voting will inform other participants on what they "expect" to finalize ...
André's user avatar
  • 2,455
5 votes
Accepted

Backing off claiming new slot for block authorship: finality is lagging

The root cause of the issue here is stalled finality. The block production will deliberately slow down whenever finality is lagging for too long, this is to avoid creating long unfinalized forks. As ...
André's user avatar
  • 2,455
5 votes

Is there a connection between MaxAuthorities from authority_discovery, babe and grandpa?

Well yes they could be different if you want Babe Authorities to be different from Grandpa Authorities, but this just puts more capital requirements on your consensus system so probably best to make ...
Web3 Philosopher's user avatar
5 votes
Accepted

Is there a connection between MaxAuthorities from authority_discovery, babe and grandpa?

In theory they could be different as each pallet's implementation could differ, but I would set them all to the same value. In kusama/polkadot we set them all to 100,000 at the moment (not that we ...
Squirrel's user avatar
  • 3,849
5 votes

Advantages of BABE/GRANDPA over Aura for sovereign chains when weights are equal

Validator selection. Aura is in a round-robin fashion and therefore has predictable block authors, Babe does not. If you can predict the validators for a specific block way into the future, you can ...
Xiu Hung's user avatar
  • 527
5 votes

How to revert a bricked chain due to bad setCode

I figured out how to revert some blocks: ./{chain executable} revert --base-path /home/ubuntu/chains --chain {chain name}--keep-blocks 351284 --pruning archive For options: ./{chain executable} ...
twhitehead's user avatar
4 votes

What is the internal logic of `--force-authoring` flag?

--force-authoring is defined here. It is part of the config so you can call it internally like so config.force_authoring. As far as it's logic in the code-base, I see it being used explicitly here: if ...
Bruno's user avatar
  • 8,315
4 votes

How does a collator or validator choose their signing key?

This is what session.set_keys achieves, it declares that an on-chain account (presumably with keys in some form of cold storage) will sign blocks/consensus messages with some other key. When a node ...
joepetrowski's user avatar
  • 2,955
3 votes
Accepted

Advantages of BABE/GRANDPA over Aura for sovereign chains when weights are equal

GRANDPA is orthogonal to the blockchain extension algorithm. GRANDPA doesn't create blocks but only finalizes blocks that have already been created. One main downside to Aura is the fact that the ...
rob's user avatar
  • 2,126
3 votes
Accepted

Is it possible to have multiple GRANDPA Pause/Resume for one fork?

GRANDPA Pause/Resume have not been implemented in the substrate client code, therefore I would hold on implementing those for now. We need to track multiple pending Pause / Resume signals per-fork, ...
André's user avatar
  • 2,455
3 votes
Accepted

Currently, does substrate/polkadot make use of PrimaryProposal stage?

Yes, they are in use, but they are sort of plan B to ensure liveness (that is to make sure the best final candidate of round r-1 is finalized before we move to round r+1). So you should not expect to ...
Syed's user avatar
  • 278
3 votes

Equivocation crash (network with ~100 Aura Validators)

There are multiple public identities reported in the log message that you provided. The node identity Local node identity is: 12D3KooWQbTk1xVSvp8YM3p8uoJrjSa3LKL2UBt11Excd1i11spW that is shown in your ...
Luke Schoen's user avatar
  • 2,332
3 votes
Accepted

Grandpa stuck at "Polling"

The issue was the error: "ERROR tokio-runtime-worker sub-libp2p: add_set_reserved_peer with unknown protocol: /b0d742dbbf156179748027452dcd7c57c4eec99183ddab43f8def5c2b8bfcad6/grandpa/1 " ...
Justin Frevert's user avatar
3 votes

How is an external observer supposed to reliably know when the GRANDPA authorities have changed?

Yes, RPC nodes can lie about an arbitrary number of things. I guess RPC interfaces can be designed to also provide proofs; in this case one could add a new RPC method that provides a proof similar to ...
adrian's user avatar
  • 241
3 votes

How is an external observer supposed to reliably know when the GRANDPA authorities have changed?

The issue you are describing is called weak subjectivity and it's inherent to Proof-of-Stake systems (some useful links on the subject: https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/...
André's user avatar
  • 2,455
3 votes
Accepted

how to solve Detected prevote equivocation in the finality worker issue?

There aren't enough details in this question to be able to solve your problem. If when you started the archive node you stated seeing GRANDPA equivocations it means that this node is actually voting. ...
André's user avatar
  • 2,455
2 votes
Accepted

Substrate chain reconcilliation with BABE/GRANDPA

GRANDPA as a gadget is meant to function on top of something like BABE, which is a blockchain extension process that is itself eventually consistent. The only goal of GRANDPA is to speed up the ...
rob's user avatar
  • 2,126
2 votes

What this 'grandpa-voter' error means?

The key that you inserted into the keystore is probably invalid, the node fetches the key from the keystore in order to sign a GRANDPA vote and this fails. If you are generating keys for GRANDPA keep ...
André's user avatar
  • 2,455
2 votes

Why is App_Crypto not building in frame system runtime

As Oliver mentioned above, the issue seems to be that you are leaking std features into the no_std environment. You can use a tool like this to try and detect issues like this for you: https://github....
Shawn Tabrizi's user avatar
  • 16.1k
2 votes

manually creating new blocks with Babe

One requirement of Babe is to produce at least one block per epoch. https://github.com/paritytech/substrate/issues/4464#issuecomment-567651962 You could create a "test" runtime with ...
Bruno's user avatar
  • 8,315
2 votes
Accepted

Is the random number generation safe for pallet_lottery?

It's answered in the question you linked, but.. We only generate safe-ish randomness in babe, not grandpa. We might add better randomness generation to grandpa in the future if we first optimized ...
Jeff Burdges's user avatar
2 votes
Accepted

Where the GRANDPA round state stored at?

The data for the current state of GRANDPA is stored outside the runtime in local storage. It's important to take into account that even though GRANDPA gets its authorities from the chain and its ...
André's user avatar
  • 2,455

Only top scored, non community-wiki answers of a minimum length are eligible