Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRN-808 Implement Sylo Data Pallet #916

Closed
wants to merge 10 commits into from
Closed

Conversation

JCSanPedro
Copy link
Collaborator

@JCSanPedro JCSanPedro commented Jan 7, 2025

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: a method and identifier. The method 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 the data_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 of ResolverIds 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 information
  • entries 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

  • Payment - All extrinsics related to managing validation records and resolvers are paid using Sylo tokens. This is achieved by modifying the 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

  • Runtime Changes

Extrinsic Changes

Added

  • Sylo: register_resolver
  • Sylo: update_resolver
  • Sylo: unregister_resolver
  • Sylo: create_validation_record
  • Sylo: add_validation_record_entry
  • Sylo: update_validation_record
  • Sylo: delete_validation_record

@JCSanPedro JCSanPedro changed the title SM-404 Implement Sylo Data Pallet TRN-808 Implement Sylo Data Pallet Jan 7, 2025
@JCSanPedro JCSanPedro closed this Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant