Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Initializable: moving initialized and initializing flags to memory slots #1150

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Amxx
Copy link

@Amxx Amxx commented Jul 23, 2019

Similarly to the implementation, which is stored at position 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc to avoid conflict with the memory space of the master contract, it would be interesting to store the initialization flags away fro the straight forward memory space.

This would allow proxies and masters to be "initialization aware" without having to share a common header and risking conflicts.

An example of usage would be in Kitsune Wallet's proxy base which has to unlock() (line 28) before re-initializating (during a migration). This unlock would be as simple as _setInitialized(false) with the proposed implementation.

@spalladino spalladino added the status:on-hold Do not move forward for now label Jul 23, 2019
@spalladino
Copy link
Contributor

Hey @Amxx, thanks for the contribution! A change like this has been on the back of my mind for quite some time already, and I think it would certainly be interesting.

However, since it is a breaking change, I want to tackle this along with other features related to initialization (such as automating the generation of initializers from constructors). We will probably be focusing on this on September/October. Stay tuned!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:on-hold Do not move forward for now
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants