Skip to content

sui_v1.39.0_1732931004_ci

@unmaykr-aftermath unmaykr-aftermath tagged this 29 Nov 21:29
## Description 

Adds the `--data-ingestion-dir` option to `sui start` that allows users
to set a custom data ingestion directory where checkpoint files will be
written to.

This is useful, among other things, for testing a custom [local
reader](https://docs.sui.io/guides/developer/advanced/custom-indexer#local-reader)
indexing setup with low overhead.

This is **not** a breaking change, as `sui start --with-indexer` works
as usual by creating a temporary directory for data ingestion, but now
one can:
- Use `sui start --data-ingestion-dir <path> --with-indexer` to also
have checkpoints written to `<path>`. May be useful for inspecting the
data
- Use `sui start --data-ingestion-dir <path>` to only have checkpoints
written to `<path>`, but not start an indexer service

P.s.: every time I ran `sui start --with-data-ingestion=<path>` (no
other arguments), the network started producing checkpoints from 0. Is
this intended or was the network supposed to pick up from where it left
off? Perhaps it's the full node syncing.

## Test plan 

I tested it locally to verify that the checkpoints are indeed written to
the configured directory. See the screenshot below. `sui start
--with-indexer` still runs without problems and I verified that
checkpoints were committed to the DB.


![image](https://github.com/user-attachments/assets/bbaf4a91-66bc-4456-b9a1-0fe0065b2b0a)

I set `export SUI_CONFIG_DIR=~/.sui/test` for the above.

---

## 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: 
- [x] CLI: Added the `--data-ingestion-dir` option to `sui start` to set
a custom directory where to write the checkpoint files.
- [ ] Rust SDK:
- [ ] REST API:

---------

Co-authored-by: stefan-mysten <135084671+stefan-mysten@users.noreply.github.com>
Assets 2
Loading