Skip to main content
13 votes
Accepted

Are weights really neccessary?

During block authorship, the execution time of each transaction is measured, rather than weights right? We don't measure the execution time per extrinsic. Each block has a fixed slot for proposing/...
bkchr's user avatar
  • 11.6k
9 votes

Are weights really neccessary?

The main reason is it is impossible to deterministically determine the execution time of a transaction without heavy overhead (e.g. gas metering). For example, user send a transaction, the execution ...
Bryan Chen's user avatar
6 votes
Accepted

Increasing Block Size

You not only need to allow the block to get bigger, you also need to allow a higher BlockWeights. The BlockWeights is a parameter given to the frame_system::Config trait. It defines the amount of ...
bkchr's user avatar
  • 11.6k
4 votes

Single node performance

After writing some benchmarks and making some code changes, I was able to make the block production constant. At the time, I'm able to handle ~1000tx per block (6s), which is not bad at all. To make ...
4 votes
Accepted

Can a parachain recover from a "block taking too long" error?

If this is just one transaction, you can restart the collators to get rid of the transaction. The transaction pool doesn't persist any transactions. But be aware that other nodes also may have the ...
bkchr's user avatar
  • 11.6k
3 votes
Accepted

No block are producing while running node in dev mode

I can see from repo you provided, you are changing consensus from AURA to BABE but as I go through your runtime, there were still the implementation of AURA consensus present, that needs to be removed ...
Shubham Gupta's user avatar
3 votes

How and where does a block production take place?

Simply put, BABE(-pallet) provides logic which decides who, for a certain amount of blocks, is allowed to author a new block. Authoring a block is filling the block with valid transactions from the ...
Daan van der Plas's user avatar
3 votes
Accepted

Why Does Subscan Show Only 12M Blocks And Not Several 100M?

Polkadot is running since roughly two years. If you take this into account: 2 years * 365 days * 24 hours * 60 minutes * 60 seconds / 6 You will end up with 10512000. So, not really several 100 ...
bkchr's user avatar
  • 11.6k
3 votes
Accepted

Why my solo chain block time is 12 seconds when set to 6?

Does your Aura chain_spec.rs have 2 validators in it? Aura is a round-robin based protocol, if you have more than 1 validator, it will expect another block to be made in order of the list of ...
Drew Stone's user avatar
  • 1,194
3 votes

Blocktime double than expected (Standalone network)

The issue was that two of the validator nodes did not have the aura keys inserted, hence when the chance came to these validators the blocks were skipped. Fixed by adding missing aura keys to the ...
0xsierra's user avatar
  • 106
3 votes
Accepted

The purpose of epochs in staking

In a proof-of-stake protocol there are usually two distinct categories of systems for determining the eligibility of a given validator to issue a block: Computed publicly by performing some ...
André's user avatar
  • 2,455
2 votes
Accepted

What happens if a validator goes offline and it's part of the session?

First, bear in mind that Polkadot uses a block authoring system completely different to what you saw in the validator-set pallet you mentioned in your question. In Polkadot, BABE algorithm assigns ...
Iker's user avatar
  • 1,356
2 votes
Accepted

Split extrinsic execution across multiple blocks

An example of splitting large transactions between several blocks can be found in crowdloan.refund. The basic idea is that you define a limit L of items that can be processed at once based on the ...
Valentun's user avatar
  • 220
2 votes
Accepted

Do data in events increase the size of the block?

The actual events are not stored in the block, rather they are part of your blockchain's state and are stored in your blockchain's storage. The state root is the only thing related to your events that ...
Bruno's user avatar
  • 8,315
2 votes
Accepted

Parachain missed blocks due to relay wrong announcement?

Issue has been discussed & closed here: https://github.com/paritytech/polkadot/issues/6758
Bruno's user avatar
  • 8,315
2 votes

How to add block author through InherentDataProvider in pow consensus?

Personally I don't understand why they used inherents here instead of using digest. That said, the code you are pointing to is for generating the inherents for the block to import. Those inherents are ...
gui's user avatar
  • 221
1 vote
Accepted

How can we restart the chain if it becomes stuck during data migration?

I believe you should label that block as a bad block in the chain spec file, you can check Kusama's chain spec file for an example. Clear the validators' database and resynchronize to the previous ...
AurevoirXavier's user avatar
  • 10.7k
1 vote

Stopped block production / aura

Looks like you have bricked your network by sending a wrong noteStalled. You need to restart the chain.
bkchr's user avatar
  • 11.6k
1 vote

How much do relaychain node hardware requirements dictate the parachain collator hardware requirements?

A parachain needs to use the same hardware for benchmarking as the relay chain to ensure that the validators will be able to import the block in time. So this is primarily about block import - not ...
Oliver Tale-Yazdi's user avatar
1 vote

How much do relaychain node hardware requirements dictate the parachain collator hardware requirements?

As far as I know the minimum requirements for a parachain are stablished by the relay-chains minimum hardware. I would have to dig deeper as to where this is imposed but there is a pretty interesting ...
Valentin Fernandez's user avatar
1 vote
Accepted

Usage of Pre-Runtime Digest to gossip data from block creator node with PoW

DigestItem::PreRuntime is completely fine to put in a block. Nothing checks by default these pre-runtime digests. Your runtime should reject to build a block when there is no pre-runtime digest. It ...
bkchr's user avatar
  • 11.6k
1 vote

how to run some logic before gossiping the block as author?

If you want to do some work before announcing a block to the network, you can do it the following way. You will need to change this code to something like this: // Don't let the internals announce ...
bkchr's user avatar
  • 11.6k
1 vote
Accepted

Substrate Node wont restart

You can not delete individual blocks from the database that easily. When you have run out of disk space with the node running, it means that you have corrupted the database. The only solution for this ...
bkchr's user avatar
  • 11.6k
1 vote
Accepted

Parachain cannot build blocks after winning a slot

So we found the issue, thanks to the checklist here - Thanks a bunch @bruno. We had previously checked whether author.hasKey worked, and we overlooked it since it didn't return true for us on t0rn. ...
AwesomeIbex's user avatar
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

Clean node template doesn't produce blocks due to "No route to host" error

Adding --dev flag to the boot command helped. Turned out this problem has no relation to network error.
Bob Satikin's user avatar
1 vote

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

Praos has a performance & resource utilization problem, not a liveness problem. BABE's secondary slots, and Sassafras, make the chain faster & more efficient. As proven by the Praos paper, we ...
Jeff Burdges's user avatar
1 vote
Accepted

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

Seems like this have been fixed without doing anything from our side.
Marko Petrlić's user avatar
1 vote
Accepted

Substrate Stencil node not producing blocks

Found out that using derive when creating keys for authoring and finalization doesn't go well together. What I've been doing: ./target/release/substrate-stencil key inspect --password-interactive --...
Burak's user avatar
  • 903
1 vote

parachain-system can not get ParachainInherentData After runtime upgrade

Couple things to make sure: bump the spec_version use authorize_upgrade and enact_authorized_upgrade
Bruno's user avatar
  • 8,315

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