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
This setup is for PoC or development environments and it supports Devnet, Testnet and Mainnet. It deploys a single EC2 instance with Sui client. The RPC port is exposed only to internal IP range of the VPC, while P2P ports allow external access to keep the client synced.
16
16
@@ -54,6 +54,8 @@ Create your own copy of `.env` file and edit it:
54
54
cp ./sample-configs/.env-sample-full .env
55
55
nano .env
56
56
```
57
+
**NOTE:** You can find more examples inside the `sample-configs` directory.
58
+
57
59
58
60
4. Deploy common components such as IAM role, and Amazon S3 bucket to store data snapshots
59
61
@@ -65,15 +67,16 @@ Create your own copy of `.env` file and edit it:
65
67
66
68
### Deploy Sui Full-Node
67
69
68
-
1. Deploy JSON_RPC Full Node
70
+
1. Deploy Full Node
69
71
70
72
```bash
71
73
pwd
72
74
# Make sure you are in aws-blockchain-node-runners/lib/sui
**NOTE:** The default VPC must have at least two public subnets in different Availability Zones, and public subnet must set `Auto-assign public IPv4 address` to `YES`.
75
78
76
-
The EC2 instance will deploy, initialize the node and start the first sync. In Cloudformation the instance will show as successful once the node is running. From that point it still takes a while until the node is synced to the blockchain. You can check the sync status with the REST call below in step 4. If the `curl cannot connect to the node on port 8732, then the node is still importing. Once that's done, the curl command works.
79
+
The EC2 instance will deploy, initialize the node and start the first sync. In Cloudformation the instance will show as successful once the node is running. From that point it still takes a while until the node is synced to the blockchain. You can check the sync status with the REST call below in step 4. If the `curl cannot connect to the node on port 9000, then the node is still importing. Once that's done, the curl command works.
77
80
78
81
2. After starting the node you need to wait for the inital syncronization process to finish. It may take from an hour to half a day depending on the the state of the network. You can use Amazon CloudWatch to track the progress. To see them:
79
82
@@ -82,11 +85,7 @@ Create your own copy of `.env` file and edit it:
82
85
83
86
4. Once the initial synchronization is done, you should be able to access the RPC API of that node from within the same VPC. The RPC port is not exposed to the Internet. Check if the JSON-RPC port is open and working — run the following command from a terminal:
## replace <your IP address> with your server IP address
91
90
curl --location --request POST <your IP address>:9000 \
92
91
--header 'Content-Type: application/json' \
@@ -95,8 +94,15 @@ curl --location --request POST <your IP address>:9000 \
95
94
96
95
The result should start like like this (the actual balance might change):
97
96
98
-
```{"jsonrpc":"2.0","result":{"openrpc":"1.2.6","info":{"title":"Sui JSON-RPC","description":"Sui JSON-RPC API for interaction with Sui Full node. Make RPC calls using https://fullnode.NETWORK.sui.io:443, where NETWORK is the network you want to use (testnet, devnet, mainnet). By default, local networks use port 9000.","contact":{"name":"Mysten Labs","url":"https://mystenlabs.com","email":"[email protected]"},"license":{"name":"Apache-2.0","url":"https://raw.githubusercontent.com/MystenLabs/sui/main/LICENSE"},"version":"1.28.2"},"methods
99
97
```
98
+
{"jsonrpc":"2.0","result":{"openrpc":"1.2.6","info":{"title":"Sui JSON-RPC","description":"Sui JSON-RPC API for interaction with Sui Full node. Make RPC calls using https://fullnode.NETWORK.sui.io:443, where NETWORK is the network you want to use (testnet, devnet, mainnet). By default, local networks use port 9000.","contact":{"name":"Mysten Labs","url":"https://mystenlabs.com","email":"[email protected]"},"license":{"name":"Apache-2.0","url":"https://raw.githubusercontent.com/MystenLabs/sui/main/LICENSE"},"version":"1.28.2"},"methods
99
+
```
100
+
101
+
102
+
103
+
104
+
105
+
100
106
101
107
102
108
### Clearing up and undeploying everything
@@ -117,7 +123,7 @@ The result should start like like this (the actual balance might change):
117
123
118
124
# You need to manually delete an s3 bucket with a name similar to 'sui-snapshots-$accountid-tz-nodes-common' on the console,firstly empty the bucket,secondly delete the bucket,and then execute
119
125
# Delete all common components like IAM role and Security Group
120
-
cdk destroy dui-common
126
+
cdk destroy sui-common
121
127
```
122
128
123
129
2. Follow steps to delete the Cloud9 instance in [Cloud9 Setup](../../doc/setup-cloud9.md)
@@ -132,8 +138,98 @@ The result should start like like this (the actual balance might change):
132
138
pwd
133
139
# Make sure you are in aws-blockchain-node-runners/lib/Sui
# Make sure you are in aws-blockchain-node-runners/lib/Sui
154
+
aws ssm start-session --target $INSTANCE_ID
155
+
156
+
```
157
+
158
+
3. Service Tools
159
+
160
+
```
161
+
#Check Sui version
162
+
sui -V
163
+
# Check node logs
164
+
sudo journalctl -fu suid -o cat
165
+
# Check node status
166
+
sudo service suid status
167
+
# Restart node
168
+
sudo systemctl restart suid
169
+
# Stop Node
170
+
sudo systemctl stop suid
171
+
# Start Node
172
+
sudo systemctl start suid
173
+
```
174
+
175
+
4. Journalctl and Node Status throws errors:
176
+
177
+
Set up archival fallback to enable your node to fallback to an archive in case of lag, add this block to your fullnode.yaml file as described here https://docs.sui.io/guides/operator/archives#set-up-archival-fallback. Restart Node
178
+
179
+
```
180
+
Example:
181
+
182
+
state-archive-read-config:
183
+
- object-store-config:
184
+
object-store: "S3"
185
+
# Use mysten-testnet-archives for testnet
186
+
# Use mysten-mainnet-archives for mainnet
187
+
bucket: "mysten-testnet-archives"
188
+
# Use your AWS account access key id
189
+
aws-access-key-id: ""
190
+
# Use your AWS account secret access key
191
+
aws-secret-access-key: ""
192
+
aws-region: "us-west-2"
193
+
object-store-connection-limit: 20
194
+
# How many objects to read ahead when catching up
195
+
concurrency: 5
196
+
# Whether to prune local state based on latest checkpoint in archive.
197
+
# This should stay false for most use cases
198
+
use-for-pruning-watermark: false
199
+
200
+
```
201
+
202
+
5. Restoring a Full node using snapshots: Restoring using RocksDB snapshots to restore from a RocksDB snapshot, follow these steps (https://docs.sui.io/guides/operator/snapshots):
0 commit comments