3

I am currently working on a substrate project that uses the PoA consensus algorithm. I would like to implement a POC for a new consensus algorithm. I have some experience with substrate but I'm new to consensus algorithm implementation.

I have done the following steps:

Understand the substrate's architecture and the current PoA consensus algorithm Identify the changes to be made for the new consensus algorithm I'm now facing the following issues:

  • I am not sure how to write the code for the new consensus algorithm
  • I am not sure how to test the code
  • I am not sure how to integrate the code into the substrate network..

Can anyone provide me with some guidance on how to proceed with this task, or point me to resources or examples that may be helpful?

1 Answer 1

0

I am going to try to give you some resources that can help you.

First I recommend you start looking into the Substrate node template. It is a basic node template so will be helpful to see how is constructed, and for your question about how to test the code.

To reach consensus it has Aura for block authoring and GRANDPA finalization by default, but you can change it and implement your own consensus mechanism.

Then take a look into the tutorial Building a resilient PoA blockchain with Substrate which will give you a walkthrough of how to built a self-healing PoA (Proof of Authority) blockchain and solve the issue about how to write the code for the new consensus algorithm.

And finally check the code of that tutorial as a guide to help you with how to integrate the code into the substrate network.

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.