Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for custom consensus on private networks #1041

Closed
wants to merge 8 commits into from
Closed

Support for custom consensus on private networks #1041

wants to merge 8 commits into from

Conversation

scholtz
Copy link

@scholtz scholtz commented Jun 20, 2022

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.

@CLAassistant
Copy link

CLAassistant commented Jun 20, 2022

CLA assistant check
All committers have signed the CLA.

@Eric-Warehime
Copy link
Contributor

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?

@scholtz
Copy link
Author

scholtz commented Jun 24, 2022

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

return fmt.Errorf("protocol %s not found", block.CurrentProtocol)
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

Copy link
Contributor

@Eric-Warehime Eric-Warehime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just need to fix the fmt issue

cmd/algorand-indexer/daemon.go Outdated Show resolved Hide resolved
@Eric-Warehime
Copy link
Contributor

Thanks for explaining, @scholtz 😁

cmd/algorand-indexer/daemon.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants