-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Storage domains #6466
Storage domains #6466
Conversation
Benchmark for b830f90Click to view benchmark
|
Benchmark for 4944773Click to view benchmark
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This being a breaking change, it should be behind a feature flag.
Benchmark for f370432Click to view benchmark
|
As discussed, converting to draft until we get some initial infrastructure for feature flags as discussed in the RFC on bringing changes to the compiler |
CodSpeed Performance ReportMerging #6466 will not alter performanceComparing Summary
|
storage
and StorageMap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This PR fixes #6317 by implementing
storage_domains
experimental feature.This feature introduces two storage domains, one for the storage fields defined inside of the
storage
declaration, and a different one for storage slots generated inside of theStorageMap
.The PR strictly fixes the issue described in #6317 by applying the recommendation proposed in the issue.
A general approach to storage key domains will be discussed as a part of the Configurable and composable storage RFC.
Additionally, the PR:
Closes #6317, #6701.
Breaking Changes
The PR changes the way how storage keys are generated for
storage
fields. Instead ofsha256("storage::ns1::ns2.field_name")
we now usesha256((0u8, "storage::ns1::ns2.field_name"))
.This is a breaking change for those who relied on the storage key calculation.
Demo
Before, every type-mismatch was always followed by an ICE, because the compilation continued despite the type-mismatch.
This is solved now, and the type-mismatch has a dedicated help message.
Checklist
Breaking*
orNew Feature
labels where relevant.