Skip to content

[gateway] Implement failed attestation retry with backoff (PRD Section 8) #42

Description

@yinkscss

Context

PRD v0.2 Section 8 defines a failed attestation retry policy: max 5 attempts, exponential backoff, no double-pay on retriable RPC errors.

Problem

Gateway submits attestations once; transient Soroban RPC failures are not retried with backoff or dead-letter handling.

Proposed scope

  • Retry retriable errors (RPC timeout, fee bump) up to 5 times with 1m/2m/4m/8m/16m backoff
  • Do not retry non-retriable errors (InsufficientEscrow, ProgramPaused, missing contributor)
  • Check Postgres (program_id, pr_number) and on-chain state before each retry
  • Mark dead-letter after max attempts in webhook_events or new attestation_attempts table

Acceptance criteria

References

  • docs/PRD.md Section 8
  • crates/gateway/src/attestation.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Drips WaveAligned with Stellar Wave bounty program mechanicscomplexity:highComplex feature or new integrationgatewayGitHub webhook gateway servicehelp wantedExtra attention is neededphase-3Phase 3: Production Hardening

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions