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

fix: allow immutable variables to be merged during forks #719

Merged
merged 8 commits into from
Nov 11, 2024

Conversation

nbaztec
Copy link
Collaborator

@nbaztec nbaztec commented Nov 8, 2024

What πŸ’»

  • Migrate immutable variables set during create, during forks.

Why βœ‹

  • Previously we were not importing any immutable variables.

Evidence πŸ“·

image

Notes πŸ“

  • Immutable storage values are stored via mapping key per contract address and per contract-slot, so it's not possible to obtain or even iterate over the entire 2^256 space in a realistic time. So we recode the setImmutables() call and track all immutables set so far per contract address. As any address can be marked persistent at any given moment we currently track all immutables.

@nbaztec nbaztec requested a review from a team as a code owner November 8, 2024 15:03
Karrq
Karrq previously approved these changes Nov 8, 2024
crates/evm/core/src/backend/mod.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@Karrq Karrq left a comment

Choose a reason for hiding this comment

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

So now we record all deployed immutables, right?

@nbaztec nbaztec changed the title fix: allow first 256-slot immutable variables to be merged during forks fix: allow immutable variables to be merged during forks Nov 11, 2024
@nbaztec nbaztec merged commit 48c6b1a into main Nov 11, 2024
13 checks passed
@nbaztec nbaztec deleted the nish-support-immutable-merge branch November 11, 2024 11:07
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.

3 participants