Skip to content

Conversation

miker83z
Copy link
Contributor

@miker83z miker83z commented Sep 23, 2025

Description of change

This PR introduces Autenticate One-Time Witness.

A module can define a several Authenticate One Time Witnesses (AOTW). An AOTW is a type that is never instantiated, and this property is enforced by the system.
We define an authenticate one-time witness type as a struct type that has the name starting with a predefined prefix followed by the name of an authenticate function in capital letters, and possessing certain special properties specified below (please note that by convention, "regular" struct type names are expressed in camel case).
In other words, if a module defines a struct type whose name is starting with the predefined AOTW prefix and has no fields, then this type MUST possess these special properties, otherwise the module definition will be considered invalid and will be rejected by the validator:

  • it has a struct name where the prefix is followed by the name of a
    function in capital letters:
    • this function MUST be found in the same module;
    • this function MUST be a valid authenticate function;
  • it has only one ability: drop
  • it has only one arbitrarily named field of type boolean or it is empty
  • its definition does not involve type parameters
  • it is never instantiated anywhere in its defining module

Since it is never instantiated it is not really "one-time"; however, I kept the reference to OTW to make immediately clear to developers that we are dealing with a similar concept. Alternative names could be:

  • Authenticate 0 Time Witness (A0TW)
  • Authenticate Function Witness (AFW)
  • AUTh Witness (AUTW)

Links to any relevant issues

Fixes #8579

How the change has been tested

  • Basic tests (linting, compilation, formatting, unit/integration tests)
  • Patch-specific tests (correctness, functionality coverage)
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

Release Notes

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:
  • REST API:

@miker83z miker83z self-assigned this Sep 23, 2025
@iota-ci iota-ci added sc-platform Issues related to the Smart Contract Platform group. vm-language Issues related to the VM & Language Team labels Sep 23, 2025
@miker83z miker83z force-pushed the vm-lang/aa-auth/8579-feat-fotw branch from ee0fab8 to 7bf6749 Compare September 23, 2025 15:55
Copy link

vercel bot commented Sep 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

6 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
apps-backend Ignored Ignored Sep 23, 2025 4:27pm
apps-ui-kit Ignored Ignored Sep 23, 2025 4:27pm
iota-evm-bridge Ignored Ignored Sep 23, 2025 4:27pm
iota-multisig-toolkit Ignored Ignored Sep 23, 2025 4:27pm
rebased-explorer Ignored Ignored Sep 23, 2025 4:27pm
wallet-dashboard Ignored Ignored Sep 23, 2025 4:27pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sc-platform Issues related to the Smart Contract Platform group. vm-language Issues related to the VM & Language Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants