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

indexer reader: derive dynamic field info #19099

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

gegaowp
Copy link
Contributor

@gegaowp gegaowp commented Aug 26, 2024

Description

title, with this pr and the corresponding pr in GQL, we can remove df_* from objects table except df_kind.

Test plan

How did you test the new or updated feature?


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:

Copy link

vercel bot commented Aug 26, 2024

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 Sep 9, 2024 9:56pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Sep 9, 2024 9:56pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Sep 9, 2024 9:56pm
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Sep 9, 2024 9:56pm

Copy link
Contributor

@amnn amnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Note that with this change JSON-RPC will fetch a dynamic object field's value object just to calculate its object ref, but doesn't offer a way to return its contents.

Not necessarily a blocker for this PR, but I just wanted to call that out from a query performance perspective, especially if an object has many dynamic object fields -- IIUC, now each one will introduce an extra DB roundtrip.

We have the similar issues in GraphQL, but there people can query for the object contents, and we batch the reads.

crates/sui-indexer/src/indexer_reader.rs Outdated Show resolved Hide resolved
crates/sui-indexer/src/indexer_reader.rs Outdated Show resolved Hide resolved
@gegaowp gegaowp merged commit 227ded1 into MystenLabs:main Sep 9, 2024
44 of 45 checks passed
@gegaowp gegaowp deleted the derive-df-info branch September 9, 2024 22:37
suiwombat pushed a commit that referenced this pull request Sep 16, 2024
## Description 

title, with this pr and the corresponding pr in GQL, we can remove df_*
from objects table except df_kind.

## Test plan 

How did you test the new or updated feature?

---

## 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:
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.

2 participants