Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On-chain Validator Checkpoint Syncer with Smart Contract Storage #5502

Open
XxAxe1xX opened this issue Feb 18, 2025 · 0 comments
Open

On-chain Validator Checkpoint Syncer with Smart Contract Storage #5502

XxAxe1xX opened this issue Feb 18, 2025 · 0 comments

Comments

@XxAxe1xX
Copy link

Overview

Currently, Hyperlane validators use web2 storage solutions (AWS S3, GCS) for publishing checkpoints. This bounty proposes implementing an on-chain checkpoint syncer, allowing validators to publish checkpoints directly on-chain through a smart contract, making the system more decentralized and web3-native.

Technical Specifications

Smart Contract Implementation

  • Create a contract implementing checkpoint storage functionality
  • Support URI format: onchain://chainName/contractAddress
  • Implement checkpoint publishing for authenticated accounts
  • Support all required CheckpointSyncer trait methods:
    • latest_index
    • write_latest_index
    • update_latest_index
    • fetch_checkpoint
    • write_checkpoint
    • write_metadata
    • write_announcement
    • announcement_location

Validator Integration

  • Utilize existing chain signer abstraction for checkpoint submission
  • Support signature verification (optional, depending on implementation choice)
  • Handle gas optimization for frequent checkpoint submissions

Key Considerations

  1. Storage optimization for on-chain data
  2. Gas cost efficiency for frequent updates
  3. Proper handling of Arbitrum's multi-dimensional gas fees
  4. Compatibility with upcoming checkpoint store methods (ref feat: checkpoint syncer fraud flag #4587)

Implementation Notes

  • The contract should be simple and focused on storage/retrieval
  • Consider making write_latest_index a no-op as suggested in discussions
  • Implement gas overrides consistently across the system
  • Add special handling for Arbitrum Nitro if feasible

Dependencies

  • Base implementation from CheckpointSyncer trait in hyperlane-base/src/traits/checkpoint_syncer.rs
  • Integration with existing validator infrastructure

Testing Requirements

  • Unit tests for contract functionality
  • Integration tests with validator implementation
  • Gas optimization tests
  • Cross-chain compatibility verification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Sprint
Development

No branches or pull requests

1 participant