Skip to main content

Questions tagged [consensus]

Generic tag for consensus-related questions, e.g. block production protocols, finality protocols, parachains. Best used in combination with other more specific tags (e.g. [tag:grandpa] or [tag:babe]).

Filter by
Sorted by
Tagged with
12 votes
1 answer
753 views

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

Substrate supports "pluggable consensus" so a developer can choose from among several consensus algorithms. The main Substrate repository contains four algorithms: Aura Babe Proof of Work ...
JoshOrndorff's user avatar
  • 1,201
11 votes
1 answer
515 views

How to upgrade consensus engine of a live chain from PoA to PoS? [duplicate]

I am working on a substrate based blockchain that is in production. We started the node using PoA consensus but now we want to switch to PoS consensus. I did the necessary changes i.e added necessary ...
Fenn Saji's user avatar
  • 145
10 votes
1 answer
99 views

How to properly split logic between block verifier and block import?

I found it a bit confusing that part of the logic for block verification is in sc_consensus::import_queue::Verifier::verify() implementation and another part is in sc_consensus::block_import::...
nazar-pc's user avatar
  • 551
9 votes
1 answer
291 views

Proof of Stake algorithms, why use Aura as block producer?

I was under the impression that in proof of stake, or as substrate uses it, nominated proof of stake, the block producers are chosen by stake, into a set known as validator set through phragmen ...
Purple_Turtle's user avatar
9 votes
2 answers
243 views

Grandpa stuck at "Polling"

I am trying to spin up a small BABE PoS network of four nodes and not able to get GRANDPA to start. It's hard to know what exact pieces of information to provide, here are some notes. A few notes: I ...
Justin Frevert's user avatar
9 votes
1 answer
131 views

Session changes on reversion

When reasoning about a particular problem, I realized that I don't know how session changes work with chain reversions. To my knowledge session changes are based on time/slots and not on blocks. So ...
eskimor's user avatar
  • 275
8 votes
5 answers
775 views

How to change consensus engine from PoA to PoS?

The substrate-node-template comes up with PoA by default. I am trying to change this consensus engine to Proof of stake, so far I have just changed aura to babe. What else do I need to do to change ...
rahul's user avatar
  • 133
8 votes
2 answers
392 views

How to revert a bricked chain due to bad setCode

I upgraded a chain that uses Grandpa/Aura with code for instant seal by mistake. I believe it may be possible to revert some blocks: https://github.com/paritytech/substrate/pull/1479 But cannot find ...
twhitehead's user avatar
8 votes
1 answer
701 views

Recovering from stalled finality (babe/grandpa)

While experimenting with a relay chain testnet, Decentration and I ran into this issue with multiple validators on the same node, stalled finality and got the chain into slow block-making mode. We ...
JelliedOwl - Paul's user avatar
6 votes
2 answers
382 views

<wasm:stripped> printed when logging from the runtime

I'm trying to debug in pallet-staking to figure out something about how validators/nominators join NPoS network. https://github.com/paritytech/substrate/blob/master/frame/staking/src/pallet/impls.rs#...
CocDap's user avatar
  • 678
6 votes
1 answer
84 views

Substrate chain reconcilliation with BABE/GRANDPA

With BABE, I understand validators to produce blocks and chosen randomly and multiple validators may be eligible to produce a block, already providing a large amount of forks/fork opportunities. If no ...
Kayaba's user avatar
  • 125
6 votes
1 answer
117 views

What this 'grandpa-voter' error means?

I was doing last section of substrate private network tutorial. Before i stored key set, i could started network smoothly. But after i stored key set of aura and grandpa, i got this error. yc6936@...
Michael kane's user avatar
6 votes
0 answers
70 views

How to achieve instant finality with substrate?

Ideally, I would like to build a chain with Substrate but using Tendermint as the consensus engine. The problem is that it's a lot of work to implement it correctly. But what if I use AURA (round ...
Timothée Delabrouille's user avatar
5 votes
2 answers
144 views

For staking pallet, what options do I have for ElectionProvider?

I want to implement a simple PoS consensus mechanism where validator sets are chosen proportional to their stake. Do I need to write my own pallet implementing ElectionProviders trait or is there a ...
Purple_Turtle's user avatar
5 votes
1 answer
383 views

Is it possible to resurrect babe chains?

I've learned that babe chains, when all validators go offline, stalls and isn't recoverable. But my question is, from a database perspective we have the data in the chainstate folders right? So wouldn'...
Purple_Turtle's user avatar
5 votes
1 answer
86 views

Polkadot consensus and Honey Badger BFT

I want to know the relationship between Polkadot consensus and Honey Badger BFT (HBBFT). Is Polkadot's consensus using HBBFT?
bun's user avatar
  • 383
5 votes
1 answer
358 views

