Skip to content

[relay] Finality guard — only relay after 3 block confirmations #15

Description

@Dipraise1

Context

The Engram → XERIS relay (engram/relay/) currently emits payloads from neurons/validator.py immediately after set_weights(). If the Engram chain reorgs, XERIS may consume outputs that never finalized.

Task

Add a finality guard: hold payloads in a pending queue and only submit to XERIS after the originating block has 3 confirmations on the Engram side.

Acceptance criteria

  • Payloads queued with their origin block number; released only when current_block >= origin_block + 3
  • Queue persists across validator restarts (reuse the existing SQLite relay log)
  • Reorged-out payloads are dropped and logged, not submitted
  • Tests covering confirmation release and reorg drop

From TASKS.md — Relay Phase 2, last open item.

Metadata

Metadata

Assignees

No one assigned

    Labels

    protocolCore protocol, CID, synapse, proofvalidatorValidator scoring or challenge logic

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions