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

Feature/t8n #6833

Closed
wants to merge 142 commits into from
Closed

Feature/t8n #6833

wants to merge 142 commits into from

Conversation

yerke26
Copy link
Contributor

@yerke26 yerke26 commented Mar 15, 2024

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

  • List the changes

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

Optional. Remove if not applicable.

Documentation

Requires documentation update

  • Yes
  • No

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

  • Yes
  • No

If yes, fill in the details here. Remove if not applicable.

Remarks

Optional. Remove if not applicable.

Copy link

@danceratopz danceratopz left a 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 🙂.

tools/evm/Program.cs Outdated Show resolved Hide resolved
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);

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?

Suggested change
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);

stdevMac and others added 17 commits October 16, 2024 12:56
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>
@yerke26 yerke26 marked this pull request as draft October 30, 2024 22:46
@yerke26 yerke26 closed this Oct 30, 2024
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.

9 participants