feat(factory, stream, oracle): doc comment, oracle reconfig safety, combined top-up, batch cancel (#212, #206, #205, #204) - #266
Merged
Jaydbrown merged 5 commits intoJul 29, 2026
Conversation
|
@Odkinggjnr 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! 🚀 |
Contributor
|
Reviewed and all four sub-fixes (#212, #206, #205, #204) check out correctly — good auth gating, overflow checks, and test coverage throughout. This now has a real merge conflict against |
…nduit-protocol#206, conduit-protocol#205, conduit-protocol#204 Add failing/specifying tests for: - conduit-protocol#212: streams_by_recipient doc comment gap (verify function behavior) - conduit-protocol#206: configure_oracle silent reconfiguration when decimals/asset_peg change — test that old price data is cleared on reconfig - conduit-protocol#205: top_up_and_extend combined convenience call tests covering happy path, zero-amount, zero-time, cancelled, and open-ended rejection - conduit-protocol#204: cancel_batch_streams boundary tests (empty batch, oversized batch) These tests specify the expected behavior for the features and fixes implemented in subsequent commits. Refs conduit-protocol#212, conduit-protocol#206, conduit-protocol#205, conduit-protocol#204
…-protocol#206, conduit-protocol#205, conduit-protocol#204 - conduit-protocol#212: Add doc comment to streams_by_recipient mirroring streams_by_sender - conduit-protocol#206: configure_oracle now clears DataKey::Price, per-feeder Submissions, and the Submitters list when decimals or asset_peg changes, preventing stale prices from being silently misinterpreted under new parameters - conduit-protocol#205: Add top_up_and_extend combined convenience entry point on DripStream that performs both state changes in a single authorized call - conduit-protocol#204: Add cancel_batch_streams on DripFactory that cancels N streams in one transaction via cross-contract calls, matching create_batch_streams bulk ergonomics. Adds drip-stream dependency to factory Cargo.toml. Fixes conduit-protocol#212, conduit-protocol#206, conduit-protocol#205, conduit-protocol#204
Additional coverage for: - configure_oracle preserves price when only max_staleness/oracle_address changes (no false positives on the clearing logic) - top_up_and_extend on a cancelled stream is rejected - top_up_and_extend arithmetic overflow on end_time - cancel_batch_streams empty and oversized batch rejection Refs conduit-protocol#212, conduit-protocol#206, conduit-protocol#205, conduit-protocol#204
- Add rustdoc to streams_by_recipient matching streams_by_sender (conduit-protocol#212) - Add rustdoc to configure_oracle explaining the price-clearing behavior when decimals or asset_peg changes (conduit-protocol#206) - Add rustdoc to top_up_and_extend explaining the combined convenience call and its relationship to top_up and extend_duration (conduit-protocol#205) - Add rustdoc to cancel_batch_streams documenting atomicity, batch limits, and the cross-contract cancel pattern (conduit-protocol#204) Refs conduit-protocol#212, conduit-protocol#206, conduit-protocol#205, conduit-protocol#204
Run cargo fmt --all and cargo clippy --all-targets -- -D warnings after all changes across factory, stream, and oracle contracts. Refs conduit-protocol#212, conduit-protocol#206, conduit-protocol#205, conduit-protocol#204
Jaydbrown
force-pushed
the
feat/212-206-205-204-doc-oracle-topup-batch-cancel
branch
from
July 29, 2026 08:38
d00dc07 to
3342c22
Compare
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
Enhancement: DripFactory::streams_by_recipient has no doc comment #212 —
streams_by_recipientdoc comment: Added rustdoc toDripFactory::streams_by_recipientmirroring the existing doc comment onstreams_by_sender, documenting pagination behavior and the empty-vector-on-overflow contract.Enhancement: configure_oracle allows silent reconfiguration with no validation against existing price data #206 —
configure_oraclesilent reconfiguration safety:configure_oraclenow detects whendecimalsorasset_pegchanges relative to the stored config and clears all existing price data (DataKey::Price, per-feederDataKey::Submissionentries, and theDataKey::Submitterslist). This prevents stale prices submitted under the old config from being silently misinterpreted under new parameters —get_twap_pricereturnsNoPriceAvailableuntil a freshsubmit_priceis made. Changes tomax_stalenessororacle_addressalone do not clear price data, as those do not affect price magnitude interpretation.Enhancement: top_up and extend_duration have no combined convenience call #205 —
top_up_and_extendcombined convenience call: AddedDripStream::top_up_and_extend(env, caller, amount, extra_time_seconds)that deposits funds and extendsend_timein a single authorized call, reducing round-trips and the risk of a sender performing only one half of the pair. Follows the samestate::with_guardre-entrancy pattern, auth viarequire_sender_or_operator, and event emission as the existingtop_upandextend_duration.Enhancement: create_batch_streams has no equivalent batch-cancel counterpart #204 —
cancel_batch_streamsbatch cancellation: AddedDripFactory::cancel_batch_streams(env, sender, stream_addresses)that cancels multiple streams in one transaction via cross-contract calls toDripStream::cancel, matching the bulk-creation ergonomics ofcreate_batch_streams. Bounded by the sameMAX_BATCH_SIZE(100), withEmptyBatch/BatchTooLargeguards. Atomicity is inherited from Soroban's all-or-nothing transaction semantics. Addeddrip-streamas a dependency of the factory crate for the cross-contract client.Test plan
decimalschanges, whenasset_pegchanges, and that price is preserved when onlymax_stalenesschanges (no false positive clearing).top_up_and_extendtests: Happy-path (balance + end_time update), zero-amount rejection (InvalidAmount), zero-time rejection (InvalidTimeRange), cancelled-stream rejection, and open-ended stream rejection.cancel_batch_streamstests: Empty batch rejection (EmptyBatch), oversized batch rejection (BatchTooLarge).Closes #212
Closes #206
Closes #205
Closes #204