You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
Describe the changes or additions included in this PR.
## 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):
- [ ] gRPC:
- [ ] JSON-RPC:
- [ ] GraphQL:
- [ ] CLI:
- [ ] Rust SDK:
- [ ] Indexing Framework:
Copy file name to clipboardExpand all lines: docs/content/guides/developer/sui-101/local-network.mdx
+55-18Lines changed: 55 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,23 +36,60 @@ Options and flags like `with-indexer`, `with-graphql`, and related require you t
36
36
The following is a list of possible options and flags to pass to `sui start`:
37
37
38
38
```
39
-
--network.config <CONFIG_DIR> Config directory that will be used to store network config, node db, Keystore sui genesis -f --with-faucet generates a genesis config that can be used to start this process. Use with caution as the `-f` flag
40
-
will overwrite the existing config directory. We can use any config dir that is generated by the `sui genesis`
41
-
--force-regenesis A new genesis is created each time this flag is set, and state is not persisted between runs. Only use this flag when you want to start the network from scratch every time you run this command
42
-
--with-graphql[=<WITH_GRAPHQL>] Start a GraphQL server on localhost and port: 127.0.0.1:9125, or on the port provided. When providing a specific value, please use the = sign between the flag and value: `--with-graphql=6125`. Note that
43
-
GraphQL requires a running indexer
44
-
--with-faucet[=<WITH_FAUCET>] Start a faucet with default host and port: 127.0.0.1:9123, or on the port provided. When providing a specific value, please use the = sign between the flag and value: `--with-faucet=6123`
45
-
--with-indexer[=<WITH_INDEXER>] Start an indexer with default host and port: 0.0.0.0:9124, or on the port provided. When providing a specific value, please use the = sign between the flag and value: `--with-indexer=6124`. The indexer be started in writer mode and reader mode
46
-
--fullnode-rpc-port <FULLNODE_RPC_PORT> Port to start the Fullnode RPC server on. Default port is 9000 [default: 9000]
47
-
--pg-port <PG_PORT> Port for the Indexer Postgres DB. Default port is 5432 [default: 5432]
48
-
--pg-host <PG_HOST> Hostname for the Indexer Postgres DB. Default host is localhost [default: localhost]
49
-
--pg-db-name <PG_DB_NAME> DB name for the Indexer Postgres DB. Default DB name is sui_indexer [default: sui_indexer]
50
-
--pg-user <PG_USER> DB username for the Indexer Postgres DB. Default username is postgres [default: postgres]
51
-
--pg-password <PG_PASSWORD> DB password for the Indexer Postgres DB. Default password is postgrespw [default: postgrespw]
52
-
--epoch-duration-ms <EPOCH_DURATION_MS> Set the epoch duration. Can only be used when `--force-regenesis` flag is passed or if there's no genesis config and one will be auto-generated. When this flag is not set but `--force-regenesis` is set, the
53
-
epoch duration will be set to 60 seconds
54
-
--no-full-node Start the network without a fullnode
55
-
-h, --help Print help (see more with '--help')
39
+
--network.config <CONFIG_DIR>
40
+
Config directory that will be used to store network config, node db, keystore. sui genesis -f --with-faucet generates a genesis config that can be used to start this process. Use with caution as the `-f` flag will overwrite the existing config
41
+
directory. We can use any config dir that is generated by the `sui genesis`
42
+
43
+
--force-regenesis
44
+
A new genesis is created each time this flag is set, and state is not persisted between runs. Only use this flag when you want to start the network from scratch every time you run this command.
45
+
46
+
To run with persisted state, do not pass this flag and use the `sui genesis` command to generate a genesis that can be used to start the network with.
47
+
48
+
--with-faucet[=<FAUCET_HOST_PORT>]
49
+
Start a faucet with default host and port: 0.0.0.0:9123. This flag accepts also a port, a host, or both (e.g., 0.0.0.0:9123). When providing a specific value, please use the = sign between the flag and value: `--with-faucet=6124` or
50
+
`--with-faucet=0.0.0.0`, or `--with-faucet=0.0.0.0:9123`
51
+
52
+
--with-indexer[=<DATABASE_URL>]
53
+
Start an indexer with a PostgreSQL database.
54
+
55
+
Three modes of operation: - Not specified: No indexer is started (unless --with-graphql is set) - `--with-indexer`: Create/use a temporary database in the network's configuration directory - `--with-indexer=<URL>`: Use the provided PostgreSQL
56
+
database URL
57
+
58
+
When providing a database URL, use the = sign: `--with-indexer=postgres://user:pass@host:5432/db`
Start a Consistent Store with default host and port: 0.0.0.0:9124. This flag accepts also a port, a host, or both (e.g., 0.0.0.0:9124).
62
+
63
+
When providing a specific value, please use the = sign between the flag and value: `--with-consistent-store=9124` or `--with-consistent-store=0.0.0.0`, or `--with-consistent-store=0.0.0.0:9124` The Consistent Store will be automatically enabled
64
+
when `--with-graphql` is set.
65
+
66
+
--with-graphql[=<GRAPHQL_HOST_PORT>]
67
+
Start a GraphQL server with default host and port: 0.0.0.0:9125. This flag accepts also a port, a host, or both (e.g., 0.0.0.0:9125).
68
+
69
+
When providing a specific value, please use the = sign between the flag and value: `--with-graphql=9125` or `--with-graphql=0.0.0.0`, or `--with-graphql=0.0.0.0:9125`
70
+
71
+
Note that GraphQL requires a running indexer and consistent store, which will be enabled by default even if those flags are not set.
72
+
73
+
--fullnode-rpc-port <FULLNODE_RPC_PORT>
74
+
Port to start the Fullnode RPC server on. Default port is 9000
75
+
76
+
[default: 9000]
77
+
78
+
--epoch-duration-ms <EPOCH_DURATION_MS>
79
+
Set the epoch duration. Can only be used when `--force-regenesis` flag is passed or if there's no genesis config and one will be auto-generated. When this flag is not set but `--force-regenesis` is set, the epoch duration will be set to 60
80
+
seconds
81
+
82
+
--data-ingestion-dir <DATA_INGESTION_DIR>
83
+
Make the fullnode dump executed checkpoints as files to this directory. This is incompatible with --no-full-node.
84
+
85
+
If --with-indexer is set, this defaults to a temporary directory.
86
+
87
+
--no-full-node
88
+
Start the network without a fullnode
89
+
90
+
--committee-size <COMMITTEE_SIZE>
91
+
Set the number of validators in the network. If a genesis was already generated with a specific number of validators, this will not override it; the user should recreate the genesis with the desired number of validators
92
+
-h, --help Print help (see more with '--help')
56
93
```
57
94
58
95
Use `sui start --help` to see these options in your console.
@@ -201,4 +238,4 @@ To resolve this, switch or update to Node.js 18 and then try again.
201
238
202
239
## Test with the Sui TypeScript SDK
203
240
204
-
The published version of the Sui TypeScript SDK might be an earlier version than the version of Sui you installed for your local network. To make sure you're using the latest version of the SDK, use the `experimental`-tagged version (for example, `0.0.0-experimental-20230317184920`) in the [Current Tags](https://www.npmjs.com/package/@mysten/sui?activeTab=versions) section of the Sui NPM registry.
241
+
The published version of the Sui TypeScript SDK might be an earlier version than the version of Sui you installed for your local network. To make sure you're using the latest version of the SDK, use the `experimental`-tagged version (for example, `0.0.0-experimental-20230317184920`) in the [Current Tags](https://www.npmjs.com/package/@mysten/sui?activeTab=versions) section of the Sui NPM registry.
0 commit comments