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

Disable ethash by replacing with ethash.NewFullFake #318

Merged
merged 3 commits into from
Apr 19, 2018

Conversation

jimthematrix
Copy link
Contributor

Given that the Raft consensus is implemented as a Service rather than a consensus engine, it essentially runs alongside ethhash. Most of the time the fact that ethash is "active" is not an issue, but in some circumstances this can have negative impact on the Geth node's availability. What we have observed is that when the memory allocated to the Geth process is low, generating and regenerating the ethash verification cache can take a long time (several minutes) and as this is happening the node is not able to commit blocks.

This PR is an attempt to disable ethash. I found using Geth's built-in "faked pow" works pretty well. But surely more testing could be done to ensure this doesn't impact how Raft behaves. Note that this change does not impact IBFT.

@jpmsam jpmsam self-requested a review March 29, 2018 20:13
eth/backend.go Outdated
// For Quorum, Raft run as a separate service, so
// the Ethereum service still needs a consensus engine,
// use the consensus with the lightest overhead
log.Warn("Ethash used in full fake mode")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make it the default consensus instead of removing the switch statement completely?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks @jpmsam for the review, makes sense to me, this way the other test/fake flavors of ethash can still be used. Just pushed another commit to address your comment

@jpmsam
Copy link
Contributor

jpmsam commented Mar 29, 2018

Thanks @jimthematrix , we'll have to do a bit more testing but it seems like this could save geth from allocating memory for ethash unnecessarily.

…ult so other test/fake flavors can still be used
@jpmsam
Copy link
Contributor

jpmsam commented Apr 19, 2018

Thanks @jimthematrix , please complete the CLA and email it to [email protected]

@jimthematrix
Copy link
Contributor Author

@jpmsam thanks for the information, just sent the signed CLA scan to the email address.

@jpmsam jpmsam merged commit aa163f0 into Consensys:master Apr 19, 2018
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.

2 participants