Questions tagged [babe]

Block production protocol

Filter by
Sorted by
Tagged with
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
1 vote
0 answers
11 views

How to debug/test POS, log out the authorityId?

I am trying to customize the POS. But I don't know how to evaluate my algorithm. I want to print out the authority ID (BABE) and block producer ID. How do I do that? Please give me some leads. Thank ...
MinhK's user avatar
  • 115
0 votes
0 answers
54 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
  • 115
0 votes
0 answers
14 views

Which one is ExternalTrigger in BABE?

in this document it mentioned ExternalTrigger. So which pallet could be ExternalTrigger for BABE. and How to implement EpochChangeTrigger? It also said that pallet-session could be used, but pallet-...
MinhK's user avatar
  • 115
0 votes
0 answers
14 views

How to update BabeAuthorityWeight and NextAuthorities from custom pallet?

I would like to customize the POS. I did read some article about how to implement that, and used pallet_babe, my custom pallet and also pallet_staking. I found that in order to update the authorities ...
MinhK's user avatar
  • 115
1 vote
1 answer
35 views

How to change the NextAuthorities set from custom pallet?

The NextAuthorities is only updated in function enact_epoch_change() in pallet_babe and this function is called in Trait EpochChangeTrigger (pallet_babe) and OnSessionHandler so, in the ...
MinhK's user avatar
  • 115
2 votes
1 answer
53 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
  • 115
1 vote
1 answer
21 views

When I tried to apply BABE in solo chain, I got LightSyncStateExtensionNotFound error

When I tried to apply BABE in solo chain, I got this error 2023-12-27 07:30:39 💻 Operating system: macos 2023-12-27 07:30:39 💻 CPU architecture: aarch64 2023-12-27 07:30:39 📦 Highest known ...
Cute_Wisp's user avatar
0 votes
1 answer
33 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
0 votes
1 answer
19 views

Understanding the Concept of "Best Block" in Parachains, Relay Chains, and Solo Chains

I'm currently working to gain a deeper understanding of blockchain technologies, specifically in the context of parachains and relay chains, as well as solo chains. I'm having some confusion regarding ...
UPENDRA SINGH's user avatar
0 votes
1 answer
47 views

Can we use AccountId20 with babe and other pallets?

As frontier now integrate natively the AccountId20 type, I wonder if it is compatible with all other pallets like BABE, Staking, ... Is there a place where we can check it or do we know some ...
Dubs's user avatar
  • 294
1 vote
1 answer
31 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
61 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
1 vote
1 answer
54 views

Node template with POS Babe consensus: Removal of Unnecessary Extra Pallets

Here is the node template with Babe: https://github.com/paritytech/substrate/blob/6a946fc36d68b89599d7ca1ab03803d10c78468c/bin/node/runtime/src/lib.rs#L1583 The above template is functioning smoothly ...
Ajit's user avatar
  • 827
0 votes
1 answer
49 views

Error Running Substrate Node: Unsupported or invalid BabeApi version

I am trying to run a Substrate node with a custom chain specification. I used the following command to run the node: ./target/release/substrate \ --base-path /tmp/pikamo \ --chain ./...
Mr Coder's user avatar
  • 923
5 votes
1 answer
154 views

How to solve this error: associated type `BlockNumber` not found for `T`?

I have substrate node template with babe and i want to integrate orml-currencies. I'm using this in cargo.toml: orml-currencies = { default-features = false, git = "https://github.com/open-web3-...
Deepak Chaudhary's user avatar
4 votes
1 answer
51 views

Custom session keys in Chainspec for Mainnet config

I've seen some Substrate repo's where the SessionKeys (Aura, Babe, Grandpa, etc) are used with unchecked_into() .While the stash/controller keys are only used with into(). These are some examples: ...
Discardo's user avatar
  • 436
0 votes
1 answer
57 views

frontier template upgrade to polkadotv0.9.38 but using Babe instead of Aura

I've upgraded the frontier-node-template to substrate polkadot-v0.9.38, I've fixed all issues in runtime, migrated my code as well. But since last few days, I'm stuck in converting service.rs file in ...
Zubair Buriro's user avatar
2 votes
1 answer
399 views

file not found for module `sys`

Geeting following error's how can i fix this error? error[E0583]: file not found for module `sys` --> /Users/abubakarmujahid/.cargo/registry/src/github.com-1ecc6299db9ec823/errno-0.3.1/...
Abubakar Mujahid's user avatar
3 votes
3 answers
678 views

How to replace aura with babe?

Subsrate-node-template uses Aura as a default block authoring algorithem. How can one repalace aura with babe?
Syed Kamran's user avatar
1 vote
1 answer
44 views

How to execute reportEquivocation function in babe pallet?

I was trying to execute a function reportEquivocation(equivocationProof, keyOwnerProof)in the babe pallet . I was stuck in filling the parameters for the same.Could anyone guide me about how to fill ...
Ipsa Gupta's user avatar
9 votes
1 answer
130 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
2 votes
0 answers
65 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
3 votes
0 answers
84 views

Switching from Aura to Babe - 'Current state of blockchain has invalid authorities set'

I'm attempting to switch a node from using Aura to Babe by copying the usage of Babe in some public chains. However when I run multiple nodes together I get the error: Unable to fetch auxiliary data ...
Jonathan Gray's user avatar
5 votes
0 answers
47 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
105 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
1 vote
1 answer
81 views

How to implement a production randomness pallet?

