2PM.Network
WebsiteXDiscordLinkedinGithub
  • Overview
    • What is 2PM.Network
    • Architecture
    • FAQ
    • Official Social Channels
  • 2PM Data VSIES Service
    • What is Data VSIES and why is it important
    • [V] Data Validation (ZK)
    • [SI] Data Standardization and Index
    • [E] Data Encryption Client (FHE)
    • [S] Data Storage and Access
    • Data VSIES SDK
  • Node Framework
    • Modular Architecture
    • Federated Learning
      • Horizontal Federated Learning Task
      • Logistic Regression Task
      • On-chain Secure Aggregation
      • Typical Scenarios
    • FHE Machine Learning
      • Built-in Models
      • Deep Learning
      • Typical Scenarios
    • Task Submission
    • Running a 2PM Node
      • Installation
      • Chain Connector Configuration
      • Data Preparation
      • Joining a Subnet
  • Security and Verification
    • Node Staking and Slash Mechanism
    • Running Verification Client
      • EigenLayer
      • Mind Network
    • Restaking and Delegation
  • Model Inference
    • 2PM Node Inference API
    • Posting Request to a Subnet Model
    • Getting Inference Results on Chain
      • Oracle Adapters
  • Monetization and Incentives
    • AI Model IP Assets
    • Distribution Algorithm
  • 2PM DAO
    • Build Subnets
      • Establishing New Subnets
      • General Requirements
      • Data Schema Definition
      • Model Selection
      • Task Implementation
    • $DMP Token
  • Deployed Smart Contracts
    • Subnets on Testnets
    • Local Deployment Guideline
  • Ecosystem
    • Partners
    • Use Cases
      • Private Personalized Recommendation
Powered by GitBook
On this page
  • Key Features
  • Functions
  • Events
  1. 2PM Data VSIES Service

[SI] Data Standardization and Index

The 2PM.Network Data Standardization and Index contract is designed to facilitate the secure and standardized registration, storage, and verification of datasets on the blockchain. This enables users to maintain the integrity and consistency of data used within the 2PM.Network, ensuring that data contributions are reliable and verifiable.

Key Features

  1. Dataset Registration: Allows users to register datasets with specified field names and types, ensuring that all data adheres to a predefined structure.

  2. Data Field Type Retrieval: Provides functionality to retrieve the data type of specific fields within registered datasets.

  3. Data Upload and Verification: Supports the secure upload of data hashes along with validation of the data against the registered dataset structure.

Functions

1. registerDataset

  • Description: Registers a new dataset with the given name, field names, and field types.

  • Parameters:

    • name (string): The name of the dataset.

    • fieldNames (string[]): An array of field names.

    • fieldTypes (string[]): An array of field types corresponding to the field names.

  • Events Triggered:

    • DatasetRegistered: Emitted when a dataset is successfully registered.

2. getFieldType

  • Description: Retrieves the type of a specific field from a registered dataset.

  • Parameters:

    • datasetId (uint): The identifier of the dataset.

    • fieldName (string): The name of the field.

  • Returns: The type of the specified field as a string.

3. uploadData

  • Description: Uploads and validates data against the registered dataset structure.

  • Parameters:

    • datasetId (uint): The identifier of the dataset.

    • dataHash (bytes32): The hash of the data being uploaded.

    • fieldNames (string[]): An array of field names used in the data.

    • fieldValues (string[]): An array of field values corresponding to the field names.

  • Events Triggered:

    • DataUploaded: Emitted when data is successfully uploaded and validated.

    • DataValidationFailed: Emitted if the validation fails for any reason (e.g., mismatch in field names, field not found).

    • DataValidationPassed: Emitted when data successfully passes all validations.

Events

  • DatasetRegistered

    • Emitted when a new dataset is registered. Includes the dataset ID and name.

  • DataUploaded

    • Emitted when data is successfully uploaded. Includes the uploader's address, dataset ID, and the data hash.

  • DataValidationFailed

    • Emitted when data fails to pass validation. Includes the uploader's address, dataset ID, and a message describing the reason for failure.

  • DataValidationPassed

    • Emitted when data passes all validations. Includes the uploader's address and dataset ID.

Previous[V] Data Validation (ZK)Next[E] Data Encryption Client (FHE)

Last updated 10 months ago