Skip to main content
19 votes
Accepted

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

For a blockchain to continue growing and adding new transactions in a meaningful way, two things must happen to solve the problem of distributed consensus. Typically, these jobs are performed by full ...
JoshOrndorff's user avatar
  • 1,201
12 votes

How to find how many transactions are pending from address to be added to block?

The author_pendingExtrinsics RPC provides the list of pending extrinsics that is in the pool. This is retrieved on a per-node basis, i.e. it will list the extrinsics that is available for the specific ...
Jaco's user avatar
  • 5,875
10 votes

GRANDPA not finalizing with 2 of 3 nodes on network

You can't do that in any safe manner. Every BFT consensus algorithm requires the total number of nodes to be at least 3f + 1 where f is the number of faulty nodes. In your case you have one faulty ...
André's user avatar
  • 2,465
8 votes

What is the internal logic of `--force-authoring` flag?

The --force-authoring flag tells a node to produce blocks when it is "offline", i.e. has no other peers. By default, a node assumes if it has no peers, that it is not connected to the ...
Shawn Tabrizi's user avatar
  • 16.2k
7 votes
Accepted

How to use noteStalled to recover from a finality lagging chain?

You should pass #57281 as the second parameter to the noteStalled call since that is the last block that was finalized, this means that when the GRANDPA validator set is forcibly changed it will ...
André's user avatar
  • 2,465
7 votes
Accepted

Recovering from stalled finality (babe/grandpa)

The issue lacks details to know exactly what went wrong in the first place (why did finality stop?). That said here are the steps you should have taken in order to debug the problem. Use the ...
André's user avatar
  • 2,465
5 votes
Accepted

Why are finalized blocks zero?

For grandpa the keys need to exist before starting grandpa. As you have inserted the keys after you have started the node, grandpa isn't picking them up. So, restarting the node will make finality ...
bkchr's user avatar
  • 11.6k
4 votes

Validation of Transactions Executed in on_finalised Function within the Hook

You mean on_finalize? There are no transactions executed in that. It is called by the block author to finalize the built block. But all state changes that happen in there are guarded by consensus and ...
Oliver Tale-Yazdi's user avatar
4 votes

What is the internal logic of `--force-authoring` flag?

--force-authoring is defined here. It is part of the config so you can call it internally like so config.force_authoring. As far as it's logic in the code-base, I see it being used explicitly here: if ...
Bruno's user avatar
  • 8,335
3 votes
Accepted

how to solve Detected prevote equivocation in the finality worker issue?

There aren't enough details in this question to be able to solve your problem. If when you started the archive node you stated seeing GRANDPA equivocations it means that this node is actually voting. ...
André's user avatar
  • 2,465
3 votes

How is an external observer supposed to reliably know when the GRANDPA authorities have changed?

The issue you are describing is called weak subjectivity and it's inherent to Proof-of-Stake systems (some useful links on the subject: https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/...
André's user avatar
  • 2,465
3 votes

How is an external observer supposed to reliably know when the GRANDPA authorities have changed?

Yes, RPC nodes can lie about an arbitrary number of things. I guess RPC interfaces can be designed to also provide proofs; in this case one could add a new RPC method that provides a proof similar to ...
adrian's user avatar
  • 241
3 votes
Accepted

Grandpa stuck at "Polling"

The issue was the error: "ERROR tokio-runtime-worker sub-libp2p: add_set_reserved_peer with unknown protocol: /b0d742dbbf156179748027452dcd7c57c4eec99183ddab43f8def5c2b8bfcad6/grandpa/1 " ...
Justin Frevert's user avatar
3 votes
Accepted

What are the various consensus mechanism and how are they best leveraged

There is a short nice write up on consensus here: https://docs.substrate.io/fundamentals/consensus https://wiki.polkadot.network/docs/learn-consensus If you're looking for more detailed info: PoW ...
Bruno's user avatar
  • 8,335
