indexer icon indicating copy to clipboard operation
indexer copied to clipboard

Support for custom consensus on private networks

Open scholtz opened this issue 3 years ago • 4 comments

Summary

Algorand indexer at the moment does not allow using custom consensus on private networks. This pull request adds this feature.

Test Plan

I tested it manually on custom made private network with custom consensus.

scholtz avatar Jun 20 '22 22:06 scholtz

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 20 '22 22:06 CLAassistant

Hi, I'm not sure if I can see what this would do since block data in the indexer is imported independent of the consensus process. Can you give me a bit of background on why you might need this change?

Eric-Warehime avatar Jun 23 '22 22:06 Eric-Warehime

hi @Eric-Warehime

sure, algod loads correctly custom consensus from consensus.json file.

but there is no way to use custom consensus with the indexer..

the indexer without this bugfix fails here https://github.com/algorand/indexer/blob/5be3c0e17e455b037a05c941b305a4378b420d55/importer/importer.go#L27 with error protocol 'custom-protocol' not found

if you want, you can find the way to load consensus from the algod server, but right now you are using hardcoded consensus values with no option to extend it.. this PR is simple fix to resolve the issue with ability to provide consensus.json file with the indexer

scholtz avatar Jun 24 '22 10:06 scholtz

Thanks for explaining, @scholtz 😁

Eric-Warehime avatar Jul 01 '22 16:07 Eric-Warehime