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
Copy file name to clipboardExpand all lines: lib/ethereum/README.md
+46-8Lines changed: 46 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ We will use AWS Cloud9 to execute the subsequent commands. Follow the instructio
63
63
64
64
**NOTE:** In this tutorial we will set all major configuration through environment variables, but you also can modify parameters in `config/config.ts`.
65
65
66
-
### Deploy Sync Node
66
+
### Prepare to deploy nodes
67
67
68
68
1. Make sure you are in the root directory of the cloned repository
69
69
@@ -75,6 +75,8 @@ We will use AWS Cloud9 to execute the subsequent commands. Follow the instructio
75
75
76
76
**NOTE:** You may see the following error if the default VPC already exists: `An error occurred (DefaultVpcAlreadyExists) when calling the CreateDefaultVpc operation: A Default VPC already exists for this account in this region.`. That means you can just continue with the following steps.
77
77
78
+
**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`
79
+
78
80
3. Configure your setup
79
81
80
82
Create your own copy of `.env` file and edit it:
@@ -96,7 +98,42 @@ Create your own copy of `.env` file and edit it:
96
98
npx cdk deploy eth-common
97
99
```
98
100
99
-
5. Deploy Sync Node
101
+
### Option 1: Single RPC Node
102
+
103
+
1. Deploy Single RPC Node
104
+
105
+
```bash
106
+
pwd
107
+
# Make sure you are in aws-blockchain-node-runners/lib/ethereum
**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`
111
+
112
+
2. After starting the node you need to wait for the inital syncronization process to finish. It may take from half a day to about 6-10 days depending on the client combination and the state of the network. You can use Amazon CloudWatch to track the progress. There is a script that publishes CloudWatch metrics every 5 minutes, where you can watch `sync distance` for consensus client and `blocks behind` for execution client. When the node is fully synced those two metrics shold show 0. To see them:
113
+
114
+
- Navigate to [CloudWatch service](https://console.aws.amazon.com/cloudwatch/) (make sure you are in the region you have specified for `AWS_REGION`)
115
+
- Open `Dashboards` and select `eth-sync-node-<your-eth-client-combination>` from the list of dashboards.
116
+
117
+
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. Tun the following query against the private IP of the single RPC node you deployed:
### Option 2: Deploy the Highly Available RPC Nodes
135
+
136
+
1. Deploy Sync Node
100
137
101
138
```bash
102
139
pwd
@@ -105,7 +142,7 @@ Create your own copy of `.env` file and edit it:
105
142
```
106
143
**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`
107
144
108
-
6. After starting the node you need to wait for the inital syncronization process to finish. It may take from half a day to about 6-10 days depending on the client combination and the state of the network. You can use Amazon CloudWatch to track the progress. There is a script that publishes CloudWatch metrics every 5 minutes, where you can watch `sync distance` for consensus client and `blocks behind` for execution client. When the node is fully synced those two metrics shold show 0. To see them:
145
+
2. After starting the node you need to wait for the inital syncronization process to finish. It may take from half a day to about 6-10 days depending on the client combination and the state of the network. You can use Amazon CloudWatch to track the progress. There is a script that publishes CloudWatch metrics every 5 minutes, where you can watch `sync distance` for consensus client and `blocks behind` for execution client. When the node is fully synced those two metrics shold show 0. To see them:
109
146
110
147
- Navigate to [CloudWatch service](https://console.aws.amazon.com/cloudwatch/) (make sure you are in the region you have specified for `AWS_REGION`)
111
148
- Open `Dashboards` and select `eth-sync-node-<your-eth-client-combination>` from the list of dashboards.
@@ -114,17 +151,15 @@ Once synchronization process is over, the script will automatically stop both cl
114
151
115
152
Note: the snapshot backup process will automatically run ever day at midnight time of the time zone were the sync node runs. To change the schedule, modify `crontab` of the root user on the node's EC2 instance.
116
153
117
-
### Deploy the RPC Nodes
118
-
119
-
1. Configure and deploy 2 RPC Nodes
154
+
3. Configure and deploy 2 RPC Nodes
120
155
121
156
```bash
122
157
pwd
123
158
# Make sure you are in aws-blockchain-node-runners/lib/ethereum
2. Give the new RPC nodes about 30 minutes (up to 2 hours for Erigon) to initialize and then run the following query against the load balancer behind the RPC node created
162
+
4. Give the new RPC nodes about 30 minutes (up to 2 hours for Erigon) to initialize and then run the following query against the load balancer behind the RPC node created
@@ -151,7 +186,7 @@ The result should be like this (the actual balance might change):
151
186
</body>
152
187
```
153
188
154
-
**NOTE:** By default and for security reasons the load balancer is available only from wihtin the default VPC in the region where it is deployed. It is not available from the Internet and is not open for external connections. Before opening it up please make sure you protect your RPC APIs.
189
+
**NOTE:** By default and for security reasons the load balancer is available only from within the default VPC in the region where it is deployed. It is not available from the Internet and is not open for external connections. Before opening it up please make sure you protect your RPC APIs.
155
190
156
191
### Clearing up and undeploying everything
157
192
@@ -165,6 +200,9 @@ The result should be like this (the actual balance might change):
165
200
pwd
166
201
# Make sure you are in aws-blockchain-node-runners/lib/ethereum
0 commit comments