Questions tagged [grandpa]
Any questions relating to the Grandpa pallet or block finality in Substrate chains.
63
questions
16
votes
1
answer
305
views
Equivocation crash (network with ~100 Aura Validators)
We've had a test network running for about 3.5 months with regularly-rotating sets of Aura / Grandpa Validators.
Suddenly, we have run into an issue whereby the vast majority (~2/3) of the network has ...
12
votes
1
answer
694
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
...
11
votes
1
answer
146
views
Understanding service.rs in substrate-node-template
Recently, I have been trying to understand the block import for Aura and Grandpa but I don't understand some parts in substrate-node-template/node/service.rs:
1- In the new_partial() method when ...
10
votes
1
answer
178
views
GRANDPA not finalizing with 2 of 3 nodes on network
I setup a small 3 node network that is using BABE and GRANDPA. When all 3 nodes are connected, it can produce blocks and finalize them. When 2 of the 3 nodes are connected, it can produce blocks but ...
10
votes
1
answer
182
views
Are Offences ever pruned?
In our runtime we have a custom implementation of offence reporting. I want to write an adapter for grandpa equivocation offences (implementing the ReportOffence trait), and have been using the ...
9
votes
2
answers
242
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 ...
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.
8
votes
2
answers
368
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 ...
8
votes
1
answer
667
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 ...
7
votes
2
answers
181
views
What is the internal logic of `--force-authoring` flag?
From where do I get the internal logic of --force-authoring flag?
Here is my scenario:
I've added a custom chain-spec that is similar to the default one where we are setting the environment for --dev ...
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 ...
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/...
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 ...
6
votes
1
answer
115
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@...
6
votes
0
answers
65
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 ...
5
votes
1
answer
151
views
How to build a "super light" bridge based on Beefy?
Is it possible / how to build a Beefy super light client for Kusama or Polkadot?
Beefy is designed to make the syncing process and finality proof very succinct to enable Ethereum on-chain light client....
5
votes
1
answer
415
views
Backing off claiming new slot for block authorship: finality is lagging
What are the steps to take to restart a chain when finality is lagging behind and block productions is also slowing down.
In the logs there are prints like this:
Backing off claiming new slot for ...
5
votes
1
answer
168
views
Local Relay Stops Finalizing
I've been working on getting a test relay up and running in the cloud (Docker containers running on Debian virtual machines) for remote testing, and we've got everything running. The relay chain is ...
5
votes
0
answers
59
views
Is there any good way to keep an intermediate state for an operation between several transactions/blocks in a BABE/GRANDPA-based chain?
I know that the best practices suggest designing transactions (pallet calls) in a way that executes the operation atomically and doesn't keep any intermediate states. This guarantees, that in case a ...
5
votes
0
answers
143
views
Why has finalization stopped?
So I have a validator_count of 2, and 1 as minimum_validator_count. My validator is always online. I had my friend make another validator, had it enter the active validator set, and then join in as a ...
4
votes
1
answer
63
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?
4
votes
1
answer
420
views
How to use noteStalled to recover from a finality lagging chain?
From the documentation:
Grandpa:
noteStalled (delay: u32, best_finalized_block_number: u32)
interface: api.tx.grandpa.noteStalled
summary: Note that the current authority set of the GRANDPA finality ...
4
votes
1
answer
127
views
GRANDPA finality proofs validation and equivocations
I was exploring GRANDPA verification algorithm and stumbled upon this code by the link
https://github.com/paritytech/finality-grandpa/blame/master/src/lib.rs#L494
Source
This is the part of method ...
3
votes
1
answer
246
views
are justification in the Block the actual votes cast by validators in GRANDPA?
Correct me if i'm wrong: In GRANDPA, validators cast votes for the next finalized Block, which is as far as i understand the Block hash signed + metadata(round number,...etc).
My questions are:
Are ...
3
votes
2
answers
136
views
How is an external observer supposed to reliably know when the GRANDPA authorities have changed?
The grandpa.proveFinality rpc provides the justification for the last block by a GRANDPA authorities set (of some set_id) and ancestry headers to prove the finality of a block within the same set_id. ...
3
votes
1
answer
47
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 ...
3
votes
1
answer
85
views
The flow of a GRANDPA round
I am curious about some details regarding a GRANDPA round (explained in detail).
An elected validator that is designated as the primary broadcasts the highest block that it thinks could be final from ...
3
votes
0
answers
34
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 ...
2
votes
2
answers
217
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
1
answer
59
views
Currently, does substrate/polkadot make use of PrimaryProposal stage?
While observing the GRANDPA communication between 2 Substrates nodes and 1 Gossamer node I notice that only Prevotes and Precommmits were being exchanged. Currently, are the PrimaryProposal messages ...
2
votes
1
answer
70
views
Is it possible to have multiple GRANDPA Pause/Resume for one fork?
While reading the spec polkadot-host-spec_v0.1.1.pdf is not clear if the host should track multiple or just one GRANDPA Pause/Resume consensus message per fork until the target block is finalized/...
2
votes
2
answers
93
views
No authoring in network using custom keys, a local Rococo chain specification, and a modified substrate-parachain-template
I have read through the documentation on Substrate.io and have created a network of nodes in both a relay and parachain with custom keys. The network is running in Kubernetes (I would like to have ...
2
votes
1
answer
118
views
Where the GRANDPA round state stored at?
I'm writing a tool to build a fork-off chain. But the new chain can not get finalized.
I've skipped the Babe/Grandpa/Session's storage.
I also check the chain state, that no historical storage under ...
2
votes
1
answer
89
views
How to benchmark pallet Grandpa?
at the moment I struggle a bit with the question of "How to benchmark the Grandpa pallet". Like it seems it's not possible to auto-generate weights at the moment (see here: https://github....
2
votes
0
answers
50
views
Recovering chain from a backup
Prerequisites:
A small subset of validators controlled by my company and a much larger set of external validators.
A backup of the db folder was created 4 hours (1 epoch) before an incident.
...
2
votes
0
answers
18
views
How to add validators node on running chain in pow substrate chain with grandpa?
I'm working on pow substrate chain with grandpa. How can i add the grandpa validators in the running chain?
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 ...
2
votes
0
answers
66
views
Finality lagging
After about 50 blocks my block production slows down because none of the nodes are voting in the finality rounds. I'm working off a codebase that I added the grandpa pallet to, so it's possible I may ...
2
votes
1
answer
27
views
Equivocations error causing some nodes to crash (Follow up question)
We've been investigating an issue that's most likely related to this post, and this issue. But unsure if the underlying cause is the same, I'm looking for some help to confirm my understanding of this ...
2
votes
0
answers
28
views
Grandpa authorities in the context of pallet-staking
In pallet-staking's genesis config there are two items :
pub validator_count: u32,
pub minimum_validator_count: u32,
Question : How are we to interpret them in the context of Grandpa finality? I know ...
1
vote
1
answer
110
views
how to solve Detected prevote equivocation in the finality worker issue?
I am getting this issue after performing the solution of this issue
How can we restart the chain if it becomes stuck during data migration?
Tried to run the existing chain with new chain spec with bad ...
1
vote
1
answer
204
views
Is the random number generation safe for pallet_lottery?
I read this post of Shawn https://substrate.stackexchange.com/a/128/2484 and found out, that random numbers for lotteries are not reliable, even with VRF on GRANDPA since the validators could earn ...
1
vote
1
answer
47
views
Grandpa AuthorityWeights
There's code in Grandpa to have different "Authority Weights" assigned to each validator. It doesn't appear to be accessible beyond in a genesis block. Does someone know the intended purpose ...
1
vote
1
answer
185
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 ...
1
vote
1
answer
96
views
Why is App_Crypto not building in frame system runtime [closed]
When building I am running into this error:
error: cannot find macro `format` in this scope
--> /Users/jackson/.cargo/git/checkouts/substrate-7e08433d4c370a21/22d40c7/primitives/finality-...
1
vote
2
answers
116
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. ...
1
vote
1
answer
63
views
How to recover finality after validator "forced" it due to high finality lag (500+ blocks)
Following a relay runtime upgrade for westend 103000 (which contained a broken migration of the beefy keys), our chain stopped finalizing blocks (all validators, except 1, had the wrong keys on-chain)....
1
vote
0
answers
22
views
How do I disable grandpa in polkadot-parachain?
There is a flag that you can add when running polkadot-parachain
--no-grandpa
Disable GRANDPA.
Disables voter when running in validator mode, otherwise disable the ...
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?
1
vote
1
answer
61
views
thread 'tokio-runtime-worker' has overflowed its stack fatal runtime error: stack overflow Aborted (core dumped)
we are running a stand alone Blockchain network by using POA consensus mechanism. The chain was working fine and after producing 8 Lac Blocks the nodes we down and now i have tried to re-execute same ...