Skip to content

Reject far-future stream start times - #490

Open
code-0-stella wants to merge 2 commits into
conduit-protocol:mainfrom
code-0-stella:bugfix/395-start-time-upper-bound-2
Open

Reject far-future stream start times#490
code-0-stella wants to merge 2 commits into
conduit-protocol:mainfrom
code-0-stella:bugfix/395-start-time-upper-bound-2

Conversation

@code-0-stella

Copy link
Copy Markdown

Reject far-future stream start times

Summary

Rejects stream creation when start_time is too far in the future, preventing the protocol from escrowing a full future deposit for a stream that will not begin for an extended period.

This closes the gap where create_stream already rejected start_time < now, but still accepted far-future schedules. That allowed a sender to lock funds immediately with no meaningful accrual and no timely early exit beyond a manual cancel.

What changed

  • Added an upper bound on start_time - now based on the governor’s configured maximum scheduling horizon.
  • Rejected values beyond that ceiling with StartTimeTooFarInFuture.
  • Added regression tests covering:
    • far-future open-ended streams
    • far-future fixed-duration streams
    • edge case at the ceiling
    • just-past-the-ceiling reject path

Why

A stream scheduled years in the future still escrows the full deposit immediately. That leaves funds idle, increases recipient index bloat risk, and creates a poor UX trap for users who expect the stream to begin promptly.

Verification

Verified with focused regression tests covering the far-future start-time cases on the fresh task branch.

Closes #395

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@code-0-stella Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: create_stream has no upper bound on start_time — a far-future stream escrows its full deposit immediately and idle

1 participant