2 votes

What are the various consensus mechanism and how are they best leveraged

To add a note regarding rationales: We recently switched the consensues to manual/instant seal for substrate-contracts-node. The rationale was that this particular node is mostly used for local ...
cmichi's user avatar
  • 2,800
2 votes

Grandpa stuck at "Polling"

Please try the following: It seems like you've tried to created a custom chain definition to synchronise and validate with different authorities. But you've only created a custom chain specification ...
Luke Schoen's user avatar
  • 2,346
2 votes
Accepted

GRANDPA finality proofs validation and equivocations

GRANDPA tolerates up to 1/3 of the validator set equivocating. Whenever a voter equivocates that is counted as voting for everything (quoting from the paper: "We count equivocations as votes for ...
André's user avatar
  • 2,465
2 votes
Accepted

What's the best practice to check whether a block hash is in the canonical chain or not in Substrate?

To check whether a block hash H is on the canonical chain in Substate: Query the block number of this block hash using client.number(H). Query the block hash of the queried block number above using ...
xlc's user avatar
  • 71
2 votes

Finality 502 blocks behind production on our relay testnet

You can send: Initializer::ForceApprove(Root, HighestBlock) Send this as transaction to the chain and it should start finalizing.
bkchr's user avatar
  • 11.6k
2 votes
Accepted

How to find how many transactions are pending from address to be added to block?

thanks guys for offering answers. I got partial answer from @Luna. Here is solution I came up with. Problem: After firing n number of transactions in burst, from same address, I wanted api which will ...
pravin k's user avatar
  • 111
1 vote
Accepted

How to contribute a bulk coretime region to an instantaneous coretime pool to earn rewards and so it remains renewable indefinitely?

There seem to be multiple questions, so I will try to answer them one by one. Yes, the registration cost is fixed at the maximum amount, even for runtimes as simple as the adder collator. The reason ...
Szegoo's user avatar
  • 642
1 vote

Rococo node crashing due to beefy gadget

The issue you're having comes from doing the initial sync using fast-unsafe combined with --blocks-pruning 300. What happens is: you start with empty DB -> no BEEFY state/info whatsoever, fast ...
adrian's user avatar
  • 241
1 vote

Beefy justification subscription is not working

Thank you for reporting this ! Looks like the definition of beefy::subscribeJustifications() from polkadot-js/api is outdated. Published a PR that should fix it: https://github.com/polkadot-js/api/...
Serban Iorga's user avatar
1 vote
Accepted

Cannot produce and finalize blocks with 2 node peer

I found the problem is substrate. Substrate version v9.20 has problem, so can not peer-id or product block or finalize block. After I upgrade to v9.24, this issuse was gone.
oscar's user avatar
  • 33
1 vote

Cannot produce and finalize blocks with 2 node peer

Steps in configuring local_testnet (private network) Create bootnode keys: # botnode aura $ subkey generate --scheme sr25519 Secret phrase: tackle memory pepper lake seed afford since state ...
hgminerva's user avatar
  • 467
1 vote
Accepted

Web3 Foundation - Accountable light clients via BLS multisignature rollup

I have found the slides from zksummit7: https://drive.google.com/file/d/1BrKuqib5msj_M_kiCorSYWBFvP9VlTCg/view?usp=sharing The slides reference the github repo: https://github.com/w3f/apk-proofs Of ...
TauLepton's user avatar
  • 107
1 vote

How can I make my node generate blocks only when they receive transactions?

There are two consensus (or "block authoring" --whichever you prefer to call them) algorithms that might be exactly what you need: 1- Manual seal: Where there is one author and it authors a ...
Daan van der Plas's user avatar
1 vote
Accepted

Can a parachain experience a fork?

There is no feasible situation under which a parachain has finalized blocks rearranged. For all practical purposes, finalized blocks are final and will not change. However, there are some situations ...
Nate Armstrong's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible