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

feat: add support for custom storage layouts #192

Merged
merged 20 commits into from
Sep 15, 2023
Merged

Conversation

daejunpark
Copy link
Collaborator

@daejunpark daejunpark commented Sep 2, 2023

Fix #82 and #148

Add --custom-storage-layout option that allows for custom storage layouts.

The idea is to use a simple injective function to implement hash semantics that are collision-free (but not secure). This function simply left-shifts the input by 257 bits, where 256 bits ensure enough logical domain space, and the additional 1 bit is used for disambiguation (e.g., differentiating between mapping (uint => uint) and uint[][]). Note that the output of this function is simple enough for the solver to easily reason about the non-aliasing between different storage variables.

@daejunpark daejunpark mentioned this pull request Sep 13, 2023
@daejunpark daejunpark merged commit 933117a into main Sep 15, 2023
108 checks passed
@daejunpark daejunpark deleted the feat/general-storage branch September 15, 2023 18:00
@plotchy
Copy link
Contributor

plotchy commented Sep 18, 2023

super excited to try this out!!

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.

Support for static storage arrays
2 participants