Skip to content

Commit

Permalink
[light-client] Fix light client rpc (#19028)
Browse files Browse the repository at this point in the history
## Description 

Modernise the RPC used in the light client:
- Use GraphQL to get the end-of-epoch checkpoint.
- Use the supported Rust SDK to get objects and other info.
- Use a generic object store, by default provided by Mysten, for the
full checkpoint data.
- Add a cache to package loader since we observed the same package
downloaded multiple times.

## Test plan 

Existing unit tests, and manual CLI invocations.
  • Loading branch information
gdanezis authored Sep 11, 2024
1 parent 9cd655a commit bb93869
Show file tree
Hide file tree
Showing 6 changed files with 217 additions and 114 deletions.
14 changes: 9 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/sui-light-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
checkpoints_dir/*
6 changes: 5 additions & 1 deletion crates/sui-light-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ serde_json.workspace = true
sui-types.workspace = true
sui-config.workspace = true
sui-rest-api.workspace = true
sui-json.workspace = true
sui-sdk.workspace = true
move-binary-format.workspace = true
sui-json-rpc-types.workspace = true
sui-package-resolver.workspace = true
url.workspace = true
reqwest.workspace = true
object_store.workspace = true
env_logger = "0.11.5"
log = "0.4.22"
6 changes: 4 additions & 2 deletions crates/sui-light-client/example_config/light_client.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
full_node_url: "http://ord-mnt-rpcbig-06.mainnet.sui.io:9000"
full_node_url: "https://fullnode.mainnet.sui.io:443"
checkpoint_summary_dir: "checkpoints_dir"
genesis_filename: "genesis.blob"
genesis_filename: "genesis.blob"
object_store_url: "https://checkpoints.mainnet.sui.io"
graphql_url: "https://sui-mainnet.mystenlabs.com/graphql"
Loading

0 comments on commit bb93869

Please sign in to comment.