Hey valuable community member, I am currently on a randomness pallet which can be used as a production counterpart to the insecure randomness-collective-flip pallet. This is my current version: https:/...
Chralt's user avatar
  • 543
3 votes
1 answer
66 views

nextAuthorities() output clarification from Babe storage event

Good evening, I am trying to parse the output hash of nextAuthorities details retrieved by storage function. I would like to know how to parse the output sent per validator, is it an hashproof ...
a_dotter's user avatar
1 vote
1 answer
81 views

How to start a GRANDPA blockchain without any initial voters?

I've tried modifying the repository so initial voters for the grandpa pallet. In doing so, I noticed there are many checks to prevent that modification. The reason why we do not want any initial ...
Kofi's user avatar
  • 141
5 votes
1 answer
114 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
0 votes
1 answer
81 views

How to list waiting validators?

We can list the active set with session::validators() and/or babe::authorities() How to list waiting validators though?
user1813's user avatar
  • 103
1 vote
1 answer
184 views

Is it possible to start a substrate BABE blockchain with no Grandpa authorities and BABE validators?

I'm trying to implement a PoS network on substrate using substrate provided pallets - pallet_session, pallet_staking, pallet_babe, etc. The current Runtime and chain spec implementation is similar to ...
Kofi's user avatar
  • 141
1 vote
2 answers
205 views

Substrate change node template from PoA to PoS

Is there any documentation on how to change Substrate from PoA to PoS?
Mohamad Al Zohbie's user avatar
0 votes
1 answer
38 views

Are Periodic Grandpa Voter Errors To Be Expected?

We have been losing anywhere from one to three nodes at a time with Grandpa Voter Errors at random block numbers ranging from 1600 to over 183K. Thus far we have not found any configuration in the ...
KathrynColleen's user avatar
0 votes
2 answers
162 views

Babe PoA to NPoS migration

Here's my babe pallet configuration: I suppose that for PoA we want to keep the same authority set impl pallet_babe::Config for Runtime { type EpochDuration = EpochDuration; type ...
mr_bovo's user avatar
  • 171
4 votes
2 answers
276 views

How can I use BABE's randomness in my parachain?

I would like to use BABE's randomness for some on-chain logic. IIUC using BABE inside a parachain's runtime is not recommended good practice because there's no fallback for producing blocks if no ...
Sacha Lansky's user avatar
  • 2,620
0 votes
1 answer
129 views

Node-template for stand-alone blockchains with POS babe consensus

Is there a node-template for babe consensus tracking all the changes and updates as it does to substrate-node-template which follows aura consensus. For eg., polkadot-v0.9.24 changes are already ...
Immanuel John's user avatar
3 votes
1 answer
77 views

What prevents a primary staker from holding off staking to wait for a specific outcome they want in BABE?

One of the issues of PoS as far as I understand is the randomness that selects a staker. Ouroboros Praos, and also BABE use VRFs (Verifiable Random Functions) to assign primary and secondary leaders ...
The Quantum Physicist's user avatar
3 votes
1 answer
90 views

Certain validator nodes produce more blocks than other nodes (BABE)

At Ternoa we are observing an interesting phenomenon where a node operator consistently produces more blocks than other node operators. In this case, he has two validator nodes and both nodes produce ...
Marko Petrlić's user avatar
3 votes
1 answer
46 views

manually creating new blocks with Babe

Currently my consensus engine is Babe, and my finality gadget is Grandpa. But for testing environments I'm wondering if that there is a way to manually force the engine to produce a new block when I ...
Alex Won's user avatar
3 votes
0 answers
76 views

Validator node dropping peers after producing a block followed by a reorg

We are seeing some strange behaviour with some (not all) of our validator nodes. We are using the standard BABE / GRANDPA pallets. When it is their turn to produce a block, they produce the block, but ...
Adam Dossa's user avatar
1 vote
1 answer
45 views

On using Instantseal on a public standalone network

What are the ramifications of using InstantSeal on a public standalone chain? According to the comments on How to reject empty blocks?, it's quite evident that babe/aura based chains require blocks to ...
Purple_Turtle's user avatar
5 votes
1 answer
382 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
1 vote
2 answers
115 views

Grandpa + Babe finality issues

Starting with the node-template, I switched my chains block authoring from Aura to Babe, which compiles fine but does not manage to finalize any blocks. I suspect it's a wrong genesis configuration. ...
Mathis Wellmann's user avatar
6 votes
2 answers
171 views

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

I've read through various documentation on consensus algorithms, along with the fellow SE post What is the difference between Babe, Aura, and Grandpa?. I'm unsure what the posited advantage of BABE/...
Kayaba's user avatar
  • 125
6 votes
1 answer
79 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
9 votes
1 answer
94 views

How does a collator or validator choose their signing key?

If I were to insert multiple (valid) author keys over RPC, how does a collator or validator choose which key to sign with when producing a block? As far as I know this cannot be set on start-up.
Gregory Hill's user avatar
6 votes
2 answers
59 views

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

All three pallets (babe, grandpa, and authority_discovery) have a field known as MaxAuthorities. For a chain, should these values all point to the same number or can they be different? From ...
Purple_Turtle's user avatar
6 votes
0 answers
101 views

BlockBuilderApi<Block> Trait bounds within node/src/service and rpc [closed]

I am having a problem satisfying all of the trait bounds within the node crate. I am using the polkadot-v0.9.17 branch of substrate, as was recommended on another question here. It is calling ...
Max's user avatar
  • 305
3 votes
2 answers
175 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