Skip to content

Commit e4ebee0

Browse files
author
Nikolay
committed
Starknet. Final bug fixes before website test
1 parent 8da298b commit e4ebee0

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

lib/starknet/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ We will use AWS Cloud9 to execute the subsequent commands. Follow the instructio
8787
> cdk bootstrap aws://ACCOUNT-NUMBER/REGION
8888
> ```
8989
90-
5. [OPTIONAL] If you are not planning to set your own `STARKNET_L1_ENDPOINT` URL, deploy Amazon Managed Blockchain (AMB) Access Ethereum node and wait about 35-70 minutes for the node to sync
90+
5. [OPTIONAL] You can use Amazon Managed Blockchain (AMB) Access Ethereum node as L1 node. To do that, leave `STARKNET_L1_ENDPOINT` URL empty and, deploy Amazon Managed Blockchain (AMB) Access Ethereum node. Wait about 35-70 minutes for the node to sync.
9191
9292
```bash
9393
pwd
@@ -103,7 +103,7 @@ We will use AWS Cloud9 to execute the subsequent commands. Follow the instructio
103103
# Make sure you are in aws-blockchain-node-runners/lib/starknet
104104
npx cdk deploy starknet-single-node --json --outputs-file single-node-deploy.json
105105
```
106-
After starting the node you will need to wait for the initial synchronization process to finish. To see the progress, you may use SSM to connect into EC2 first and watch the log like this:
106+
After starting the node you will need to wait for the initial synchronization process to finish. When using snapshot, the node should become available within a couple of hours, but migh take about 3-4 days to sync it from block 0. To check the progress, you may use SSM to connect into EC2 first and watch the log like this:
107107
108108
```bash
109109
export INSTANCE_ID=$(cat single-node-deploy.json | jq -r '..|.nodeinstanceid? | select(. != null)')
@@ -112,6 +112,7 @@ We will use AWS Cloud9 to execute the subsequent commands. Follow the instructio
112112
aws ssm start-session --target $INSTANCE_ID --region $AWS_REGION
113113
tail -f /var/log/starknet/error.log
114114
```
115+
115116
116117
7. Test Starknet RPC API
117118
Use curl to query from within the node instance:
@@ -135,7 +136,7 @@ We will use AWS Cloud9 to execute the subsequent commands. Follow the instructio
135136
A script on the Starknet node publishes current block and blocks behind metrics to CloudWatch metrics every 5 minutes. When the node is fully synced the blocks behind metric should get to 0.To see the metrics:
136137
137138
- Navigate to CloudWatch service (make sure you are in the region you have specified for AWS_REGION)
138-
- Open Dashboards and select `starknet-single-node` from the list of dashboards.
139+
- Open Dashboards and select `starknet-single-node-<network_id>` from the list of dashboards.
139140
140141
## Clear up and undeploy everything
141142
@@ -172,10 +173,10 @@ A script on the Starknet node publishes current block and blocks behind metrics
172173
# Make sure you are in aws-blockchain-node-runners/lib/starknet
173174
174175
export INSTANCE_ID=$(cat single-node-deploy.json | jq -r '..|.nodeinstanceid? | select(. != null)')
175-
echo "INSTANCE_ID=" $INSTANCE_ID
176+
echo "INSTANCE_ID="$INSTANCE_ID
176177
export AWS_REGION=us-east-1
177178
aws ssm start-session --target $INSTANCE_ID --region $AWS_REGION
178-
sudo journalctl -o cat -fu starknet
179+
tail -f /var/log/starknet/error.log
179180
```
180181
2. How to check the logs from the EC2 user-data script?
181182
@@ -203,4 +204,4 @@ A script on the Starknet node publishes current block and blocks behind metrics
203204
4. Where to find the key juno directories?
204205
205206
- The directory with binaries is `/home/ubuntu/juno-source`.
206-
- The data directory of juno agent is `/home/ubuntu/juno-source/juno-datadir`
207+
- The data directory of juno agent is `/data`

lib/starknet/lib/assets/setup-instance-store-volumes.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ if [ -n "$DATA_VOLUME_ID" ]; then
1313

1414
mkfs.ext4 $DATA_VOLUME_ID
1515
echo "Data volume formatted. Mounting..."
16-
sleep 10
16+
echo "waiting for volume to get UUID"
17+
OUTPUT=0;
18+
while [ "$OUTPUT" = 0 ]; do
19+
DATA_VOLUME_UUID=$(lsblk -fn -o UUID $DATA_VOLUME_ID)
20+
OUTPUT=$(echo $DATA_VOLUME_UUID | grep -c - $2)
21+
echo $OUTPUT
22+
done
1723
DATA_VOLUME_UUID=$(lsblk -fn -o UUID $DATA_VOLUME_ID)
1824
DATA_VOLUME_FSTAB_CONF="UUID=$DATA_VOLUME_UUID /data ext4 defaults 0 2"
1925
echo "DATA_VOLUME_ID="$DATA_VOLUME_ID

lib/starknet/sample-configs/.env-sample-full

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@ AWS_REGION="us-east-1" # Regions supported by Amazon Ma
99
## Common configuration parameters #
1010
AMB_ETHEREUM_NODE_NETWORK_ID="mainnet" # All options: "mainnet", "goerli"
1111
AMB_ETHEREUM_NODE_INSTANCE_TYPE="bc.m5.xlarge" # For available options see: https://aws.amazon.com/managed-blockchain/instance-types/
12-
STARKNET_L1_ENDPOINT="wss://ethereum-rpc.publicnode.com" # Websocket endpoint. Leave empty if using AMB_ETHEREUM_NODE.
12+
STARKNET_L1_ENDPOINT="none" # Websocket L1 endpoint, for example "wss://ethereum-rpc.publicnode.com" . Set to "none" or leave empty if using AMB_ETHEREUM_NODE.
1313
STARKNET_NETWORK_ID="mainnet" # All options: "mainnet", "sepolia", "sepolia-integration"
1414
STARKNET_NODE_VERSION="v0.11.7" # Current Juno node version
1515

1616
STARKNET_SNAPSHOT_URL="none" # Download snapshot to speed up statup time. Copy the larest URL from the docuemntation: https://juno.nethermind.io/next/snapshots/#mainnet
17-
# STARKNET_SNAPSHOT_URL="https://juno-snapshots.nethermind.dev/mainnet/juno_mainnet_v0.11.7_640855.tar"
1817

1918
STARKNET_INSTANCE_TYPE="m6a.2xlarge" # Recommended for Instance Store: i3.2xlarge, x86_64
2019
STARKNET_CPU_TYPE="x86_64" # All options: "x86_64", "ARM_64". IMPORTANT: Make sure the CPU type matches the instance type used

0 commit comments

Comments
 (0)