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

Lift restrictions on immutables. #14240

Open
ekpyron opened this issue May 17, 2023 · 1 comment
Open

Lift restrictions on immutables. #14240

ekpyron opened this issue May 17, 2023 · 1 comment
Labels
low impact Changes are not very noticeable or potential benefits are limited. medium effort Default level of effort must have eventually Something we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.

Comments

@ekpyron
Copy link
Member

ekpyron commented May 17, 2023

As it turns out that we have several bugs in the ImmutableValidator, we prepone our plan of lifting the "assign-once" restrictions during creation that was originally only planned with #13723.

Goal is to allow uninitialized immutables (defaulting to zero-value) and multiple assignments to immutable (behaving like regular variables) during creation. At first we can retain the restriction of immutable initializtion (other than direct initialiation at the declaration) having to happen inside the constructor body.

In a subsequent step we can allow assignments to immutables in arbitrary functions, while making it an error if a function writing to any immutable occurs in the call graph of the deployed contract (that is, the function can be called from an external function or indirectly ends up in the internal dispatch due to being taken as function pointer expression potentially even only during creation).

@ekpyron ekpyron added the selected for development It's on our short-term development label May 17, 2023
@ekpyron ekpyron added this to the 0.8.21 milestone May 17, 2023
@cameel cameel moved this from To do to In Progress in Solidity Focus Board May 30, 2023
@cameel cameel moved this from In Progress to Needs Review in Solidity Focus Board Jun 19, 2023
@cameel
Copy link
Member

cameel commented Jul 10, 2023

#14304 addresses the first part of it. We decided to leave the rest for later, so I'm unassigning myself and removing it from the Focus Board.

@cameel cameel removed their assignment Jul 10, 2023
@NunoFilipeSantos NunoFilipeSantos modified the milestones: 0.8.21, 0.8.22 Jul 20, 2023
@ekpyron ekpyron removed this from the 0.8.22 milestone Sep 18, 2023
@ekpyron ekpyron added medium effort Default level of effort medium impact Default level of impact must have eventually Something we consider essential but not enough to prevent us from releasing Solidity 1.0 without it. low impact Changes are not very noticeable or potential benefits are limited. and removed selected for development It's on our short-term development medium impact Default level of impact labels Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low impact Changes are not very noticeable or potential benefits are limited. medium effort Default level of effort must have eventually Something we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.
Projects
None yet
Development

No branches or pull requests

3 participants