-
Notifications
You must be signed in to change notification settings - Fork 163
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
Feat/fakepow delaysealer #180
Conversation
5e060d4
to
9a62f37
Compare
|
Closing this for now since we have no immediate intention of merging the feature to master. Rel #188, though, so if pursuing that feature, keep this feature in mind too. |
…ealer Signed-off-by: meows <[email protected]>
Without this, the only fake part of --fakepow is the VERIFICATION of blocks, not the sealing. This makes the sealer fake with --fakepow as well. Signed-off-by: meows <[email protected]>
Signed-off-by: meows <[email protected]>
This PR is going to be used for #243, so we are re-opening it |
0177c08
to
40564ff
Compare
Date: 2020-12-01 12:50:36-06:00 Signed-off-by: meows <[email protected]> Conflicts: go.mod
Date: 2020-12-01 12:52:44-06:00 Signed-off-by: meows <[email protected]>
cmd/utils/flags.go
Outdated
@@ -1469,6 +1469,10 @@ func setEthashCacheDir(ctx *cli.Context, cfg *eth.Config) { | |||
} | |||
|
|||
func setEthash(ctx *cli.Context, cfg *eth.Config) { | |||
if ctx.GlobalBool(FakePoWFlag.Name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ziogaschr What do you think about including this in this PR?
Although it does indeed seem like something worth doing, I'm inclined to think it should be it's own PR. Maybe we can also think about extending through other possible variations, like maybe --fakepow.poisson
...
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed I would prefer this removed from this PR. It might fit well into #243.
I will remove it now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the --fakepow.poisson
, I was thinking something like --ethash.mode
or --ethash.powmode
enum string flag with values fake, fullFake, poissonFake.
Also, if we add it as a generic cli command and not under the --dev.*
namespace, I would suggest adding something more fancy like --ethash.[pow]modedangerously
.
Not sure how the fakepow will be used, outside of the geth [importChain, exportChain, copyDb, dump, inspect] cmds context, but for now it might make sense to only activating under the --dev
flag and not on real chains.
Installs a configurable fake delay for the PoW
ModeFake
sealer.Sealing time determined by a Poisson distribution and governed by
ethash.threads=<mean seconds (lambda)>
.