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

Remove the usage of SELFDESTRUCT in BytecodeStorage #668

Merged
merged 15 commits into from
May 5, 2023

Conversation

jakerockland
Copy link
Contributor

@jakerockland jakerockland commented Apr 27, 2023

Description of the change

Purge the use of purging!

Closes #451

Only merge after #665 – also, do not merge until review feels coherent between this and the TBD PR that addresses #660

Do not merge until this changeset looks good in addition to #670, as both should be merged at the same time.


Note that the approach of maintaining multiple versioned files of our library is taken in order to allow for testing backwards compatible reads, though backwards compatible reads cannot be reliably added until addressing #660 which is being taken on in a companion PR to this one. These PRs should be reviewed in tandem.

@jakerockland jakerockland requested a review from a team as a code owner April 27, 2023 01:10
@jakerockland jakerockland requested a review from ryley-o April 27, 2023 01:10
@jakerockland jakerockland changed the base branch from main to tokenIdToHashSeed April 27, 2023 01:10
@jakerockland jakerockland requested a review from yoshiwarab April 27, 2023 01:10
@jakerockland jakerockland added the do not merge Not auto-merge-able label Apr 27, 2023
Base automatically changed from tokenIdToHashSeed to main April 27, 2023 04:59
Copy link
Contributor

@ryley-o ryley-o left a comment

Choose a reason for hiding this comment

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

LGTM, with agreement of all the caveats listed in this PR's description (i.e. let's not deploy any Engine contracts until #660 is also included in this V1 BytecodeStorage library 🙏)

contracts/libs/0.8.x/BytecodeStorageV1.sol Outdated Show resolved Hide resolved
contracts/libs/0.8.x/BytecodeStorageV1.sol Outdated Show resolved Hide resolved
contracts/libs/0.8.x/BytecodeStorageV1.sol Outdated Show resolved Hide resolved
@jakerockland
Copy link
Contributor Author

LGTM, with agreement of all the caveats listed in this PR's description (i.e. let's not deploy any Engine contracts until #660 is also included in this V1 BytecodeStorage library 🙏)

Very much agreed – super important not to deploy any contracts using this modified structure until #660 is resolved (will have an initial draft PR up for that shortly here, after which we can look at these two changesets in tandem).

jakerockland and others added 3 commits April 26, 2023 23:55
Co-authored-by: ryley-o <30364988+ryley-o@users.noreply.github.com>
Co-authored-by: ryley-o <30364988+ryley-o@users.noreply.github.com>
Co-authored-by: ryley-o <30364988+ryley-o@users.noreply.github.com>
@jakerockland jakerockland changed the title Remove the usage of SELFDESTRUCT in BytecodeStorage Remove the usage of SELFDESTRUCT in BytecodeStorage Apr 27, 2023
jakerockland and others added 2 commits May 5, 2023 09:19
* Support basic semantic versioning – and ensure interop with backwards compatible reads (tests added)

* update the version string

* minor adjustment and a song: https://www.youtube.com/watch\?v\=vOreqez4v9Y

* Update to reflect better v1/v0/unknown versioning semantics

* Update documentation and code structuring

* Refactor size == 0 check

* clean up offset checks

* `STORE2`-compatible reads in `BytecodeStorage` (#681)

* Update BytecodeStorage library to provide backwards-compatible reads that are compatible with SSTORE2 as the fallback read option, in advance of plans to split off reads into a shared external public utility library, in-companion to the embedded internal library for writes.

* Whoops, forgot to add all the files yo

* add support for manual-offset reads

* SSTORE2 / explicit bytes reads restructure

* Comment fix

* Filename fix

* Filename fix

* Better typing for tests

* spelling fixes

* Split `BytecodeStorage` into public/internal libraries (#684)

* basic MVP of split library (with tests)

* Adjusted tests for split library setup

* minor modifier adjustment

* Adjust optimizer runs

* optimizer order

* nit

* get interface from deployed contract

* get interface from deployed contract

* ensure libraries are linked

* library linkkinnnn

* More linking fixes in tests

* update Engine Flex as PoC (#688)

* fix the rest of the test bindingsgit diff

* OPTIMIZOOOOOR

* remove unnecessary using for

* Fixed comment

* public constants

* Update library naming convention

* DEPLOYOOOOOR

* DEPLOYOOOOOR

* format

* Address nits

---------

Co-authored-by: ryley-o <30364988+ryley-o@users.noreply.github.com>

---------

Co-authored-by: ryley-o <30364988+ryley-o@users.noreply.github.com>
@jakerockland jakerockland removed the do not merge Not auto-merge-able label May 5, 2023
@jakerockland jakerockland enabled auto-merge (squash) May 5, 2023 14:19
@jakerockland jakerockland merged commit 5adfb32 into main May 5, 2023
@jakerockland jakerockland deleted the removeThePurge branch May 5, 2023 14:24
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.

Remove usage of SELFDESTRUCT in bytecodestorage library
3 participants