[Contracts] resume_stream lacks an is_active/status guard - a cancelled-while-paused stream can be resumed back to Active
Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0
Labels: bug, contracts, Stellar Wave, rust
A stream that was cancelled while paused can be resumed back to Active, leaving an inconsistent record.
cancel_stream (lib.rs:515-518) sets is_active=false and status=Cancelled but never clears paused or paused_at. resume_stream (lib.rs:591) only checks if !stream.paused and never calls validate_stream_active. So if a stream was paused (paused=true) and then cancelled, it still passes the resume check: status flips back to Active (lib.rs:613) while is_active stays false. That's a contradictory record, plus a phantom stream_resumed event with a bogus new_end_time that indexers read as a reactivation.
What the fix has to hold to
resume_streamrejects any non-active stream- Cancelling settles the pause flags so no stale
pausedstate lingers
Done when
- [ ]
resume_streamrejects non-active streams (callvalidate_stream_activeor requirestatus==Paused), returningStreamInactive - [ ]
cancel_streamclearspaused/paused_atwhen settling - [ ] Test: pause, then cancel, then
resume_streamreturnsStreamInactiveand emits nostream_resumedevent - [ ] Tests + fmt pass, CI green
Where to start
All in contracts/stream_contract/src/lib.rs. Indexer/event-worker changes are out of scope. Small guard plus a state-cleanup line.
@Abdulrasaq1515 has applied to work on this issue as part of the Stellar Wave Program's 6th wave.
pls assign me
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Abdulrasaq1515 to this issue.
@Killerjunior has applied to work on this issue as part of the Stellar Wave Program's 6th wave.
Hi maintainer, I have read and understood the issue requirements and checked the necessary documentation. I’m confident I can work on this task effectively and deliver a proper solution.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Killerjunior to this issue.
@Gogo-Eng has applied to work on this issue as part of the Stellar Wave Program's 6th wave.
i will love to work on this issue
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Gogo-Eng to this issue.
@iyanumajekodunmi756 has applied to work on this issue as part of the Stellar Wave Program's 6th wave.
I would love to work on this issue
ℹ️ Repo Maintainers: To accept this application, review their application or assign @iyanumajekodunmi756 to this issue.
@Frontman-Code has applied to work on this issue as part of the Stellar Wave Program's 6th wave.
I will love to work on this issue
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Frontman-Code to this issue.
@Anthony-19 has applied to work on this issue as part of the Stellar Wave Program's 6th wave.
Hi Maintainer, I would love to jump on this
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Anthony-19 to this issue.
@AbuJulaybeeb has applied to work on this issue as part of the Stellar Wave Program's 6th wave.
Hi Maintainer, haven reviewed the description of the issue, and well experienced with Js Library, I would like to hop on the issue and sure to deliver at ETA 2hrs
ℹ️ Repo Maintainers: To accept this application, review their application or assign @AbuJulaybeeb to this issue.
@deep-bhikadiya has applied to work on this issue as part of the Stellar Wave Program's 6th wave.
Hello, this looks like something I can help with. I’ll work on the PR today and share it once it’s ready.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @deep-bhikadiya to this issue.
Congratulations, @Anthony-19! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on June 30, 2026.
🧑💻 @Anthony-19: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
🦊 GrantFox — @Anthony-19 has been assigned to this issue!
Next steps:
- Open a Pull Request referencing this issue (e.g.,
Closes #787) - Your PR will be reviewed by the LabsCrypt maintainers
Good luck! Track your progress on GrantFox.
This issue has been removed from the Stellar Wave Program by the repository maintainers.
@Anthony-19, you have been unassigned from this issue. If you have any questions, please reach out to the repo maintainers.
@e-simileoluwa has applied to work on this issue as part of the Stellar Wave Program's 11th wave.
Hi maintainer, I can get this issue fixed quickly. Please assign it to me
ℹ️ Repo Maintainers: To accept this application, review their application or assign @e-simileoluwa to this issue.
Congratulations, @e-simileoluwa! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on November 25, 2026.
🧑💻 @e-simileoluwa: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
This issue has been completed by @e-simileoluwa as part of the Stellar Wave Program's 11th Wave 🥳
😎 @e-simileoluwa: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.