Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpc-alt: suix_getLatestSuiSystemState
## Description Implement `suix_getLatestSuiSystemState` from the governance API. This works by fetching the latest version of a particular object, using just the `obj_versions` table. This would not work for arbitrary objects, because `obj_versions` is not updated when an object is deleted or wrapped. This means that when asking for the latest version of an object that is currently deleted or wrapped, we will see the version prior to the deletion/wrap. This should be fine for the system state wrapper and its inner object because these cannot be deleted or wrapped. There are two more simplifications that have been undertaken here, by ignoring consistency and watermarking. Although we do need to implement both of these for GraphQL, we can get away with not doing that yet (for JSONRPC) because our current JSONRPC implementation does neither of these things, and so therefore this should not be a regression. ## Test plan New E2E tests show inspecting the system state after operations that would tweak it (staking, changing the epoch, withdrawing stake): ``` sui$ cargo nextest run -p sui-indexer-alt-e2e-tests -- system_state ```
- Loading branch information