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
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-...
Toufeeq's user avatar
  • 156
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 ...
robin y's user avatar
  • 21
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 ...
C.H. Hawk's user avatar
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
metricaez's user avatar
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 ...
Vitthal agarwal'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
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 | ...
MinhK's user avatar
  • 125
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 ...
Sebastian Dine's user avatar
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 ...
MinhK's user avatar
  • 125
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?
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
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 ...
Drew Stone's user avatar
  • 1,194
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 ...
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
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 ...
Ipsa Gupta's user avatar
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?
llvm_ninja's user avatar
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 ...
Pablo Flores's user avatar
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 ...
JoshOrndorff's user avatar
  • 1,201
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
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
1 vote
1 answer
38 views

How to change POA to POS with babe?

How to change the the consensus of node-template from POA to POS with babe?
Deepak Chaudhary's user avatar
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? ...
Deepak Chaudhary's user avatar
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?
Vlad Markushin's user avatar
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
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
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 ...
Yang Elden's user avatar
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<...
simon virág's user avatar
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
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 ...
Matthiew's user avatar
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), ...
dadzerlaze's user avatar
  • 1,083
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
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
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 ...
bis rkharisov'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
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
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
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
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
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
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 ...
Josh's user avatar
  • 425
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
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
2 votes
1 answer
121 views

How and where does a block production take place?

Like if I were to add some custom logic and checks to ensure only certain kind of blocks are produced by the validators or only those blocks that contain a certain size of data are produced then where ...
Sourav Mishra's user avatar
2 votes
0 answers
48 views

PoW custom consensus with remote calls

I'm trying to implement a new consensus in Substrate. The consensus is similar to PoW but requires querying other nodes to generate the work/proof. Would implementing the PowAlgorithm trait and ...
Paco's user avatar
  • 21
0 votes
1 answer
27 views

Node template based network runs with multiple peers using the same identity

I noticed some interesting behavior while running a local test net on my machine. I booted up a network between the default Alice and Bob accounts that are used in all the tutorials, and they ...
domoarigato'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
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
1 vote
1 answer
42 views

Debugging parasDisputes

We noticed on Jan 19 that kintsugi (our kusama para) did not finalize blocks for about 60 minutes. It seems the cause is likely rooted in disputes being raised. In turn, a lot of dispute events fired ...
Dominik Harz's user avatar
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