What is the difference in validator sets between an Era and a Session?

According to sessions pallet docs: Session: A session is a period of time that has a constant set of validators. Validators can only join or exit the validator set at a session change. It is measured ...
Purple_Turtle's user avatar
5 votes
2 answers
103 views

How Does Substrate Implement Modular & Hot-Swappable Consensus

Anecdotally, I know that one of Substrate's most important points of differentiation is its support for modular & hot-swappable consensus. What does this mean and how does Substrate enable this ...
Dan Forbes's user avatar
5 votes
1 answer
48 views

Consensus algorithm selection

We are looking to build private blockchain on Substrate. It should be scalable up to 300 validators. Like start with 3 and scale it to 300 later on. Does standard AURA suitable for this? Can AURA ...
Alex 's user avatar
  • 83
5 votes
1 answer
118 views

BABE: VRF verification fails

We just ran into the following issue on our kintsugi testnet deployment: [Relaychain] :broken_heart: Verification failed for block 0xdef612b6bd9d3b6a2ff93a1e9310f385b7a8b715f3f368135731772a3c6f0792 ...
Dominik Harz's user avatar
5 votes
1 answer
191 views

Have we broken warp sync?

We are trying to use warp sync for our substrate chain but it doesn't seem to advance past the genesis block. Normal sync works fine. We purge the chain state and then run the node using: chainflip-...
dan_chainflip's user avatar
5 votes
1 answer
47 views

What is the current state of Swappable Consensus and Re-Genesis

I've found these two open issues: Re-Genesis #7458 Swappable Consensus #1304 and would be interested if there is more practical guidance on an example basis?
BenJamWhite's user avatar
5 votes
0 answers
49 views

Adhering to size limit of a block

We do track weight during block creation/block import, but weight only cares about execution time and with 2D weights also about storage proof size. We do keep track of size in propose here but only ...
eskimor's user avatar
  • 275
4 votes
1 answer
65 views

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

In substrate, does the genesis block get finalised the same way as the subsequent blocks, or is finalisation of the genesis block a special case?
kishan sagathiya's user avatar
4 votes
1 answer
71 views

Is there a substrate node that contains pallet-contracts and uses instant seal consensus?

I've seen instant seal mentioned as a way to get transactions sealed by the substrate node upon receipt. I also know that moonbeam have this in their node. Is there a substrate node that includes ...
forgetso's user avatar
  • 1,514
4 votes
2 answers
58 views

Do we have any reference of solochain using DPOS consensus?

In our solochain currently our chain using POA. Now we want to update the consensus to Delegated Proof of Stake(with AURA). Do we have any reference or suggestion for that implementation?
Ajit's user avatar
  • 827
4 votes
1 answer
282 views

Why we should choose DPOS over NPOS or NPOS over DPOS?

I want to understand if we want to integrate the proof of stake consensus for our chain. So which consensus we should go for NPOS(Nominated proof of stake) or DPOS (Delegated proof of stake)? How we ...
Pankaj's user avatar
  • 2,021
4 votes
1 answer
68 views

Is there any constrain forced on Parachains for block authoring logic?

I am reading Cumulus PDK and Parachain documentations, and looking forward to converting our project to a parachain and join the Polkadot ecosystem. However, I am confused regarding the parachain ...
Yeou's user avatar
  • 229
4 votes
2 answers
66 views

Is there an example of a Proof of Work Substrate chain?

I am aware of this sc_consensus_pow crate but I am wondering if anyone can point to some up to date implementations of it.
Sacha Lansky's user avatar
  • 2,640
3 votes
2 answers
177 views

After restarting a chain I get a ClientImport("Unexpect epoch change") error. What does this mean in English?

So while testing I have about 4 nodes (local) running and if I were to stop them all, and then come back a few minutes later and restart them, with the exact same --base-path, I'd get this error : ...
Purple_Turtle's user avatar
3 votes
1 answer
154 views

Runtime panic when peering with node:

I require some insight into how to troubleshoot the following runtime error which only occurs when I try to peer with my running node. Using substrate v3.0.0 monthly-10-2021 I should also add that if ...
Purple_Turtle's user avatar
3 votes
3 answers
98 views

why blocks could contain failed transaction

After building and running substrate-node-template i started the local node with --dev flag : ./target/release/node-template --dev i opened https://polkadot.js.org/apps/#/extrinsics and selected the ...
dadzerlaze's user avatar
  • 1,083
3 votes
1 answer
165 views

change consensus of substrate

I want to change my substrate chain consensus but I don't know how to set the new consensus in substrate. I want to set dops consensus for my substrate chain also please guide my for implement dpos in ...
Kianoush Dortaj's user avatar
3 votes
2 answers
186 views

Is this canonicalization issue a problem and if so, has anyone solved it? - "Could not canonicalize elem at pos x using key"

