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
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 ...
2 votes
1 answer
38 views

How to impl FindAuthor<H160> with Babe

I want add pallet-evm in my substrate node. and my substrate node use Babe instead of Aura. How can I Impl FindAuthor whih Babe ? this is the example of Aura. I want to impl it with Babe pub struct ...
0 votes
1 answer
34 views

BABE halts at block 100

2023-12-26 11:46:18.019 WARN tokio-runtime-worker babe: Error with block built on 0x54a0fbd3703e9d3311c3f51913714b84fc7b09b143251fcaf826dcdc6cf1e388: Import failed: Expected epoch change to happen at ...
1 vote
0 answers
27 views

Why does a block in Substrate-based blockchain have no author and no reward points?

We encountered an issue in our Substrate-based blockchain network where a block has no author and no reward points were given to any validator. This block was finalised. The block was an era-...
0 votes
0 answers
72 views

Where to learn more about custom consensus implementation?

Any tips, links and examples to go deep with custom consensus implementation? I like to create a very light consensus where the majority of the node are well known nodes and I want to implement checks ...
0 votes
0 answers
18 views

What can Substrate and Polkadot do for me?

What is the best and quickest way, for a layman, who has very little, to no experience, at all, in coding and/or developing, to play catch-up, so that he/she might be brought-up-to-speed, enough to ...
1 vote
1 answer
37 views

Lightweight consensus implementation for Substrate in production?

What is the most relaxed and fastest consensus implementations for Substrate? I am considering to use something much faster and lightweight for processing of social messaging on Subsocial's L2 ...
0 votes
0 answers
13 views

What is the expected time from sending a extrinsic to a block it's in being finalised?

Can we predict an average time derived from consensus, async backing and what other factors can impact this time? Thanks
1 vote
2 answers
79 views

How to add block author through InherentDataProvider in pow consensus?

I'm working on pow consensus chain and want to fetch block author in a pallet. I'm following Academy-PoW repo for adding block author through InherentDataProvider. But here default is passed in-place ...
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 ...
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 ...
0 votes
0 answers
58 views

How to convert `AccountId` to `AuthorityId`

699 | acc_vec.push((account_id, userInfo.weight.saturated_into::<u64>())); | ^^^^^^^^^^ expected `Public`, found associated type | ...
2 votes
1 answer
55 views

What is difference between pallet-babe and sp-consensus-babe?

Here is sp_consensus_babe https://releases.parity.io/substrate-rustdoc/src/sp_consensus_babe/lib.rs.html#86 and pallet_babe :https://crates.parity.io/src/pallet_babe/lib.rs.html#18-975 What is ...
1 vote
1 answer
53 views

How are valid transactions distributed to block authoring nodes?

I am new to Substrate and currently reading through all the great documentation that is available. I understand the concept of block authoring and finalization, but the following is a bit unclear to ...
1 vote
0 answers
27 views

How to Fetch data at the time of block production?

Can I implement a pallet which holds the node information and at the block production time we can use this node information?
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 ...
2 votes
0 answers
43 views

Proof-of-Work Substrate Chain with Multiple Validators

I'm working on a Proof-of-Work (POW) substrate chain. Assuming we have four validators, all of which have enabled on-chain workers (OCW), is it accurate to state that each validator's OCW fetches data ...
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 ...
0 votes
0 answers
23 views

"Troubleshooting Block Production Issue After Switching to ECDSA Signature Scheme in Substrate-based Blockchain"

I've transitioned the signature scheme to ECDSA on a Substrate-based chain, following Moonbeam's approach. However, it's worth noting that Moonbeam utilizes Aura for block production, whereas ...
2 votes
1 answer
59 views

Is the Aura Slot Inherent Necessary?

Substrate's Aura implementation has an InherentDataProvider that includes the Aura slot number into the runtime. However, it seems that this code is not consistently used throughout the ecosystem. For ...
1 vote
0 answers
37 views

Replace GRANDPA finanlity

Hello can someone please help me understand all steps and all functions needed to be implemented for replacing finality gadget in experimental substrate chain?
0 votes
0 answers
18 views

"Customizing Consensus Mechanism in Substrate: Creating a New Block from Records via HTTP Request"

I'm working on developing a blockchain using Substrate, and I intend to customize the consensus mechanism. Specifically, I'm interested in enabling a node or a group of nodes to create a new block ...
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?
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 ...
1 vote
1 answer
37 views

How to change POA to POS with babe?

How to change the the consensus of node-template from POA to POS with babe?
2 votes
1 answer
65 views

Facing Issue in integration of POS

I'm integrating the POS in freshly node template. I'm facing this error: This is the code repository: https://github.com/Aideepakchaudhary/POA-to-POS Can anyone please help me to solve this issue? ...
0 votes
0 answers
14 views

What's the trusting/trusted period of GRANDPA client?

For what period of time it's safe for a GRANDPA light-client to trust a specific header without the need for full validation? Is it the same as the unbonding one?
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 ...
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.
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 ...
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#...
2 votes
2 answers
238 views

Block finalization stalled

I have been running a testing network recently and they have encountered a very strange situation: the finalized has stopped at # 107379 and cannot be further confirmed. The logs of each consensus ...
2 votes
0 answers
46 views

hybrid consensus

I try to implement the hybrid consensus from the substrate recipes book but it keeps failing. I tried to use the sha3 algorithm for PoW but I keep getting this error: "the trait PowAlgorithm<...
2 votes
1 answer
98 views

Reduce block time

I was wondering about block time and block size. Why are they defined the way they are? Is it possible to reduce the time between two blocks without changing the consensus mechanism? What would happen ...
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 ...
10 votes
1 answer
97 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::...
2 votes
1 answer
135 views

what does reorg means in substrate?

up until block (best:#34, finalized #32) all nodes have the same output, then we are seeing the following log statements from some of our validators like this: 2023-06-24 15:32:22 💤 Idle (4 peers), ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
2 votes
0 answers
66 views

Switching from `Aura` to `Babe` consensus causes error "Incomplete block import pipeline" on genesis block

I am trying to switch from Aura to Babe consensus. After successful building and node start I am getting an error "Block import error: Incomplete block import pipeline.". This happens with ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...