Skip to content

Optimism - Isthmus#8260

Merged
Scooletz merged 75 commits into
masterfrom
feat/optimism-isthmus
May 6, 2025
Merged

Optimism - Isthmus#8260
Scooletz merged 75 commits into
masterfrom
feat/optimism-isthmus

Conversation

@Scooletz

@Scooletz Scooletz commented Feb 24, 2025

Copy link
Copy Markdown
Contributor

Resolves #8235

This PR introduces Isthmus hard fork for Optimism

Changes

  • withdrawals root
  • operator gas fee
  • refactoring of the tests towards optimism spec helper

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

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

A hard fork.

Documentation

Requires documentation update

  • Yes
  • No

Requires explanation in Release Notes

  • Yes
  • No

Link to the Optimism spec and potentially more, whatever we do on the hard fork.

@Scooletz Scooletz force-pushed the feat/optimism-isthmus branch from 0d4a10a to cffab71 Compare February 27, 2025 10:05
/// <summary>
/// https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/preinstalls.md#create2deployer
/// </summary>
public static readonly Address Create2Deployer = new("0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Our superchain.py script generates the appropriate Chainspec file which includes constants like create2DeployerAddress so we don't need to have these hardcoded:

"create2DeployerAddress": "0x13b0D85CcB8bf860b6b79AF3029fCA081AE9beF2",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The reason for it being amended here was the chainspec included in the optimism-package had none of these values and they were required to run it. Also, this is aligned to how op-geth works with the optimism specific values that are specified in the spec of the op stack. Probably for further discussion.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should probably update the scripts in the optimism-package (gen2spec.jq) then so we include these fields like we do in our superchain.py script.

Comment thread src/Nethermind/Nethermind.Optimism/Raw/Create2Deployer.data
Comment thread src/Nethermind/Nethermind.Optimism/OptimismHeaderValidator.cs Outdated
Comment thread src/Nethermind/Nethermind.Optimism/OptimismPlugin.cs Outdated
@emlautarom1 emlautarom1 marked this pull request as ready for review May 2, 2025 17:40
@emlautarom1 emlautarom1 requested a review from rubo as a code owner May 2, 2025 17:40
@emlautarom1 emlautarom1 requested a review from a team May 2, 2025 17:40

@emlautarom1 emlautarom1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There are a couple of changes that seem redundant at first glance, and there is some commented out code (in tests too).

Comment thread src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.cs
Comment thread src/Nethermind/Nethermind.Optimism/Rpc/OptimismReceiptForRpc.cs Outdated
Comment thread src/Nethermind/Nethermind.Optimism/L1BlockGasInfo.cs Outdated
Comment thread src/Nethermind/Nethermind.Optimism/OptimismBlockProcessor.cs Outdated
Comment thread src/Nethermind/Nethermind.Optimism/OptimismHeaderValidator.cs Outdated
Comment thread src/Nethermind/Nethermind.Optimism.Test/OptimismTransactionProcessorTests.cs Outdated
Comment thread src/Nethermind/Nethermind.Optimism.Test/OptimismWithdrawalTests.cs Outdated
Comment thread src/Nethermind/Nethermind.Optimism.Test/Spec.cs Outdated
Comment thread src/Nethermind/Nethermind.sln.DotSettings Outdated
@emlautarom1 emlautarom1 requested a review from deffrian May 2, 2025 18:16

@emlautarom1 emlautarom1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. A couple of small comments pending (merge OptimismWithdrawalsProcessor), and some unused imports.

emlautarom1

This comment was marked as duplicate.

/// <summary>
/// Builds the block context ouf the block and the release spec.
/// </summary>
protected virtual BlockExecutionContext BuildBlockContext(Block block, IReleaseSpec spec) => new(block.Header, spec);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's also put IReleaseSpec in BlockExecutionContext, so we won't have to pass SpecProvider or spec to some places!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We definitely could do it @LukaszRozmej . Let's merge and release Isthmus first, then I'll send a small PR to make this externalized.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sure don't want to block urgent stuff. Just throwing improvement ideas.

@flcl42 flcl42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

src/tests updated to older version probably

Comment thread src/Nethermind/Nethermind.Optimism/L1BlockGasInfo.cs
Comment thread src/Nethermind/Nethermind.sln.DotSettings Outdated
@Scooletz Scooletz merged commit b543a3c into master May 6, 2025
79 checks passed
@Scooletz Scooletz deleted the feat/optimism-isthmus branch May 6, 2025 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OP Stack hardfork support - Isthmus

7 participants