We are getting the below canonicalization issue and we are wondering: Is it a problem or is it normal and can be ignored? Has anyone found a method to resolve it? Here's what we know: It ...
KathrynColleen's user avatar
3 votes
1 answer
177 views

Validator not being onboarded due to Election NoFallback error, possibly

So my chain is running at the moment with 3 invulnerable validators, and I was trying to add another validator to the mix. I generated 2 accounts, transferred some stash to one of them, made a ...
Purple_Turtle's user avatar
3 votes
1 answer
125 views

How to set secondary slots for Babe?

As I understand, the babe epoch config comes with the option of SecondaryPlain and SecondaryVRF slots, which is more or less like PoA in the case that no primary block producers are available. If ...
Purple_Turtle's user avatar
3 votes
1 answer
106 views

What happens on invalid blocks?

I was wondering about block import in particular about invalid blocks: What are the consequences of a block being deemed invalid/failing block import - except well for the block not being imported. Is ...
eskimor's user avatar
  • 275
3 votes
1 answer
91 views

does the block gets signed by all authorities in aura?

I have read their official documentation and I'm not sure I completely understand the process of block creation or finalization. I know that after each period of time, there is a block author that ...
dadzerlaze's user avatar
  • 1,083
3 votes
1 answer
158 views

How many collators need to be set on the parachain?

Background our parachain has won the slot and will launch in the future. So, we firstly face the question of how many collators should be setup in our parachain. Here are some of my questions: ...
bun's user avatar
  • 383
3 votes
1 answer
62 views

Node panics on restart after warp synced with both relay and parachain

We are observing the following panic for a parachain node that is warp synced fully on both sides when we try to restart the node: Thread 'main' panicked at 'route from finalized to leaf should be ...
Alex Sed's user avatar
  • 590
3 votes
1 answer
127 views

What happens if validator count < minimum_validator_count?

I am using the staking pallet and it has an item known as minimum_validator_count. I'd like to learn what would happen if the actual validators in the network is less than this entity. Would the ...
Purple_Turtle's user avatar
3 votes
0 answers
25 views

Difficulty Storing Consensus-Derived Value in Storage: Observing Value in Pallet Log but Not in Storage

I'm trying to store a value obtained from the consensus, specifically sc_consensus_babe::fn import_block. While I can observe the value in the pallet through the log, it doesn't seem to be stored in ...
Deepak Chaudhary's user avatar
3 votes
0 answers
41 views

How to assign some number to the miners in POW substrate chain?

I'm working with POW substrate chain and I want to assign some number to the miners according to the work they have done earlier. Is it possible? If yes can we fetch those numbers during the block ...
Deepak Chaudhary's user avatar
3 votes
0 answers
35 views

Why does Grandpa not use sr25519?

I note that Grandpa uses ed25519 keys rather than the substrate standard of sr25519. Is it because sr25519 signatures are non-deterministic? ( Why are sr25519 signatures non-deterministic? ) or is ...
Squirrel's user avatar
  • 3,849
3 votes
0 answers
36 views

Are justifications of finalized block canonical?

Justifications are external to the signed part of the Substrate block, meaning they change after block is produced initially. However, I'm wondering if there is any assumption in Substrate (or ...
nazar-pc's user avatar
  • 551
3 votes
1 answer
60 views

Is block creation guaranteed to be running after parent block is fully imported?

I observe an issue for a long time that I can't explain. There is a value produced in BlockImport::import_block that must be included in inherents of n+1. Though sometimes it seems like value is not ...
nazar-pc's user avatar
  • 551
3 votes
1 answer
35 views

Do we need to implement the `Verifier` trait if we are providing our own implementation of `ImportQueue`?

Let's say I have a consensus engine called X. I know that most consensus engines import blocks through something with the trait ImportQueue, and BasicQueue is a popular choice for that. Consensus ...
Purple_Turtle's user avatar
3 votes
1 answer
306 views

How to implement a POC for a new consensus algorithm in substrate?

I am currently working on a substrate project that uses the PoA consensus algorithm. I would like to implement a POC for a new consensus algorithm. I have some experience with substrate but I'm new to ...
Mr Coder's user avatar
  • 923
3 votes
1 answer
162 views

How to reject empty blocks? [duplicate]

I need to prevent empty blocks from being added to my blockchain. This is for a very small scale chain, in which 99.99884% of blocks are empty, so not adding empty blocks will dramatically reduce the ...
ashneverdawn's user avatar
2 votes
2 answers
147 views

Is it possible to integrate node-authorization pallet after genesis?

In the Permissioned Network tutorial on Substrate docs, it's shown how to created a permissioned network from scratch along with the node-authorization pallet to manage the validator set. However, in ...
afm's user avatar
  • 355