Skip to content

Storage certification execution limit #2263

@peterpeterparker

Description

@peterpeterparker

Motivation

Deploying the https://js.icp.build documentation hit the execution limit today:

deno task juno config apply --force --mode production
Task juno juno "config" "apply" "--force" "--mode" "production"
- Loading configuration...
- Configuring...
The configuration failed with 1 error 😢.
0: The replica returned a rejection error:
  Request ID: 4cca80fb89e12f800dc93b95f65ae29032c91d8c4d4b5baf7778119852bdbc18
  Reject code: 5
  Reject text: Error from Canister bmsnr-hiaaa-aaaal-ask2q-cai: Canister exceeded the limit of 40000000000 instructions for single message execution..
Try optimizing this method to consume fewer instructions or split the work across multiple messages. See documentation: https://internetcomputer.org/docs/current/references/execution-errors#instruction-limit-exceeded
  Error code: IC0522

They have 8,000 assets

✔ 8284 files uploaded (total: 1,171.667 MB)
🚀 Deploy complete!

So, the root cause of the issues is the numbers of assets and the implementation which requires going though all assets to recalculate the hash tree.

See:

fn init_certified_assets_impl(state: &State) {

Possible Solutions

  1. Improve the certification code

  2. Add an option to juno config apply for the storage without recalculating the assets tree - just modifying the config on the heap and working around by upgrading the Satellite because post_upgrade - which also calls the certification - has a higher execution limit of 300B instructions limit. Though currently I use a set_timer to call this so likely hit the same issue.

  3. Way better ideas welcome

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions