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: unaffected
With RGB v0.10 schema, interfaces and implementations include explicit source code of script (AluVM) and type (Strict Types) libraries. With v0.11, assignments in genesis, state transitions and extensions are also allowed to provide script spending conditions, and all operations will be able to come with their own script and type libraries.
This will result in the replication of the same type libraries over and over again, bloating sizes of consignments and stashes. Even with v0.10, a typical contract replicates the same type library twice (schema and interface), leading to ~30% increase in the size of the contract consignment for any asset.
Since on the consensus level schemata, interfaces and operations since v0.11 commit to the id of the script and type library - and not the library source code, I propose to move the source code into a dedicated segment in the consignment (or interface/schema containers), and let RGB data reference them only by their ids. This will prevent library replication and reduce the size of the consignments and other containers.
The text was updated successfully, but these errors were encountered:
dr-orlovsky
changed the title
RCP-240313B: Move script and type libraries outside of schema, interfaces etc into consignments
RCP-240313B: Move script and type libraries outside of schema, interfaces and operations
Mar 13, 2024
With RGB v0.10 schema, interfaces and implementations include explicit source code of script (AluVM) and type (Strict Types) libraries. With v0.11, assignments in genesis, state transitions and extensions are also allowed to provide script spending conditions, and all operations will be able to come with their own script and type libraries.
This will result in the replication of the same type libraries over and over again, bloating sizes of consignments and stashes. Even with v0.10, a typical contract replicates the same type library twice (schema and interface), leading to ~30% increase in the size of the contract consignment for any asset.
Since on the consensus level schemata, interfaces and operations since v0.11 commit to the id of the script and type library - and not the library source code, I propose to move the source code into a dedicated segment in the consignment (or interface/schema containers), and let RGB data reference them only by their ids. This will prevent library replication and reduce the size of the consignments and other containers.
The text was updated successfully, but these errors were encountered: