sui icon indicating copy to clipboard operation
sui copied to clipboard

jsonrpc: introduce coin_index_2 with coins sorted by balance

Open bmwill opened this issue 1 year ago • 1 comments

Description

Introduce a new coin_index_2 index with coins sorted by balance in decreasing value (sorted high to low).

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:
  • [x] JSON-RPC:

Introduces a new coin index used in returning paginated coins for the sui_getCoins JSON-RPC method. This changes the pagination order of coins to be returned in order of decreasing value (coins with a larger balance are returned first). In order to accomplish this a new column family (coin_index_2) was added to the jsonrpc indexes rocksdb database, deprecating and obsolescing the old coin_index column family.

[!NOTE] On startup a Fullnode will need to initialize this new index by iterating through, and processing the live object set. This will result in a small period of downtime on node startup.

Once the new index has been initialized the old one will be removed in order to reclaim disk space.

  • [ ] GraphQL:
  • [ ] CLI:
  • [ ] Rust SDK:
  • [ ] REST API:

bmwill avatar Oct 11 '24 17:10 bmwill

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

vercel[bot] avatar Oct 11 '24 17:10 vercel[bot]