sui_test_validator/
main.rs

1// Copyright (c) Mysten Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4fn main() {
5    println!("sui-test-validator binary has been deprecated in favor of sui start, which is a more powerful command that allows you to start the local network with more options.
6
7How to install/build the sui binary IF:
8    A: you only need the basic functionality, so just faucet and no persistence (no indexer, no GraphQL service), build from source as usual (cargo build --bin sui) or download latest archive from release archives (starting from testnet v1.28.1 or devnet v1.29) and use sui binary.
9    B: you need to also start an indexer (--with-indexer ), or a GraphQL service (--with-graphql), you either:
10    - download latest archive from release archives (starting from testnet v1.28.1 or devnet v1.29) and use sui-pg binary (note that with v1.34.0 sui-pg no longer exists in the release. Use `sui` binary instead).
11  OR
12    - build from source. This requires to have libpq/postgresql dependencies installed (just as when using sui-test-validator):
13        - cargo build --bin sui
14        - cargo run --bin sui -- start --with-faucet --force-regenesis --with-indexer --with-graphql
15
16Running the local network:
17 - (Preferred) In the simplest form, you can replace sui-test-validator with sui start --with-faucet --force-regenesis. This will create a network from a new genesis and start a faucet (127.0.0.1:9123). This will not persist state.
18 - Use the drop-in replacement script: sui/scripts/sui-test-validator.sh and pass in all the flags/options as you used to.
19
20Use sui start --help to see all the flags and options, such as:
21  * --with-indexer --> to start the indexer on the default host and port. Note that this requires \
22a Postgres database to be running locally, or you need to set the different options to connect to a \
23remote indexer database.
24  * --with-graphql --> to start the GraphQL server on the default host and port");
25}