-
Notifications
You must be signed in to change notification settings - Fork 11.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
indexer: affected objects include created+wrapped/unwrapped+deleted #19618
Merged
Conversation
This file contains 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
amnn
requested review from
wlmyng,
stefan-mysten,
emmazzz and
suiwombat
as code owners
September 30, 2024 11:19
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
This PR ideally needs to be landed today so that it makes it into the next devnet cut and can be picked into 1.34 so that we don't need to wait another release to start backfilling mainnet, cc @ebmifa |
#19620 <- pick to 1.34 |
amnn
force-pushed
the
amnn/idx-rm-complex-ev-filters
branch
from
September 30, 2024 12:54
0a4c5b3
to
4903b1c
Compare
amnn
force-pushed
the
amnn/idx-obj-changes-affected
branch
from
September 30, 2024 12:54
9dd976c
to
90efc22
Compare
bmwill
approved these changes
Sep 30, 2024
amnn
force-pushed
the
amnn/idx-rm-complex-ev-filters
branch
from
September 30, 2024 15:33
4903b1c
to
3524514
Compare
amnn
force-pushed
the
amnn/idx-obj-changes-affected
branch
from
September 30, 2024 15:36
90efc22
to
e806823
Compare
wlmyng
approved these changes
Sep 30, 2024
## Description This PR removes EventFilters from JSON-RPC that aren't supported already by fullnode-backed JSON-RPC: - Combination filters (`All`, `Any`, `Not`, `And`, `Or`) - `Package` - `EventField` These filters were, however, supported by the now-deprecated subscription system, so a question remains whether they are safe to remove. ## Test plan Manually tested, in particular `All: []` support, which we do still need to keep as a way to get all filters (this was also added to the `IndexerReader` implementation): ``` sui$ cargo run --bin sui -- --force-regenesis \ --with-indexer --with-faucet ``` ...run for some time, so that some system events accumulate, then test that we get them from both the fullnode-backed JSONRPC and indexer-backed: Fullnode: ``` curl -LX POST "http://localhost:9000" \ --header 'Content-Type: application/json' \ --data '{ "jsonrpc": "2.0", "id": 1, "method": "suix_queryEvents", "params": [ { "All": [] }, null, 50, true ] }' | jq . ``` Indexer: ``` curl -LX POST "http://localhost:9124" \ --header 'Content-Type: application/json' \ --data '{ "jsonrpc": "2.0", "id": 1, "method": "suix_queryEvents", "params": [ { "All": [] }, null, 50, true ] }' | jq . ```
## Description Broaden the definition of "affected object" to include objects that a transaction creates and then immediately wraps, or objects that it unwraps and then immediately deletes. This ensures that a transaction will show up in the response to an `affectedObject` query if and only if the Object's ID shows up in its `objectChanges` response. ## Test plan Updated GraphQL E2E test: ``` sui$ cargo nextest run -p sui-graphql-e2e-tests \ --features staging -- affected_object ```
amnn
force-pushed
the
amnn/idx-rm-complex-ev-filters
branch
from
September 30, 2024 17:09
3524514
to
800fe53
Compare
amnn
force-pushed
the
amnn/idx-obj-changes-affected
branch
from
September 30, 2024 17:09
e806823
to
e5229c0
Compare
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.
Description
Broaden the definition of "affected object" to include objects that a transaction creates and then immediately wraps, or objects that it unwraps and then immediately deletes. This ensures that a transaction will show up in the response to an
affectedObject
query if and only if the Object's ID shows up in itsobjectChanges
response.Test plan
Updated GraphQL E2E test:
Stack
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.