feat!: hold at most one complex transaction filter - #1461
Open
DaughterOfMars wants to merge 8 commits into
Open
Conversation
The GraphQL service stops supporting the combination of two or more complex filters with v1.38, and the client never sent `scanLimit`, so those combinations already failed at the server. A single selector field makes them unrepresentable instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
10 tasks
Thoralf-M
reviewed
Sep 4, 2026
Thoralf-M
reviewed
Sep 4, 2026
Thoralf-M
reviewed
Sep 4, 2026
Thoralf-M
approved these changes
Sep 4, 2026
Member
|
conflicts |
Member
|
Maybe a conflict resolution issue but we're removing |
Contributor
Author
sounds like it yeah, I'll fix it |
| self.function = function.into(); | ||
| /// Select on a function, kind, address or object, replacing the selector | ||
| /// already set, if any. | ||
| pub fn with_selector(mut self, selector: impl Into<Option<TransactionsSelector>>) -> Self { |
Member
There was a problem hiding this comment.
Can we make this the only one that accepts an option? I think it's weird that you can call any of the other setters with None and it resets no matter what was actually preset. It's just a bit confusing. I think it's fine to just take plain values for the others?
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.
Why
The GraphQL service stops supporting the combination of two or more complex filters (function, recipient, input object, changed object, wrapped or deleted object) with the v1.38 release, along with the
scanLimitthat made those combinations work. The client never sentscanLimit, so such a filter already failed at the server; nothing in the type prevented building one.What changes
TransactionsFilternow holds at most one of those filters pluskind, which the service also cannot combine with any of them, so an invalid combination no longer exists as a value. The setters for those filters replace each other rather than accumulating — that is the one behavioral surprise, and it is documented on each of them. The sender, checkpoint and digest filters are unaffected and still combine freely.Over the FFI the same guarantee needs methods, so the filter became an object with setters instead of a record of optional fields, following
ClientTransactionBuilder.affectedAddressis still not exposed; adding it is now one variant rather than a fourth invalid pairing, but it would make theaddress_transactionsexamples obsolete, so it belongs in its own PR. The@oneOfsubscription filters have the same unenforced "exactly one" property and are untouched.Test plan
cargo clippy --workspace --all-targets --all-features,make check-fmt,make bindings-examples-format-checktransactions_with_functionandtransactions_with_sharedagainst testnet in both Rust and Pythonbindings/swift/Package.swiftitself, unrelated to this change🤖 Generated with Claude Code