Skip to content

Proposal: Hardfork selection via flag - #135

Open
gzanitti wants to merge 75 commits into
quilt:masterfrom
gzanitti:hardfork_selection
Open

Proposal: Hardfork selection via flag#135
gzanitti wants to merge 75 commits into
quilt:masterfrom
gzanitti:hardfork_selection

Conversation

@gzanitti

Copy link
Copy Markdown
Contributor

This PR adds the capability to utilize the operations specific to each hardfork in ETK.

By employing a flag (e.g., --hardfork cancun), users can designate the hardfork to be used during the parsing and assembly processes. A primary benefit of this enhancement is its streamlined approach to managing compatibility across various EVM versions. This update allows for more straightforward handling of operation deprecation and aliasing.

The core alteration involves encapsulating the operations specific to each Hardfork within an enum responsible for managing different versions.

This revision builds upon PR #133 . However, it can be modified if PR 133 is not approved. Still in draft while I tidy up the code and review and adapt the code beyond the assembler.

I appreciate your insights and feedback.

…is messy and there are several hacks I need to remove. Also I should write a more rusty code.
…the code should be optimized, but the general idea seems to work.
…ressing some of the changes proposed by Sam.
@gzanitti
gzanitti marked this pull request as ready for review January 29, 2024 17:29
@gzanitti

Copy link
Copy Markdown
Contributor Author

Hey @SamWilsn, I'm moving forward with the changes we had pending now that the new backend was finally merged. I hope you don't mind having to keep reviewing my code haha.

This modification includes the changes we were discussing.

  • A new %hardfork macro that allows you to define a hardfork or a range of hardforks.
  • A flag that specifies in which version you want to compile the code (default: Cancun for now)

Whenever the range is invalid, or the flag does not match any macro definition, compilation stops.

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.

2 participants