Noah Bergh
Noah Bergh

Reputation: 495

My substrate node is not producing blocks how do i solve this?

I've implementen the treasury, session collective and staking pallets myself. why doesn't my node produce blocks? https://github.com/noahsalvadordenjo/unprod.git

Upvotes: 1

Views: 980

Answers (1)

Shawn Tabrizi
Shawn Tabrizi

Reputation: 12434

It will not be enough to simply add Staking, Elections, Session, etc to the Node Template Runtime and have a NPoS system working.

Unfortunately the Substrate Node Template uses AURA, which is a Proof of Authority consensus algorithm, that is defined here:

https://github.com/noahsalvadordenjo/unprod/blob/new_branch/node/src/service.rs

And matching runtime components which are defined in the runtime.

If you want to start with a NPoS node, I recommend starting with the base substrate node here:

https://github.com/paritytech/substrate/tree/master/bin/node

And then remove from it any optional pallets you may not be using. Otherwise, maybe you can learn from it how to implement BABE consensus instead of AURA, but this is a little bit out of scope for a new Substrate developer.

Upvotes: 2

Related Questions