-
Notifications
You must be signed in to change notification settings - Fork 138
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
Combine domain payloads and provide on-the-fly migration #3664
Merged
fxamacker
merged 8 commits into
feature/combine-domain-payloads-and-domain-storage-maps
from
fxamacker/use-atree-map-to-replace-domain-regsiters
Nov 12, 2024
Merged
Combine domain payloads and provide on-the-fly migration #3664
fxamacker
merged 8 commits into
feature/combine-domain-payloads-and-domain-storage-maps
from
fxamacker/use-atree-map-to-replace-domain-regsiters
Nov 12, 2024
Commits on Oct 31, 2024
-
Combine domain payloads and provide OTF migration
This commit: 1. Combines all domain (non-atree) payloads into one account (non-atree) payload per account. 2. Combines all domain (atree) storage maps into one account (atree) storage map per account. 3. Uses on-the-fly (OTF) migration when an account is modified (write ops). Currently, accounts store data on-chain under pre-defined domains, such as "storage". Each domain requires domain payload (8-byte non-atree payload) and domain storage map payload (atree payload). Also, each payload requires ~2 mtrie nodes (~2x96 byte overhead). New domains were added in Cadence 1.0 and domain payloads count increased to 150 million on Sept. 4 (was 80 million pre-spork). Nearly 25% of total payloads on-chain are 8-byte domain payloads. Each account on mainnet has an average of ~4 domain payloads and ~4 domain storage maps. This commit creates 1 account (non-atree) payload and 1 account (atree) storage map per account, eliminating all domain (non-atree) payloads and domain storage maps for that given account. Based on preliminary estimates using Sept. 17, 2024 mainnet state, this approach can: - eliminate mtrie nodes: -425 million (-28.5%) - reduce payload count: -174 million (also -28.5%) This commit also includes on-the-fly migration so we can see improvements to accounts that have write activity without requiring downtime. Given this, we won't see the full benefits/impact until all accounts (including idle accounts) are eventually migrated (e.g. using full migration or other means).
Configuration menu - View commit details
-
Copy full SHA for 94e8cc2 - Browse repository at this point
Copy the full SHA 94e8cc2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 124aef7 - Browse repository at this point
Copy the full SHA 124aef7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7429be0 - Browse repository at this point
Copy the full SHA 7429be0View commit details -
Configuration menu - View commit details
-
Copy full SHA for e617908 - Browse repository at this point
Copy the full SHA e617908View commit details
Commits on Nov 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 5843373 - Browse repository at this point
Copy the full SHA 5843373View commit details -
Skip domain register migration for no domain accts
This is for completeness.
Configuration menu - View commit details
-
Copy full SHA for 658f6c1 - Browse repository at this point
Copy the full SHA 658f6c1View commit details
Commits on Nov 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3f8513e - Browse repository at this point
Copy the full SHA 3f8513eView commit details
Commits on Nov 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e28e8c9 - Browse repository at this point
Copy the full SHA e28e8c9View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.