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
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
InsufficientEscrow,ProgramPaused, missing contributor)(program_id, pr_number)and on-chain state before each retrywebhook_eventsor new attestation_attempts tableAcceptance criteria
References
docs/PRD.mdSection 8crates/gateway/src/attestation.rs