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

Allow single-read for multi-field PublicImmutable #8399

Closed
nventuro opened this issue Sep 5, 2024 · 1 comment · Fixed by #8022
Closed

Allow single-read for multi-field PublicImmutable #8399

nventuro opened this issue Sep 5, 2024 · 1 comment · Fixed by #8022

Comments

@nventuro
Copy link
Contributor

nventuro commented Sep 5, 2024

We can follow the same pattern as in the new key registry to read multiple values in a multi-field PublicImmutable state variable provided we also store the hash of said values, and then privately a) perform a historical read of the hash and b) prove that the values are the preimage of the hash. The values would be fetched simply by calling oracles that read public state - no special infrastructure is needed.

This will likely require performing arithmetic over generic numeric params, since we'll need to be able to serialize a struct of serializable items (in order to serialize the struct prior to hashing).

@benesjan
Copy link
Contributor

benesjan commented Sep 6, 2024

Created a PR with this a while ago. Currently blocked by incomplete storage slot allocation

@benesjan benesjan changed the title Allow single-read for multi-field SharedImmutable Allow single-read for multi-field PublicImmutable Feb 5, 2025
@benesjan benesjan changed the title Allow single-read for multi-field PublicImmutable Allow single-read for multi-field PublicImmutable Feb 5, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants