-
Notifications
You must be signed in to change notification settings - Fork 446
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
Feature/t8n #6833
Feature/t8n #6833
Conversation
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.
Great to see this PR! 🌠
I just tried the t8n
interface out and stumbled over a couple of things, comments below!
I did a short test of isolated commands; I hope to integrate it fully in ethereum/execution-spec-tests (EEST) very soon, which might trigger more feedback 🙂.
if (specProvider.TerminalTotalDifficulty?.IsZero ?? false) | ||
{ | ||
if (CurrentRandom == null) throw new T8NException("post-merge requires currentRandom to be defined in env", ExitCodes.ErrorConfig); | ||
if (CurrentDifficulty?.IsZero ?? false) throw new T8NException("post-merge difficulty must be zero (or omitted) in env", ExitCodes.ErrorConfig); |
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.
The following env.json
(with a currentlDifficulty
value of "0"
) and --state.fork Cancun
unexpectedly triggers this exception.
{
"currentCoinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentGasLimit": "100000000000000000",
"currentNumber": "1",
"currentTimestamp": "1000",
"currentRandom": "0",
"currentDifficulty": "0",
"currentBaseFee": "7",
"currentExcessBlobGas": "0",
"currentBlobGasUsed": "0",
"parentUncleHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"blockHashes": {},
"ommers": [],
"withdrawals": []
}
I think this resolves it?
if (CurrentDifficulty?.IsZero ?? false) throw new T8NException("post-merge difficulty must be zero (or omitted) in env", ExitCodes.ErrorConfig); | |
if (CurrentDifficulty != null && !CurrentDifficulty.Value.IsZero) throw new T8NException("post-merge difficulty must be zero (or omitted) in env", ExitCodes.ErrorConfig); |
Co-authored-by: yerke26 <yerkebulan@nethermind.io>
# Conflicts: # src/Nethermind/Ethereum.Test.Base/BlockchainTestBase.cs # src/Nethermind/Ethereum.Test.Base/GeneralStateTest.cs # src/Nethermind/Ethereum.Test.Base/GeneralTestBase.cs # src/Nethermind/Nethermind.Blockchain/BeaconBlockRoot/BeaconBlockRootHandler.cs # src/Nethermind/Nethermind.Blockchain/BeaconBlockRoot/IBeaconBlockRootHandler.cs # src/Nethermind/Nethermind.Consensus.AuRa/BeaconBlockRoot/NullBeaconBlockRootHandler.cs # src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.cs # src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.HelperFunctions.cs
# Conflicts: # src/Nethermind/Ethereum.Test.Base/GeneralTestBase.cs
Co-authored-by: danceratopz <danceratopz@gmail.com>
Fixes Closes Resolves #
Please choose one of the keywords above to refer to the issue this PR solves followed by the issue number (e.g. Fixes #000). If no issue number, remove the line. Also, remove everything marked optional that is not applicable. Remove this note after reading.
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Optional. Remove if not applicable.
Documentation
Requires documentation update
If yes, link the PR to the docs update or the issue with the details labeled
docs
. Remove if not applicable.Requires explanation in Release Notes
If yes, fill in the details here. Remove if not applicable.
Remarks
Optional. Remove if not applicable.