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

sui-field-count: const instead of fn and use it in sui-indexer-alt #20143

Merged
merged 4 commits into from
Dec 3, 2024

Conversation

gegaowp
Copy link
Contributor

@gegaowp gegaowp commented Nov 1, 2024

Description

  • change field_count trait from fn to const as we want to use it as part of const def
  • use it in sui-indexer-alt

Test plan

  1. existing tests for sui-field-count
  2. for replacements, I added temp tests to ensure the values before and after were the same, removed them afterwards to avoid unnecessary changes later on when we change struct definition

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

@gegaowp gegaowp temporarily deployed to sui-typescript-aws-kms-test-env November 1, 2024 20:37 — with GitHub Actions Inactive
@gegaowp gegaowp requested review from amnn, lxfind, bmwill, emmazzz and wlmyng and removed request for amnn November 1, 2024 20:37
@gegaowp gegaowp requested a review from amnn November 1, 2024 20:38
Copy link
Member

@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.

Thanks @gegaowp -- the change from a function to a constant looks good, but the integration needs some tweaking, PTAL.

Copy link
Member

@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.

Some smaller suggestions (and a spurious extra commit), but this is shaping up in a positive direction, thanks @gegaowp !

crates/sui-rpc-benchmark/Cargo.toml Outdated Show resolved Hide resolved
crates/sui-indexer-alt/src/pipeline/concurrent/mod.rs Outdated Show resolved Hide resolved
crates/sui-indexer-alt/src/pipeline/processor.rs Outdated Show resolved Hide resolved
crates/sui-indexer-alt/src/pipeline/sequential/mod.rs Outdated Show resolved Hide resolved
Copy link
Member

@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, thanks @gegaowp ! Just one comment to avoid the duplication for calculating max_chunk_rows (without allowing people to override it).

crates/sui-indexer-alt/src/pipeline/concurrent/mod.rs Outdated Show resolved Hide resolved
@gegaowp gegaowp temporarily deployed to sui-typescript-aws-kms-test-env December 3, 2024 14:52 — with GitHub Actions Inactive
@gegaowp gegaowp merged commit 859cea2 into MystenLabs:main Dec 3, 2024
48 checks passed
@gegaowp gegaowp deleted the const-field-count branch December 3, 2024 16:09
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