You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
layers: consensus, standard library
consensus: pushback
Metadata are the way operation is provided with accessory data which are not kept as a part of the queryable contract state (do not blow it up), but are used in validation. A typical example is some witness (there is another operation-specific witness, and unlike it the metadata must be of the same type for all operations of certain class in the contract).
Right now, each operation has a single metadata, which has a form of serialized strict value. The operation schema commits to the data type. The idea was that if an operation needs complex metadata, it just constructs a corresponding data type, and there is no need in multiple metadata fields.
However, with interface inheritance the situation becomes more complex: each interface may require its own form of metadata, and if two or more interfaces in inheritance hierarchy needs their metadata, this interfaces can't be composed. This is a signification restriction, which can be removed by converting metadata field into a list which may contain maximum 255 values (since we have restriction on the number of composed interfaces, which can't exceed 255).
The text was updated successfully, but these errors were encountered:
dr-orlovsky
changed the title
RCP-20240326A: Multiple metadata fields in contract operations
RCP-240326A: Multiple metadata fields in contract operations
Mar 27, 2024
Metadata are the way operation is provided with accessory data which are not kept as a part of the queryable contract state (do not blow it up), but are used in validation. A typical example is some witness (there is another operation-specific witness, and unlike it the metadata must be of the same type for all operations of certain class in the contract).
Right now, each operation has a single metadata, which has a form of serialized strict value. The operation schema commits to the data type. The idea was that if an operation needs complex metadata, it just constructs a corresponding data type, and there is no need in multiple metadata fields.
However, with interface inheritance the situation becomes more complex: each interface may require its own form of metadata, and if two or more interfaces in inheritance hierarchy needs their metadata, this interfaces can't be composed. This is a signification restriction, which can be removed by converting metadata field into a list which may contain maximum 255 values (since we have restriction on the number of composed interfaces, which can't exceed 255).
The text was updated successfully, but these errors were encountered: