Skip to content

Devex: system hooks may fail depending on the user provided data, but the reason of failure is not communicated #118

@sayon

Description

@sayon

🌟 Feature Request

Communicate system hook failures to users (probably through returndata)

📝 Description

Currently, system hooks can fail for three kinds of reasons:

  1. Bug in the system hook itself
  2. Misuse from another subsystem (bootloader provided malformed calldata)
  3. User provided invalid inputs (e.g. L2 base token can't burn the nominal token value)

The third kind of errors is currently masked and the corresponding message is logged. But users don't get to see it.
We need to communicate the reason back to users, probably through revert messages.

🤔 Rationale

Users have to be able to distinguish between ZKOS bugs and incorrect use of system hooks, and the error messages should be actionable and adhere to HCD principles.

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