Info Subscription

Info Subscription Flow

The Info Subscription Flow allows DApp services to subscribe to updates on CARV Layer 2 and receive notifications when user data changes. This flow supports both on-chain and off-chain data scenarios, ensuring efficient data processing and verification.

1. DApp Service Initialization:

  • The DApp service registers on the CARV Layer 2 chain, subscribing to messages via a smart contract and staking the necessary funds to activate the subscription.

2. Data Submission:

  • On-Chain Scenario:

    1. Users submit new data to the target chain. The chain syncs the data with the Verifier, which updates the TEE. The TEE stores the data in CARV Layer 2.

  • Off-Chain Scenario:

    1. Users upload their data directly to the TEE, which processes and securely stores it.

3. Data Processing and Verification:

  • The TEE retrieves the subscribed data from CARV Layer 2. It parses and verifies the data, ensuring it meets the subscription criteria, and processes the callback function.

  • The TEE then updates the final result and uploads an attestation to CARV Layer 2, confirming the completion of data processing.

4. Payment and Notification:

  • Payment: CARV Layer 2 processes the reward or payment to the user based on the data submission.

  • Notification: The TEE executes the callback function, pushing a notification to the DApp service to inform it that the data process is complete and the required updates have been made.

Last updated