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

ecip 1099 #186

Merged
merged 26 commits into from
Sep 30, 2020
Merged

ecip 1099 #186

merged 26 commits into from
Sep 30, 2020

Conversation

iquidus
Copy link
Contributor

@iquidus iquidus commented Sep 18, 2020

Implements ECIP-1099 (Calibrate Epoch Duration) specified at ethereumclassic/ECIPs#367

@meowsbits meowsbits self-requested a review September 18, 2020 13:23
@iquidus
Copy link
Contributor Author

iquidus commented Sep 18, 2020

One thing im unsure on is how much we want to ethash > etchash. imo anything additional is primarily cosmetic, and adds burden to future maintenance. i.e renaming the consensus engine.

@meowsbits
Copy link
Member

meowsbits commented Sep 18, 2020

Yea, wherever (in the code) the name doesn't serve an important and functional distinction, I would use ethash. After all, core-geth still supports a lot of different networks!

eth/config.go Outdated Show resolved Hide resolved
cmd/geth/misccmd.go Outdated Show resolved Hide resolved
cmd/utils/flags.go Outdated Show resolved Hide resolved
cmd/utils/flags.go Outdated Show resolved Hide resolved
cmd/geth/main.go Outdated Show resolved Hide resolved

case (ctx.GlobalBool(ClassicFlag.Name) || ctx.GlobalBool(MordorFlag.Name)) && cfg.Ethash.DatasetDir == eth.DefaultConfig.Ethash.DatasetDir:
// ECIP-1099 is set, use etchash dir for DAGs instead
home := os.Getenv("HOME")
Copy link
Member

@meowsbits meowsbits Sep 28, 2020

Choose a reason for hiding this comment

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

This copy-pasta will be able to be replaced with an exported HomeDir function, coming from https://github.com/etclabscore/core-geth/pull/191/files#diff-fdd625b1499a66d8f93635113abdd5e0R202.

🎉

@meowsbits
Copy link
Member

The results of a benchmark comparison on the ethash functions, comparing master against this branch.

> benchstat .ia/master.out .ia/ecip1099.out 
name                              old time/op  new time/op  delta
CacheGeneration-12                 1.24s ± 0%   1.30s ± 0%   ~     (p=1.000 n=1+1)
SmallDatasetGeneration-12          172ms ± 0%   163ms ± 0%   ~     (p=1.000 n=1+1)
HashimotoLight-12                 10.8ms ± 0%   5.2ms ± 0%   ~     (p=1.000 n=1+1)
HashimotoFullSmall-12              106µs ± 0%    91µs ± 0%   ~     (p=1.000 n=1+1)
HashimotoFullMmap/WithLock-12     12.3µs ± 0%  13.4µs ± 0%   ~     (p=1.000 n=1+1)
HashimotoFullMmap/WithoutLock-12  12.4µs ± 0%  12.3µs ± 0%   ~     (p=1.000 n=1+1)

…tests

Signed-off-by: meows <b5c6@protonmail.com>
@meowsbits meowsbits self-requested a review September 30, 2020 15:39
@meowsbits
Copy link
Member

Need to fix the fork tests

96fc7ee removed the activation, for now.

This commit fixes the tests for that.

Signed-off-by: meows <b5c6@protonmail.com>
@iquidus iquidus merged commit 3bd2233 into etclabscore:master Sep 30, 2020
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.

None yet

2 participants