Skip to content

Commit 9ed7de6

Browse files
committed
Base. Updates after running code scanning tools
1 parent 01f9490 commit 9ed7de6

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

.pre-commit-config.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ repos:
1111
- id: detect-aws-credentials
1212
args: ['--allow-missing-credentials']
1313
- id: forbid-submodules
14+
- repo: https://github.com/iamthefij/docker-pre-commit
15+
rev: master
16+
hooks:
17+
- id: docker-compose-check

lib/base/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
1. A Base node deployed in the [Default VPC](https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html) continuously synchronizes with the rest of nodes on Base blockchain network through [Internet Gateway](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html).
1616
2. The Base node is used by dApps or development tools internally from within the Default VPC. JSON RPC API is not exposed to the Internet directly to protect nodes from unauthorized access.
17-
3. Your Base node needs access to a fully-synced [Ethereum Mainnet or Sepolia RPC endpoint](https://docs.base.org/tools/node-providers) .
17+
3. Your Base node needs access to a fully-synced [Ethereum Mainnet or Sepolia RPC endpoint](https://docs.base.org/tools/node-providers) .
1818
4. The Base node sends various monitoring metrics for both EC2 and Base nodes to Amazon CloudWatch.
1919

2020
## Additional materials

lib/base/lib/assets/restore-from-snapshot.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ chown -R bcuser:bcuser /data && \
1818
echo "Sync finished at " $(date) && \
1919
echo "$(($SECONDS / 60)) minutes and $(($SECONDS % 60)) seconds elapsed." && \
2020
sudo su bcuser && \
21-
/usr/local/bin/docker-compose -f /home/bcuser/node/docker-compose.yml up -d
21+
/usr/local/bin/docker-compose -f /home/bcuser/node/docker-compose.yml up -d

lib/base/lib/assets/sync-checker/syncchecker-base.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ OPTIMISM_SYNC_STATUS=$(curl -s -X POST -H "Content-Type: application/json" --dat
77
L1_CLIENT_HEAD=$(echo $OPTIMISM_SYNC_STATUS | jq -r ".head_l1.number")
88
L1_CLIENT_CURRENT=$(echo $OPTIMISM_SYNC_STATUS | jq -r ".current_l1.number")
99

10-
if [ $L1_CLIENT_HEAD -eq 0 ]; then
10+
if [ $L1_CLIENT_HEAD -eq 0 ]; then
1111
L1_CLIENT_BLOCKS_BEHIND=0
1212
else
1313
L1_CLIENT_BLOCKS_BEHIND="$((L1_CLIENT_HEAD-L1_CLIENT_CURRENT))"
@@ -18,7 +18,7 @@ L2_CLIENT_CURRENT=$(echo $OPTIMISM_SYNC_STATUS | jq -r ".unsafe_l2.number")
1818
L2_CLIENT_CURRENT_BLOCK_TIMESTAMP=$(echo $OPTIMISM_SYNC_STATUS | jq -r ".unsafe_l2.timestamp")
1919
L2_CLIENT_CURRENT_BLOCK_MINUTES_BEHIND="$((($(date +%s) - L2_CLIENT_CURRENT_BLOCK_TIMESTAMP)/60))"
2020

21-
if [ "$L2_CLIENT_CURRENT" == "null" ]; then
21+
if [ "$L2_CLIENT_CURRENT" == "null" ]; then
2222
L2_CLIENT_CURRENT=0
2323
fi
2424

@@ -41,4 +41,3 @@ aws cloudwatch put-metric-data --metric-name l1_blocks_behind --namespace CWAgen
4141

4242
aws cloudwatch put-metric-data --metric-name l2_current_block --namespace CWAgent --value $L2_CLIENT_CURRENT --timestamp $TIMESTAMP --dimensions InstanceId=$INSTANCE_ID --region $REGION
4343
aws cloudwatch put-metric-data --metric-name l2_minutes_behind --namespace CWAgent --value $L2_CLIENT_CURRENT_BLOCK_MINUTES_BEHIND --timestamp $TIMESTAMP --dimensions InstanceId=$INSTANCE_ID --region $REGION
44-

lib/base/sample-configs/.env-sample-rpc

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Set the AWS account is and region for your environment ##
66
AWS_ACCOUNT_ID="xxxxxxxx"
7-
AWS_REGION="us-east-1"
7+
AWS_REGION="us-east-1"
88

99
## Common configuration parameters ##
1010
BASE_NETWORK_ID="sepolia" # All options: "mainnet", "sepolia"
@@ -25,4 +25,4 @@ BASE_L1_CONSENSUS_ENDPOINT="https://ethereum-sepolia-beacon-api.publicnode.com"
2525
#BASE_L1_CONSENSUS_ENDPOINT=https://ethereum-sepolia-beacon-api.publicnode.com
2626
# Example for Mainnet and with Ethereum Blueprint with Geth-Lighthouse client combination and private IP:
2727
#BASE_L1_EXECUTION_ENDPOINT=http://172.31.15.220:8545
28-
#BASE_L1_CONSENSUS_ENDPOINT=http://172.31.15.220:5052
28+
#BASE_L1_CONSENSUS_ENDPOINT=http://172.31.15.220:5052

0 commit comments

Comments
 (0)