Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
indexer-reader: remove references to tx_senders (#19802)
## Description Replace uses of `tx_senders` in `IndexerReader`, with other tables that can offer equivalent functionality, so that we can eventually get rid of this table. In transaction filtering, we support filtering by sender using `tx_affected_addresses` (where setting both `sender` and `affected` is equivalent to querying `tx_senders` by `sender`). In event filtering, we support filtering by sender using the `event_senders` table. ## Test plan Manually tested Indexer Reader on the following package: ```move module test::test; use sui::event; public struct Event(u64) has copy, drop, store; public fun emit() { 10u64.do!(|i| event::emit(Event(i))) } ``` Start the local network: ``` sui$ sui start --force-regenesis --with-faucet --with-indexer ``` Set-up two addresses, and call the test function: ``` sui$ sui client faucet sui$ sui client ptb --call "$PKG::test::emit" sui$ sui client switch --address X sui$ sui client faucet sui$ sui client ptb --call "$PKG::test::emit" ``` Run the query against both addresses: ``` curl -LX POST "http://localhost:9124" \ --header 'Content-Type: application/json' \ --data '{ "jsonrpc": "2.0", "id": 1, "method": "suix_queryEvents", "params": [ { "Sender": "'(sui client active-address)'" }, null, 5 ] }' | jq . ``` ## Stack - #19708 --- ## 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): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API:
- Loading branch information