How modify algorand consensus protocol parameters - General - Algorand

How modify algorand consensus protocol parameters

post by rhern336 on Jun 29, 2021

Hello,

I was looking into the Algorand GitHub codebase (go-algorand), I saw that all the parameters are in a file called “consensus.go”. My question is if I would like to edit some of those parameters, for example, the MinTxnFee, MaxTxnNoteBytes, and MaxTxnBytesPerBlock for a local private network. Would I need to compile from source code (to generate the “goal”, and other binaries) or is there a way similar to the “config.json” file to change them?

Thanks for the help.

post by tsachi on Jun 29, 2021

For running local private networks, you can create a file named “consensus.json” which would override the default parameters in consensus.go; please be warned that some permutations of these parameters could place your network in the “untested” territory.

Modifying the above mentioned parameters sounds pretty harmless, nevertheless.

You can use goal protocols > consensus.json to generate the content of that file.

post by rhern336 on Jun 29, 2021

Thanks for your response,

This file would need to be placed inside the data folder correct?

post by tsachi on Jun 29, 2021

Yes, this file is expected to be found in the data directory. ( it’s completely optional )

post by rhern336 on Jul 3, 2021

Hello, I am trying to use consensus.json to change some of the parameters. And I have a few questions, that I was hoping you had the answer for:

1- This file will need to be inside all the nodes that will be participating in the local network?

2- Also when editing consensus.json I find that there are many versions, with the same variables repeated. Should I just select one of them and change it, and then tell the network to use that version? If so how could I do that?

3- The genesis file also brings a string called:

"proto": "https://github.com/algorandfoundation/specs/tree/ac2255d586c4474d4ebcf3809acccb59b7ef34ff"

Is this going to be overwritten with the consensus.json modifications?

post by tsachi on Jul 3, 2021

To answer your question: