TRN-808 Implement Sylo Data Pallet #916
Closed
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
The PR implements and adds the Sylo Data Verification Pallet to the runtime.
Protocol RFC - https://www.notion.so/futureverse/RFC-Sylo-Data-Verification-Protocol-14a0cb4dab3d808389eddaab37a2c767
The pallet allows users to register and manage resolvers, and also create and manage validation records.
Resolvers
A resolver is intended to be an external service capable of storing and providing off-chain data. The pallet allows a user to register a resolver, which would include an identifier and a list of service endpoints. A resolver is identified by a
ResolverId
, which loosely follows the DID Specification.The
ResolverId
is comprised of two components: amethod
andidentifier
. Themethod
describes what kind of resolver it is. All resolvers registered on chain are considered "sylo" resolvers, and will all use the same reserved string for their resolver method.The account which registers the resolver is considered the controller of the register, and is capable of modifying or removing the resolver later.
Validation Records
The pallet allows a user to create a validation record through the
create_validation_record
extrinsic. A validation record references an externally stored piece of data, and is intended to be used to validate the integrity and authenticity of offchain data.A validation record will have the following attributes:
data_id
- A string representing the id. Validation records are stored in a double map, using thedata_id
as well as the author's account id.author
- The account which created the record. Will have the ability to modify and or delete the record in the future.resolvers
- A list ofResolverIds
which reference how to fetch the data. All resolvers using the reserved sylo method must be registered onchain.data_type
- A string acting as a hint to clients as to what type of data it is.tags
- A list of strings acting as additional metadata informationentries
A list of validation record entry. Each entry represents a distinct version of the data. It includes a checksum for integrity, and also a block number for when the entry was created.Notes
OnChargeTransaction
implementation for the FeeProxy, to detect sylo related extrinsics, and force the swap.Release Notes
Key Changes
Adds the Sylo Data Verification Pallet to the runtime
Type of Change
Extrinsic Changes
Added