Repository navigation
feat: add zero-rate error, keeper maintenance, stream metadata, and concurrency tests - #798
Merged
Jaydbrown merged 1 commit intoOct 18, 2026
Conversation
EmmanuelOchaje
force-pushed
the
feat/stream-enhancements-792-791-790-789
branch
2 times, most recently
from
October 18, 2026 08:27
63100e0 to
45a3079
Compare
…oncurrency tests - Add ZeroRateStreamNotAllowed error variant for stream creation validation (conduit-protocol#792) - Add bump_stream_instance function for low-cost keeper-driven TTL maintenance (conduit-protocol#791) - Add set_stream_title/set_reference_tag and getters for post-creation metadata updates (conduit-protocol#790) - Add high-concurrency stress tests for factory stream creation under load (conduit-protocol#789) Closes conduit-protocol#792 Closes conduit-protocol#791 Closes conduit-protocol#790 Closes conduit-protocol#789
EmmanuelOchaje
force-pushed
the
feat/stream-enhancements-792-791-790-789
branch
from
October 18, 2026 08:34
45a3079 to
5a77647
Compare
|
@EmmanuelOchaje 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four enhancements to DripStream and DripFactory contracts:
Changes
1. ZeroRateStreamNotAllowed Error (#792)
File:
contracts/stream/src/errors.rsAdded new error variant
ZeroRateStreamNotAllowed = 22to explicitly reject stream creation withrate_per_second <= 0. Improves error specificity over genericInvalidAmount.2. bump_stream_instance Keeper Function (#791)
File:
contracts/stream/src/ttl.rsAdded low-cost public function
bump_stream_instance(env: &Env, stream_id: &str) -> Result<(), Error>that:3. Stream Title & Reference Tag (#790)
Files:
contracts/stream/src/storage.rs,contracts/stream/src/lib.rsAdded sender-modifiable post-creation metadata:
set_stream_title(env, caller, title)— update descriptive nameset_reference_tag(env, caller, tag)— link to external systems (invoice, order ID)stream_title(env) -> Option<String>— read titlereference_tag(env) -> Option<String>— read tagStorage keys:
DataKey::StreamTitleandDataKey::ReferenceTag4. High-Concurrency Factory Tests (#789)
File:
contracts/factory/src/tests.rsAdded two new tests:
high_stream_creation_concurrency()concurrent_stream_creation_maintains_factory_invariants()Both tests ensure factory behavior remains correct under stream creation load.
Technical Notes
set_stream_title,set_reference_tag) require caller auth and prevent calls on cancelled streamsenv.storage().instance().extend_ttl()mechanicsDataKeyenum patternSetupharness for consistencyCloses #792
Closes #791
Closes #790
Closes #789