Skip to content

[Milestone 2] First Protocol Decoder — LayerZero V2 #36

@Patrick-Ehimen

Description

@Patrick-Ehimen

Parent Issue #34

Goal

Index real cross-chain messages from LayerZero V2, store in PostgreSQL, and archive raw events to Akave O3. This validates the full pipeline end-to-end.

Tasks

  • Implement LayerZero V2 ABI parsing (PacketSent, PacketReceived, OFTSent)
  • Map LayerZero endpoint IDs to EVM chain IDs
  • Implement core indexing loop (cursor read → fetch logs → decode → normalize → upsert → update cursor)
  • Implement cross-chain correlation via GUID matching (PacketSentpending, PacketReceivedexecuted)
  • Compute latency when both source and destination timestamps are known
  • Serialize raw events to Parquet format using parquet-go
  • Implement O3 archival pipeline: batch upload to protocols/layerzero/{chain}/{year}-{month}.parquet
  • Write manifest file (manifests/index.json) listing archived files with row counts and time ranges
  • Unit tests for decoder with sample ABI-encoded log data
  • Integration test: index events from testnet, verify messages in PostgreSQL and Parquet on O3

Deliverables

  • LayerZero V2 decoder that correctly parses all target events
  • Working ingestion loop indexing messages from at least 2 chains
  • Messages in PostgreSQL with correct source ↔ destination correlation
  • Raw events archived to Akave O3 in Parquet format
  • Test suite covering decoder and pipeline logic

Acceptance Criteria

  • Indexer picks up a real PacketSent event and creates a pending message in the database
  • Corresponding PacketReceived event updates message to executed with destination details
  • Parquet file on Akave O3 contains indexed events and is readable
  • Cursor survives restarts: no duplicates on re-run
  • Unit test coverage >80% on decoder and normalization code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions