Skip to content

Implement Light Client Header Chain Synchronization Service #34

@kingofthebongo2008

Description

@kingofthebongo2008

Description

Per Architecture.md's Light Sync section, the system needs a LightClient class that syncs block headers from a trusted checkpoint to track the chain tip. This is essential for consensus verification without downloading full blocks.

Features described in Architecture:

  • Request headers from trusted checkpoint
  • Verify chain-specific consensus
  • Track chain tip for monitoring

Acceptance Criteria

  • Create include/rlpx/sync/light_client.hpp
  • Implement LightClient class with checkpoint-based sync
  • Add syncHeaders(startHash, count) coroutine method
  • Implement header chain validation (parent hash linkage)
  • Maintain local header cache with configurable depth
  • Provide getLatestHeader() for current chain tip
  • Add callback for new headers received
  • Add integration tests with testnet
  • Use coroutines for async operations

Priority

Medium

Related Requirements

  • CLAUDE.md: Prefer to use coroutines for high latency operations like network io
  • Architecture.md: Light Client - Connect to each chain's P2P network, sync block headers
  • Issue EVM Bridging Messaging System #2: Maintains synchronization between source and destination chains

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