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

Combine domain payloads and provide on-the-fly migration #3664

Commits on Oct 31, 2024

  1. 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).
    fxamacker committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    94e8cc2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    124aef7 View commit details
    Browse the repository at this point in the history
  3. Lint

    fxamacker committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    7429be0 View commit details
    Browse the repository at this point in the history
  4. Update go.mod

    fxamacker committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    e617908 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2024

  1. Configuration menu
    Copy the full SHA
    5843373 View commit details
    Browse the repository at this point in the history
  2. Skip domain register migration for no domain accts

    This is for completeness.
    fxamacker committed Nov 4, 2024
    Configuration menu
    Copy the full SHA
    658f6c1 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2024

  1. Configuration menu
    Copy the full SHA
    3f8513e View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2024

  1. Configuration menu
    Copy the full SHA
    e28e8c9 View commit details
    Browse the repository at this point in the history