Skip to content

Add per-phase timeouts to descriptor coordination #240

@kwsantiago

Description

@kwsantiago

Descriptor sessions currently have a single 10-minute timeout (DESCRIPTOR_SESSION_TIMEOUT_SECS = 600). This makes it hard to distinguish between a stuck contribution phase vs a stuck finalize phase.

Add per-phase timeouts so each phase has an appropriate deadline:

  • Contribution phase: 5 minutes from proposal (waiting for xpubs)
  • Finalize phase: 2 minutes from all contributions received (waiting for initiator to assemble)
  • ACK phase: 2 minutes from finalize sent (waiting for peer verification)

This enables:

  • More precise timeout events (DescriptorFailed with phase-specific reason)
  • Faster retry on contribution stalls without waiting the full 10 minutes
  • Better UX — the desktop/mobile UI can show which phase is stuck

Changes needed:

  • Add phase timestamps to DescriptorSession (e.g. contributions_complete_at: Option<Instant>, finalized_at: Option<Instant>)
  • Add per-phase timeout constants to protocol.rs
  • Check phase-specific timeouts in is_expired() based on current state
  • Emit phase-specific timeout reasons in cleanup

Metadata

Metadata

Assignees

Labels

easyenhancementNew feature or requestnostr-frostNostr FROST coordination protocolp3Lowest Priority

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions