-
Notifications
You must be signed in to change notification settings - Fork 20.1k
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
evm t8n calculate difficulty #23249
Labels
Comments
SGTM. So just to clarify even further, I'd propose:
And lastly, the output env always provides the |
Actually, there's one snag; the parent may or may not have uncles. And whether the parent has uncles, affects the difficulty. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current env format is
want to extend the following format to be acceptable (as well as the old one)
new fields: parentDifficulty instead of currentDifficulty
and parentTimestamp
the result file then
would report the new difficulty calculated with geth formula currentDifficulty
Rationale
To avoid point of failure when generating the tests. Currently retesteth calculates the difficulty, but retesteth difficulty formula might be wrong. Since we test the clients, it would make sense that retesteth asks t8ntool what geth evm thinks would be the new difficulty given parentTimestamp and parentDifficulty and currentTimestamp.
The text was updated successfully, but these errors were encountered: