Skip to content

A full backup leaves out app contract code past about 22 large app classes #2003

Not planned

Description

@alejoamiras

A full backup's account-state part stores each contract class's code once, without debug info, so it grows with the number of distinct classes, not instances. When the part would pass what the import accepts (maxSliceCodeUnits, 40 MiB, measured as the import measures it) or the file limits, the export leaves out whole classes' code: classes an app registered first, the largest first, then the classes the wallet ships. Every contract entry and saved sender stays (#2035).

After a restore, a contract of a class the wallet ships restores from the wallet's own copy. A contract of an app class whose code was left out reads "Contract artifact not found" in View errors, and registers again when its app next registers it.

Measured with the shipped export code (plan backup-contracts-1, P4): the classes the wallet ships weigh 2,735,691 code units as exported. Code starts being left out at about 22 distinct app classes the size of aztec-standards' MultiToken (1,715,789 stripped), 41 of Vault size (937,132) or 279 of Escrow size (140,437), across all networks. The export logs a warning past 80% of the cap, and one warn line names the classes it left out.

No measured profile comes near it: 32 tokens of one class 1,876,547 (4.5%), the typical two-network profile 3,846,858 (9.2%), the heavy three-network one 6,529,099 (15.6%).

Closed as a known limit. Reopen on a user report, or a measured profile above half the cap.

Detail: implementations-plan/archive/backup-contracts-1/plan.md (§ What is left, P4).

Activity

  1. added
    lane:backup-import-export
    known-limit
    on Nov 24, 2026
  2. changed the title [-]A full backup refuses its contract part past about 22 large app classes[/-] [+]A full backup leaves out app contract code past about 22 large app classes[/+] on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    known-limitlane:backup-import-export

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions