feat(verifier): create an auth info based on a authenticate one time witness #8640
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
function in capital letters:
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:
Links to any relevant issues
Fixes #8579
How the change has been tested
Release Notes