Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
indexer: support TransactionFilter::AffectedObject (#19614)
## Description Add an `AffectedObject` filter on `TransactionFilter` and implement it in `IndexerReader` and in the subscription system. This filter is not implemented on fullnode indices, and in a follow-up PR, support for `InputObject` and `ChangedObject` will be removed from the PG-backed implementation of JSON-RPC. It was difficult to replace `InputObject`/`ChangedObject` support on fullnode with `AffectedObject` because we don't have (and don't want to add) the necessary indices, and the current filters are referred to in certain tests. ## Test plan Manually tested with a local network: ``` sui$ cargo run --bin sui -- start --with-indexer --force-regenesis ``` ``` sui$ curl -LX POST "http://localhost:9124" \ --header 'Content-Type: application/json' \ --data '{ "jsonrpc": "2.0", "id": 1, "method": "suix_queryTransactionBlocks", "params": [ { "filter": { "AffectedObject":"0x2" } }, null, 50, true ] }' | jq '.result.data.[].digest' ``` ## Stack - #19474 --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [x] Indexer: Adds support for filtering transactions by their affected object - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API:
- Loading branch information