Skip to content

feat: Make GenerateOpCodes and ExecuteTransaction overridable in VM#9078

Merged
hudem1 merged 5 commits into
feature/arbitrum-setupfrom
hudem1/feat/overridable-opcodes
Aug 15, 2025
Merged

feat: Make GenerateOpCodes and ExecuteTransaction overridable in VM#9078
hudem1 merged 5 commits into
feature/arbitrum-setupfrom
hudem1/feat/overridable-opcodes

Conversation

@hudem1

@hudem1 hudem1 commented Aug 2, 2025

Copy link
Copy Markdown
Contributor

Arbitrum has its own custom implementation for GasPrice opcode.
See Arbitrum's PR.

In my suggested modifications here, the virtual machine warmup RunOpCodes will not have the updated GasPrice opcode. To have it, I would need to override the whole VirtualMachine.WarmUpEvmInstructions();, which seems a bit overkill. Let me know it's still better to have the update there too.

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.

@LukaszRozmej LukaszRozmej left a comment

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.

I think you would actually do better to pack EvmInstructions.GenerateOpCodes call from this method into a virtual method, due to optimization mentioned in comment.

Comment thread src/Nethermind/Nethermind.Evm/VirtualMachine.cs Outdated
@hudem1 hudem1 requested a review from LukaszRozmej August 11, 2025 07:59
@hudem1 hudem1 changed the title feat: Make _opcodes overridable in VM feat: Make GenerateOpCodes and ExecuteTransaction overridable in VM Aug 11, 2025
@hudem1 hudem1 merged commit cfcbde9 into feature/arbitrum-setup Aug 15, 2025
62 checks passed
@hudem1 hudem1 deleted the hudem1/feat/overridable-opcodes branch August 15, 2025 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants