Skip to content

[Feature] On halt, return an error (or some outcome type) with the failing Aleo instruction index #3055

@mitchmindtree

Description

@mitchmindtree

🚀 Feature

In the case that execution halts early for some reason, the VM should return an error (or some outcome type) describing the instruction index at which the halt occurred.

Motivation

This is required to provide nice feedback to users from leo tooling. Knowing the failing instruction index, we can use source mapping to provide nicer unit-testing errors.

Currently, the VM panic!s the host on halt, meaning we lose all type information and context about the error and risk conflating VM halts with actual implementation/logic bugs. See #2941.

Originally raised here:

Implementation

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