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

SSTORE2-compatible dependency registry (for scripts) #895

Merged
merged 25 commits into from
Jul 26, 2023

Conversation

jakerockland
Copy link
Contributor

@jakerockland jakerockland commented Jul 21, 2023

Description of the change

This PR makes a few interrelated changes:

  • Updates the dependency registry implementation to allow for providing direct pointers (address locations of existing wrriten bytecode storage content) when specifying dependency scripts.
  • When providing direct pointers, allow support for both contracts written using the Art Blocks BytecodeStorage library implementation, but also provide fallback support for pointing to SSTORE2-written data.
  • Provide a utility view method that allows introspection of whether or not a given piece of on-chain storage was written with our BytecodeStorage library or an unknown library (which we will fallback to reading as an SSTORE2 written blob).

Appropriate test coverage is also added for these changes.

As discussed internally, the rationale for this change is to allow the reuse of referencing existing uploads of dependencies that may already exist on chain (e.g. an upload of p5js 1.0.0 that has already been uploaded on-chain via EthFS) as script versions that the dependency registry is aware of, without requiring the superfluous re-upload of these script references on-chain in their entirety.

@jakerockland jakerockland changed the base branch from main to dependency-registry-v0-updates July 21, 2023 17:56
@jakerockland jakerockland changed the title {WIP} SSTORE2-compatible dependency registry (for scripts) SSTORE2-compatible dependency registry (for scripts) Jul 25, 2023
@jakerockland jakerockland marked this pull request as ready for review July 25, 2023 15:30
@jakerockland jakerockland requested a review from a team as a code owner July 25, 2023 15:30
@jakerockland jakerockland requested review from ryley-o and yoshiwarab and removed request for a team July 25, 2023 15:30
Base automatically changed from dependency-registry-v0-updates to main July 25, 2023 15:31
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 - interested in your thoughts about specifying encoding (see comment)

jakerockland added a commit to ArtBlocks/artblocks-subgraph that referenced this pull request Jul 25, 2023
Minor adjustment to be consistent with consistency adjustments made in: ArtBlocks/artblocks-contracts#895
@jakerockland
Copy link
Contributor Author

LGTM - interested in your thoughts about specifying encoding (see comment)

Thank you ser! Re-requesting another review pass if that is ok though, given meaningful changes made across the entirety of the file for consistency purposes based on feedback.

@jakerockland jakerockland requested a review from ryley-o July 25, 2023 22:14
…rtBlocks/artblocks-contracts into sstore2-compatible-dependency-registry
@jakerockland jakerockland enabled auto-merge (squash) July 26, 2023 21:22
@jakerockland jakerockland merged commit 8352733 into main Jul 26, 2023
@jakerockland jakerockland deleted the sstore2-compatible-dependency-registry branch July 26, 2023 21:27
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