Skip to content

feat(AuthWit): Query if Authwit was valid in Aztec.nr #4822

@rahul-kothari

Description

@rahul-kothari

From the offsite notes:

Difficult to “query” if something was valid

  • We wanted to query the is_valid method in an account contract from a private function
  • is_valid should return a boolean (based on the name) but it asserts it’s true
  • Related, document why is_valid returns IS_VALID_SELECTOR
  • Even after changing it to return true, we cannot query it, because it depends on get_auth_witness, which fails if there is no auth wit registered.
    • We’d need a try_get_auth_witness oracle method, and in general be able to try to do things and let the caller decide whether to assert or do something else.
    • Alternatively, we could have a try_call to a function called in an unconstrained way, so we can try calling a function and see what would happen.
    • It’s also not possible to call an unconstrained function in another contract from a private function.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions