Skip to content
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

rpc-alt: getOwnedObjects #21119

Open
wants to merge 6 commits into
base: amnn/rpc-df
Choose a base branch
from
Open

rpc-alt: getOwnedObjects #21119

wants to merge 6 commits into from

Conversation

amnn
Copy link
Contributor

@amnn amnn commented Feb 6, 2025

Description

Implement querying objects by owner and type. Also introduce BCS-serialized cursors (to keep size down).

Test plan

New E2E tests:

sui$ cargo nextest run -p sui-indexer-alt-e2e-tests \
  -- objects/query

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.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • gRPC:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

amnn added 6 commits February 5, 2025 14:41
## Description
Rename `Cursor` to `JsonCursor`, and introduce a generic `Cursor` trait,
so that we can introduce different cursor formats. This is in
preparation for adding a `BcsCursor`, similar to what we have on the
GraphQL side.

## Test plan
CI (this is a refactoring)
## Description

Basic support for getting an address's owned objects (without filtering
by type).

The performance of these queries could be improved by changing index
order (such that the Object IDs are ordered similarly to
cp_sequence_number), which will be done in a follow-up PR.
of

## Test plan

New E2E tests:

```
sui$ cargo nextest run -p sui-indexer-alt-e2e-tests -- objects/query
```

Query performance was also validated by inspecting query plans on the
production database (with and without a cursor present).
## Description
Filter owned objects by packages.

## Test plan
New E2E tests:

```
sui$ cargo nextest run -p sui-indexer-alt-e2e-tests \
  -- objects/query/by_package
```
## Description
Filtering owned objects by their type's module.

## Test plan
New E2E tests:

```
sui$ cargo nextest run -p sui-indexer-alt-e2e-tests \
  -- objects/query/by_module
```
## Description
Filter owned objects by their type name (ignoring type parameters).

## Test plan
New E2E tests:

```
sui$ cargo nextest run -p sui-indexer-alt-e2e-tests \
  -- objects/query/by_name
```
## Description
Filter owned objects by it's type's type parameters.

## Test plan

```
sui$ cargo nextest run -p sui-indexer-alt-e2e-tests \
  -- objects/query/by_type_params
```
@amnn amnn requested review from bmwill, emmazzz, gegaowp and wlmyng February 6, 2025 13:10
@amnn amnn self-assigned this Feb 6, 2025
Copy link

vercel bot commented Feb 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 6, 2025 1:11pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Feb 6, 2025 1:11pm
sui-kiosk ⬜️ Ignored (Inspect) Feb 6, 2025 1:11pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant