20
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 ...
10
votes
Accepted
Proof of Stake algorithms, why use Aura as block producer?
I was under the impression that in proof of stake, or as substrate uses it, nominated proof of stake, the block producers are chosen by stake, into a set known as validator set through phragmen ...
10
votes
How to revert a bricked chain due to bad setCode
You can use the revert command to revert unfinalized blocks. If you need to revert finalized blocks then I suggest you do the following:
Assuming you want to revert to block #42;
Add the hash of ...
5
votes
How to revert a bricked chain due to bad setCode
I figured out how to revert some blocks:
./{chain executable} revert --base-path /home/ubuntu/chains --chain {chain name}--keep-blocks 351284 --pruning archive
For options:
./{chain executable} ...
5
votes
Advantages of BABE/GRANDPA over Aura for sovereign chains when weights are equal
Validator selection. Aura is in a round-robin fashion and therefore has predictable block authors, Babe does not.
If you can predict the validators for a specific block way into the future, you can ...
4
votes
Accepted
Why the block author is always `Alice`?
The slot duration in your runtime is wrong:
pub const MILLISECS_PER_BLOCK: u64 = 6_000;
pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;
You are running a parachain that can only produce a block ...
4
votes
Accepted
how to get the current block author?
You can do so by implementing the pallet_authorship::EventHandler. pallet-collator-selection does exactly this, which is a pretty straightforward example.
Then, in the top level runtime, any pallet ...
4
votes
How does a collator or validator choose their signing key?
This is what session.set_keys achieves, it declares that an on-chain account (presumably with keys in some form of cold storage) will sign blocks/consensus messages with some other key. When a node ...
4
votes
Accepted
How could I configure that reward amount or value for my Aura validators?
I got it working, PoA will reward the validator who created the block using the tip as the sample value for the fees, here are the steps:
Install the pallet_authorship
pallet-authorship = { version =...
3
votes
Accepted
How many transactions with equal priority can be imported in one block?
The solution was much simpler than I imagined. In my ValidateUnsigned, I added a check to restrict the transactions from TransactionSource::External, and completely forgot that the transactions that ...
3
votes
Accepted
Consensus algorithm selection
AURA determines the next block author from a given set of validators. The staking pallet is used to manage funds at stake by network maintainers.
They can be used in correlation; AURA determines the ...
3
votes
Accepted
Advantages of BABE/GRANDPA over Aura for sovereign chains when weights are equal
GRANDPA is orthogonal to the blockchain extension algorithm. GRANDPA doesn't create blocks but only finalizes blocks that have already been created.
One main downside to Aura is the fact that the ...
2
votes
How to access and sign messages with keys from SessionKeys Keystore such as Aura?
In order to fetch the keys for a specific KEY_TYPE such as AURA you just need to use that keystore and pass in the respective KeyType w/ sr25519 / ecdsa / ed25519.
pub fn sr25519_public_keys(&self)...
2
votes
does the block gets signed by all authorities in aura?
The 2/3 number actually comes from another mechanism, grandpa, which achieves finality. The logic of block authoring and block finalization is split between aura and grandpa. The aura authorities take ...
2
votes
Accepted
Decentralize substrate template
Check this Substrate Tutorial: https://docs.substrate.io/tutorials/get-started/add-trusted-nodes/
It shows you how the validator that wants to join your node can to generate their keys, how to modify ...
2
votes
No authoring in network using custom keys, a local Rococo chain specification, and a modified substrate-parachain-template
For the next person facing a similar issue, I managed to get both the relay chain and the parachain to produce blocks.
It turned out that I had an issue with the initialization of the keystore of the ...
2
votes
What is this strange balance transfer that occurs during utility.batch?
Edited after feedback from @German Nikolishin below.
It seems this transfer is the cost associated with storing data in the contract. The value inside the transfer is sent to what I presume is the ...
2
votes
Custom session keys in Chainspec for Mainnet config
Because AccountId was implemented From<[u8; 32]>. And the KeyId(aura, babe, grandpa...) was implemented UncheckedFrom<[u8; 32]> instead of From<[u8; 32]>.
Read more: https://...
2
votes
Do we have any reference of solochain using DPOS consensus?
There are a few chains in our ecosystem using DPoS. You can start here:
https://medium.com/kilt-protocol/the-continuing-evolution-of-kilt-protocol-limited-delegated-proof-of-stake-640403427c48
https:/...
2
votes
Do we have any reference of solochain using DPOS consensus?
You can also check out this https://github.com/darwinia-network/darwinia/blob/main/pallet/staking/src/lib.rs.
This is our staking pallet, which is used in a parachain but does not rely on any ...
2
votes
Accepted
Is the Aura Slot Inherent Necessary?
When using Aura as a standalone chain the slot worker is used to drive block production. The slot worker requires that the InherentDataProvider includes the slot number (https://github.com/paritytech/...
2
votes
Accepted
Started getting: Aura pallet "Slot must increase" Error on running collator
Problem
I stumbled upon the same issue yesterday and it turns out it has to do with a missing configuration for async backing on the parachain side.
Rococo has async backing enabled and it needs some ...
1
vote
Accepted
Why we add keys to the the key store?
Keys are incorporated into a keystore due to their requirement by consensus algorithms for signing consensus messages. The keystore serves as a secure repository for these keys, offering an organized ...
1
vote
Why we add keys to the the key store?
Your node needs the private keys to sign e.g. blocks or grandpa commits
1
vote
How to enable warp sync with Aura consensus?
Warp sync protocol works thanks to the Grandpa protocol. Without Grandpa it is not possible.
1
vote
How to replace aura with babe?
You can replace aura with babe but easier way is to use the substrate node directly which already implements babe and has NPoS consensus.
If you still want to convert aura to babe than first go ...
1
vote
Understanding service.rs in substrate-node-template
In the new_partial() method when initializing Aura import queue it doesn't actually use grandpa's block import, it uses a grandpa's decorated block import. Block imports implement a chain of ...
1
vote
How to disable "tips" with Aura?
Tips are just to provide priority to a transaction and you can find the logic of tip in pallet_transaction_payment here, the function get_priority is where tip is being included in the transaction, ...
1
vote
Accepted
can't construct sr25519 Public key from AuthorityId in pallet but it works in outer node? Same function
Check https://github.com/paritytech/substrate/blob/549165727c3b3c14b6f90011085aaebbeff9d7e3/frame/aura/src/lib.rs#LL72-L76C20.
Because it doesn't have a ByteArray trait bound, you can't do that.
But ...
1
vote
Node template based network runs with multiple peers using the same identity
There is no limitation on the node side. You could start multiple Bob nodes at the same time.
But we have do_report_equivocation on the runtime to prevent/punish this misbehaviour.
You could check the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
aura × 45consensus × 15
babe × 13
grandpa × 9
substrate-node-template × 7
pallet × 3
parachain × 3
staking × 3
session × 3
proof-of-stake × 3
parachain-collator × 3
polkadot × 2
transactions × 2
collator × 2
finality × 2
frontier × 2
validator × 2
substrate-node × 1
polkadot-js × 1
storage × 1
extrinsic × 1
rococo × 1
chainspec × 1
evm × 1
upgrade × 1