astraly-labs / pragma-monorepo

Pragma V2 Monorepo
https://pragma.build
MIT License
0 stars 1 forks source link

dev: Calldata update process #56

Open JordyRo1 opened 2 weeks ago

JordyRo1 commented 2 weeks ago

Data Processing and User Interaction Flow

System Process Flow

  1. Hyperlane Dispatch Event

    • The process begins when Hyperlane triggers a dispatch action
    • This generates a DispatchEvent containing a message with metadata and a list of update data
  2. Message Processing

    • A unique message ID is derived from the dispatched message
    • The message ID is used to find corresponding entries in the checkpoint storage
    • When a match is found, the system stores:
      • HashMap<FeedId, UpdateData>

User Interaction Flow

  1. Users interact with the system by calling the API endpoint with a specific feed ID
  2. The system retrieves and returns the associated information, which is already stored and indexed by feed ID

Implementation Checklist

  1. [x] Develop a function to convert messages into message IDs
  2. [x] Create a batch of retrieve events
  3. [x] Implement a function to verify message ID correspondence in checkpoint storage for each batched message
  4. [ ] Create a function to:
    • Parse update information
    • Store data in the appropriate format
EvolveArt commented 2 weeks ago

image