Skip to content

Error out on illegal upgrade when a record output register changes #29040

@mohammadfawaz

Description

@mohammadfawaz

The check was refactored to become publically available here: ProvableHQ/snarkVM#3051.

We should emit an error when running leo upgrade similar to https://github.com/ProvableHQ/leo/blob/b0fa4056dcc48bae658522d61896555a1a7a4a4c/leo/cli/commands/upgrade.rs#L440C40-L440C62

and propose some workarounds. Sadly, there are no good workarounds. Some options:

  1. Use a whole new function and deprecate the old one. (without removing it of course).
  2. If the offending register in the new edition has a smaller index than in the old edition, then we can suggest adding redundant instructions to the bytecode to get us up to the old index again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working🖥️ CLIAnything related to the Leo CLI.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions