forked from cerc-io/stack-orchestrator
Compare commits
20
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4c4cc1ed0 | ||
|
|
2e5eee0223 | ||
|
|
c0455e3e0b | ||
|
|
cecc7a1274 | ||
|
|
97592b0fca | ||
|
|
da3636bc17 | ||
|
|
22077dedc8 | ||
|
|
ce43e3061c | ||
|
|
24ab259741 | ||
|
|
607575e4f4 | ||
|
|
86e245e272 | ||
|
|
d677e5f369 | ||
|
|
9991baa8d6 | ||
|
|
d033d4ff93 | ||
|
|
f02bbee3bf | ||
|
|
bdde1b2c9e | ||
|
|
96a83422e7 | ||
|
|
af03208da7 | ||
|
|
86e2407800 | ||
|
|
c01ff28b4f |
@@ -0,0 +1,67 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
datanet-eth-bootnode-geth:
|
||||
hostname: datanet-eth-bootnode-geth
|
||||
env_file:
|
||||
- ../config/datanet-eth/datanet-eth.env
|
||||
environment:
|
||||
RUN_BOOTNODE: "true"
|
||||
image: cerc/datanet-eth-geth:local
|
||||
ports:
|
||||
- "9898"
|
||||
- "30303"
|
||||
|
||||
datanet-eth-geth-1:
|
||||
hostname: datanet-eth-geth-1
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
environment:
|
||||
CERC_REMOTE_DEBUG: "false"
|
||||
CERC_RUN_STATEDIFF: "false"
|
||||
CERC_STATEDIFF_DB_NODE_ID: 1
|
||||
env_file:
|
||||
- ../config/datanet-eth/datanet-eth.env
|
||||
image: cerc/datanet-eth-geth:local
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "8545"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
depends_on:
|
||||
- datanet-eth-bootnode-geth
|
||||
ports:
|
||||
- "8545"
|
||||
- "40000"
|
||||
- "6060"
|
||||
|
||||
datanet-eth-geth-2:
|
||||
hostname: datanet-eth-geth-2
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-v", "localhost", "8545"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 3s
|
||||
env_file:
|
||||
- ../config/datanet-eth/datanet-eth.env
|
||||
image: cerc/datanet-eth-geth:local
|
||||
depends_on:
|
||||
- datanet-eth-bootnode-geth
|
||||
|
||||
datanet-tx-spammer:
|
||||
restart: always
|
||||
image: cerc/tx-spammer:local
|
||||
environment:
|
||||
ACCOUNTS_CSV_URL: http://datanet-eth-bootnode-geth:9898/accounts.csv
|
||||
ETH_HTTP_PATH: http://datanet-eth-geth-1:8545
|
||||
LOG_LEVEL: info
|
||||
SPAMMER_COMMAND: autoSend
|
||||
ETH_CALL_FREQ: 0
|
||||
ETH_SEND_FREQ: 0
|
||||
depends_on:
|
||||
datanet-eth-bootnode-geth:
|
||||
condition: service_started
|
||||
datanet-eth-geth-1:
|
||||
condition: service_healthy
|
||||
@@ -20,6 +20,7 @@ services:
|
||||
CERC_REMOTE_DEBUG: "true"
|
||||
CERC_RUN_STATEDIFF: "detect"
|
||||
CERC_STATEDIFF_DB_NODE_ID: 1
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
env_file:
|
||||
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||
image: cerc/fixturenet-eth-geth:local
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# The password used to access test accounts (eg, via personal_unlockAccount). The password is the same for all accounts.
|
||||
ACCOUNT_PASSWORD=secret1212
|
||||
|
||||
# ENODE of the geth bootnode.
|
||||
BOOTNODE_KEY="b0ac22adcad37213c7c565810a50f1772291e7b0ce53fb73e7ec2a3c75bc13b5"
|
||||
ENODE="enode://af22c29c316ad069cf48a09a4ad5cf04a251b411e45098888d114c6dd7f489a13786620d5953738762afa13711d4ffb3b19aa5de772d8af72f851f7e9c5b164a@datanet-eth-bootnode-geth:30303"
|
||||
|
||||
# JWT is required by the startup script, but won't be used without lighthouse.
|
||||
JWT="0x6cdcac3501046a08e186730dd8bd136cfaf0fdc1fc955f6e15ad3068c0ff2af0"
|
||||
+366
-41
@@ -326,8 +326,9 @@
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_call_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"legendFormat": "eth_call",
|
||||
"expr": "rate(rpc_duration_eth_blockNumber_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_blockNumber",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
},
|
||||
@@ -337,48 +338,12 @@
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getBlockByHash_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"expr": "rate(rpc_duration_eth_call_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getBlocksByHash",
|
||||
"legendFormat": "eth_call",
|
||||
"range": true,
|
||||
"refId": "B"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getBlockByNumber_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getBlocksByNumber",
|
||||
"range": true,
|
||||
"refId": "C"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getStorageAt_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "getStorageAt",
|
||||
"range": true,
|
||||
"refId": "D"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_statediff_writeStateDiffAt_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "statediff_writeStateDiffAt",
|
||||
"range": true,
|
||||
"refId": "E"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
@@ -389,8 +354,356 @@
|
||||
"hide": false,
|
||||
"legendFormat": "eth_chainId",
|
||||
"range": true,
|
||||
"refId": "C"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_estimateGas_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_estimateGas",
|
||||
"range": true,
|
||||
"refId": "D"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_gasPrice_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_gasPrice",
|
||||
"range": true,
|
||||
"refId": "E"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getBalance_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getBalance",
|
||||
"range": true,
|
||||
"refId": "F"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getBlockByHash_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getBlockByHash",
|
||||
"range": true,
|
||||
"refId": "G"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getBlockByNumber_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getBlockByNumber",
|
||||
"range": true,
|
||||
"refId": "H"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getBlockReceipts_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getBlockReceipts",
|
||||
"range": true,
|
||||
"refId": "I"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getBlockTransactionCountByHash_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getBlockTransactionCountByHash",
|
||||
"range": true,
|
||||
"refId": "J"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getBlockTransactionCountByNumber_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getBlockTransactionCountByNumber",
|
||||
"range": true,
|
||||
"refId": "K"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getCode_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getCode",
|
||||
"range": true,
|
||||
"refId": "L"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getFilterChanges_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getFilterChanges",
|
||||
"range": true,
|
||||
"refId": "M"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getFilterLogs_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getFilterLogs",
|
||||
"range": true,
|
||||
"refId": "N"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getLogs_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getLogs",
|
||||
"range": true,
|
||||
"refId": "O"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getStorageAt_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getStorageAt",
|
||||
"range": true,
|
||||
"refId": "P"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getTransactionByBlockHashAndIndex_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getTransactionByBlockHashAndIndex",
|
||||
"range": true,
|
||||
"refId": "Q"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getTransactionByBlockNumberAndIndex_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getTransactionByBlockNumberAndIndex",
|
||||
"range": true,
|
||||
"refId": "R"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getTransactionByHash_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getTransactionByHash",
|
||||
"range": true,
|
||||
"refId": "S"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getTransactionCount_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getTransactionCount",
|
||||
"range": true,
|
||||
"refId": "T"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getTransactionReceipt_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getTransactionReceipt",
|
||||
"range": true,
|
||||
"refId": "U"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getUncleCountByBlockHash_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getUncleCountByBlockHash",
|
||||
"range": true,
|
||||
"refId": "V"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getUncleCountByBlockNumber_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getUncleCountByBlockNumber",
|
||||
"range": true,
|
||||
"refId": "W"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_mining_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_mining_success",
|
||||
"range": true,
|
||||
"refId": "X"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_newBlockFilter_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_newBlockFilter",
|
||||
"range": true,
|
||||
"refId": "Y"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_newFilter_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_newFilter",
|
||||
"range": true,
|
||||
"refId": "Z"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_newPendingTransactionFilter_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_newPendingTransactionFilter",
|
||||
"range": true,
|
||||
"refId": "AA"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_sendRawTransaction_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_sendRawTransaction",
|
||||
"range": true,
|
||||
"refId": "AB"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_signTransaction_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_signTransaction",
|
||||
"range": true,
|
||||
"refId": "AC"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_subscribe_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_subscribe",
|
||||
"range": true,
|
||||
"refId": "AD"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_syncing_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_syncing",
|
||||
"range": true,
|
||||
"refId": "AE"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_unsubscribe_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_unsubscribe",
|
||||
"range": true,
|
||||
"refId": "AF"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
@@ -401,7 +714,19 @@
|
||||
"hide": false,
|
||||
"legendFormat": "statediff_writeStateDiffFor",
|
||||
"range": true,
|
||||
"refId": "G"
|
||||
"refId": "AG"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_statediff_writeStateDiffAt_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "statediff_writeStateDiffAt",
|
||||
"range": true,
|
||||
"refId": "AH"
|
||||
}
|
||||
],
|
||||
"title": "geth API Requests/sec",
|
||||
|
||||
@@ -19,3 +19,5 @@ CERC_STATEDIFF_DB_USER="vdbm"
|
||||
CERC_STATEDIFF_DB_PASSWORD="password"
|
||||
CERC_STATEDIFF_DB_GOOSE_MIN_VER=23
|
||||
CERC_STATEDIFF_DB_LOG_STATEMENTS="false"
|
||||
|
||||
CERC_GETH_VMODULE="statediff/*=5,rpc/*=5"
|
||||
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
#Build cerc/datanet-eth-geth
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
# Make sure the "build" directory is empty.
|
||||
rm -rf $SCRIPT_DIR/build
|
||||
|
||||
# Copy the fixture-net scripts and config.
|
||||
cp -rp $SCRIPT_DIR/../cerc-fixturenet-eth-geth $SCRIPT_DIR/build
|
||||
|
||||
# Then remove terminal_total_difficulty and replace it with capped_maximum_difficulty.
|
||||
# This has two effects:
|
||||
# (1) Disables the Merge (so all we need is geth, not lighthouse).
|
||||
# (2) Maintains a fast block rate, since the difficulty will never exceed the capped value.
|
||||
sed -i '' 's/^terminal_total_difficulty:.*$/capped_maximum_difficulty: 1/' $SCRIPT_DIR/build/genesis/el/el-config.yaml
|
||||
|
||||
# Build the image.
|
||||
docker build -t cerc/datanet-eth-geth:local ${SCRIPT_DIR}/build
|
||||
|
||||
# Clean up the "build" directory.
|
||||
rm -rf $SCRIPT_DIR/build
|
||||
@@ -21,9 +21,11 @@ istanbul_block=`cat $tmp_dir/genesis-config.yaml | grep istanbul_block | awk '{
|
||||
berlin_block=`cat $tmp_dir/genesis-config.yaml | grep berlin_block | awk '{ print $2 }'`
|
||||
london_block=`cat $tmp_dir/genesis-config.yaml | grep london_block | awk '{ print $2 }'`
|
||||
merge_fork_block=`cat $tmp_dir/genesis-config.yaml | grep merge_fork_block | awk '{ print $2 }'`
|
||||
capped_maximum_difficulty=`cat $tmp_dir/genesis-config.yaml | grep capped_maximum_difficulty | awk '{ print $2 }'`
|
||||
|
||||
python3 ../accounts/mnemonic_to_csv.py $tmp_dir/genesis-config.yaml > ../build/el/accounts.csv
|
||||
|
||||
python3 /apps/el-gen/genesis_geth.py $tmp_dir/genesis-config.yaml | \
|
||||
jq ".config.terminalTotalDifficulty=$ttd" | \
|
||||
jq ".config.homesteadBlock=$homestead_block" | \
|
||||
jq ".config.eip150Block=$eip150_block" | \
|
||||
jq ".config.eip155Block=$eip155_block" | \
|
||||
@@ -35,4 +37,19 @@ python3 /apps/el-gen/genesis_geth.py $tmp_dir/genesis-config.yaml | \
|
||||
jq ".config.berlinBlock=$berlin_block" | \
|
||||
jq ".config.londonBlock=$london_block" | \
|
||||
jq ".config.mergeForkBlock=$merge_fork_block" > ../build/el/geth.json
|
||||
python3 ../accounts/mnemonic_to_csv.py $tmp_dir/genesis-config.yaml > ../build/el/accounts.csv
|
||||
|
||||
if [ -n "$ttd" ]; then
|
||||
cat ../build/el/geth.json | jq ".config.terminalTotalDifficulty=$ttd" > ../build/el/geth.json.jq
|
||||
mv ../build/el/geth.json.jq ../build/el/geth.json
|
||||
else
|
||||
cat ../build/el/geth.json | jq "del(.config.terminalTotalDifficulty)" > ../build/el/geth.json.jq
|
||||
mv ../build/el/geth.json.jq ../build/el/geth.json
|
||||
fi
|
||||
|
||||
if [ -n "$capped_maximum_difficulty" ]; then
|
||||
cat ../build/el/geth.json | jq ".config.cappedMaximumDifficulty=$capped_maximum_difficulty" > ../build/el/geth.json.jq
|
||||
mv ../build/el/geth.json.jq ../build/el/geth.json
|
||||
else
|
||||
cat ../build/el/geth.json | jq "del(.config.cappedMaximumDifficulty)" > ../build/el/geth.json.jq
|
||||
mv ../build/el/geth.json.jq ../build/el/geth.json
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
ETHERBASE=`cat /opt/testnet/build/el/accounts.csv | head -1 | cut -d',' -f2`
|
||||
NETWORK_ID=`cat /opt/testnet/el/el-config.yaml | grep 'chain_id' | awk '{ print $2 }'`
|
||||
NETRESTRICT=`ip addr | grep inet | grep -v '127.0' | awk '{print $2}'`
|
||||
@@ -28,7 +32,9 @@ else
|
||||
echo -n "$JWT" > /opt/testnet/build/el/jwtsecret
|
||||
|
||||
if [ "$CERC_RUN_STATEDIFF" == "detect" ] && [ -n "$CERC_STATEDIFF_DB_HOST" ]; then
|
||||
if [ -n "$(dig $CERC_STATEDIFF_DB_HOST +short)" ]; then
|
||||
dig_result=$(dig $CERC_STATEDIFF_DB_HOST +short)
|
||||
dig_status_code=$?
|
||||
if [[ $dig_status_code = 0 && -n $dig_result ]]; then
|
||||
echo "Statediff DB at $CERC_STATEDIFF_DB_HOST"
|
||||
CERC_RUN_STATEDIFF="true"
|
||||
else
|
||||
|
||||
@@ -27,4 +27,8 @@ RUN cd /opt/testnet && make genesis-cl
|
||||
# Work around some bugs in lcli where the default path is always used.
|
||||
RUN mkdir -p /root/.lighthouse && cd /root/.lighthouse && ln -s /opt/testnet/build/cl/testnet
|
||||
|
||||
RUN mkdir -p /scripts
|
||||
COPY scripts/status-internal.sh /scripts
|
||||
COPY scripts/status.sh /scripts
|
||||
|
||||
ENTRYPOINT ["/opt/testnet/run.sh"]
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# Wrapper to facilitate using status.sh inside the container
|
||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
export LIGHTHOUSE_BASE_URL="http://fixturenet-eth-lighthouse-1:8001"
|
||||
export GETH_BASE_URL="http://fixturenet-eth-geth-1:8545"
|
||||
# See: https://stackoverflow.com/a/246128/1701505
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
$SCRIPT_DIR/status.sh
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
#!/usr/bin/env bash
|
||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
STATUSES=("geth to generate DAG" "beacon phase0" "beacon altair" "beacon bellatrix pre-merge" "beacon bellatrix merge")
|
||||
STATUS=0
|
||||
|
||||
@@ -7,6 +9,8 @@ STATUS=0
|
||||
LIGHTHOUSE_BASE_URL=${LIGHTHOUSE_BASE_URL}
|
||||
GETH_BASE_URL=${GETH_BASE_URL}
|
||||
|
||||
# TODO: Docker commands below should be replaced by some interface into stack orchestrator
|
||||
# or some execution environment-neutral mechanism.
|
||||
if [ -z "$LIGHTHOUSE_BASE_URL" ]; then
|
||||
LIGHTHOUSE_CONTAINER=`docker ps -q -f "name=fixturenet-eth-lighthouse-1-1"`
|
||||
LIGHTHOUSE_PORT=`docker port $LIGHTHOUSE_CONTAINER 8001 | cut -d':' -f2`
|
||||
|
||||
@@ -11,6 +11,7 @@ cerc/ipld-eth-beacon-indexer
|
||||
cerc/ipld-eth-server
|
||||
cerc/laconicd
|
||||
cerc/laconic-registry-cli
|
||||
cerc/datanet-eth-geth
|
||||
cerc/fixturenet-eth-geth
|
||||
cerc/fixturenet-eth-lighthouse
|
||||
cerc/watcher-mobymask
|
||||
|
||||
@@ -8,6 +8,7 @@ ipld-eth-server
|
||||
lighthouse
|
||||
laconicd
|
||||
fixturenet-laconicd
|
||||
datanet-eth
|
||||
fixturenet-eth
|
||||
fixturenet-eth-metrics
|
||||
watcher-mobymask
|
||||
|
||||
@@ -4,12 +4,12 @@ Instructions for deploying a local a geth + lighthouse blockchain "fixturenet" f
|
||||
|
||||
## Clone required repositories
|
||||
```
|
||||
$ laconic-so setup-repositories --include cerc-io/go-ethereum
|
||||
$ laconic-so --stack fixturenet-eth setup-repositories
|
||||
```
|
||||
|
||||
## Build the fixturenet-eth containers
|
||||
```
|
||||
$ laconic-so build-containers --include cerc/go-ethereum,cerc/lighthouse,cerc/fixturenet-eth-geth,cerc/fixturenet-eth-lighthouse
|
||||
$ laconic-so --stack fixturenet-eth build-containers
|
||||
```
|
||||
This should create several container images in the local image registry:
|
||||
|
||||
@@ -20,7 +20,7 @@ This should create several container images in the local image registry:
|
||||
|
||||
## Deploy the stack
|
||||
```
|
||||
$ laconic-so deploy-system --include fixturenet-eth up
|
||||
$ laconic-so --stack fixturenet-eth deploy-system up
|
||||
```
|
||||
|
||||
## Check status
|
||||
|
||||
@@ -3,10 +3,11 @@ name: fixturenet-eth
|
||||
decription: "Ethereum Fixturenet"
|
||||
repos:
|
||||
- cerc-io/go-ethereum
|
||||
- cerc-io/tx-spammer
|
||||
containers:
|
||||
- cerc/go-ethereum
|
||||
- cerc/lighthouse
|
||||
- cerc/fixturenet-eth-geth
|
||||
- cerc/fixturenet-eth-lighthouse
|
||||
pods:
|
||||
- fixturenet-eth
|
||||
- fixturenet-eth
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# This file should be re-generated running: scripts/update-version-file.sh script
|
||||
v1.0.14-a144dde
|
||||
v1.0.16-ecf943b
|
||||
|
||||
+16
-1
@@ -37,6 +37,7 @@ def command(ctx, include, exclude, cluster, command, extra_args):
|
||||
|
||||
# TODO: implement option exclusion and command value constraint lost with the move from argparse to click
|
||||
|
||||
debug = ctx.obj.debug
|
||||
quiet = ctx.obj.quiet
|
||||
verbose = ctx.obj.verbose
|
||||
dry_run = ctx.obj.dry_run
|
||||
@@ -91,6 +92,8 @@ def command(ctx, include, exclude, cluster, command, extra_args):
|
||||
|
||||
if not dry_run:
|
||||
if command == "up":
|
||||
if debug:
|
||||
os.environ["CERC_SCRIPT_DEBUG"] = "true"
|
||||
if verbose:
|
||||
print(f"Running compose up for extra_args: {extra_args_list}")
|
||||
docker.compose.up(detach=True, services=extra_args_list)
|
||||
@@ -98,6 +101,18 @@ def command(ctx, include, exclude, cluster, command, extra_args):
|
||||
if verbose:
|
||||
print("Running compose down")
|
||||
docker.compose.down()
|
||||
elif command == "exec":
|
||||
if extra_args_list is None or len(extra_args_list) < 2:
|
||||
print("Usage: exec <service> <cmd>")
|
||||
sys.exit(1)
|
||||
service_name = extra_args_list[0]
|
||||
command_to_exec = extra_args_list[1:]
|
||||
container_exec_env = {
|
||||
"CERC_SCRIPT_DEBUG": "true"
|
||||
} if debug else {}
|
||||
if verbose:
|
||||
print(f"Running compose exec {service_name} {command_to_exec}")
|
||||
docker.compose.execute(service_name, command_to_exec, envs=container_exec_env)
|
||||
elif command == "port":
|
||||
if extra_args_list is None or len(extra_args_list) < 2:
|
||||
print("Usage: port <service> <exposed-port>")
|
||||
@@ -105,7 +120,7 @@ def command(ctx, include, exclude, cluster, command, extra_args):
|
||||
service_name = extra_args_list[0]
|
||||
exposed_port = extra_args_list[1]
|
||||
if verbose:
|
||||
print("Running compose port")
|
||||
print(f"Running compose port {service_name} {exposed_port}")
|
||||
mapped_port_data = docker.compose.port(service_name, exposed_port)
|
||||
print(f"{mapped_port_data[0]}:{mapped_port_data[1]}")
|
||||
elif command == "ps":
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# Release Process
|
||||
|
||||
## Manually publish to github releases
|
||||
|
||||
In order to build, the shiv and wheel packages must be installed:
|
||||
```
|
||||
$ pip install shiv
|
||||
$ pip install wheel
|
||||
```
|
||||
|
||||
Then:
|
||||
|
||||
1. Define `CERC_GH_RELEASE_SCRIPTS_DIR`
|
||||
1. Define `CERC_PACKAGE_RELEASE_GITHUB_TOKEN`
|
||||
1. Run `./scripts/tag_new_release.sh <major> <minor> <patch>`
|
||||
1. Run `./scripts/build_shiv_package.sh`
|
||||
1. Run `./scripts/publish_shiv_package_github.sh <major> <minor> <patch>`
|
||||
1. Commit the new version file.
|
||||
|
||||
e.g.
|
||||
|
||||
```
|
||||
$ export CERC_GH_RELEASE_SCRIPTS_DIR=~/projects/cerc/github-release-api/
|
||||
$ export CERC_PACKAGE_RELEASE_GITHUB_TOKEN=github_pat_xxxxxx
|
||||
$ ./scripts/tag_new_release.sh 1 0 17
|
||||
$ ./scripts/build_shiv_package.sh
|
||||
$ ./scripts/publish_shiv_package_github.sh 1 0 17
|
||||
```
|
||||
|
||||
@@ -32,7 +32,7 @@ github_release_manager.sh \
|
||||
-l notused -t ${CERC_PACKAGE_RELEASE_GITHUB_TOKEN} \
|
||||
-o ${github_org} -r ${github_repository} \
|
||||
-d v${major}.${minor}.${patch} \
|
||||
-c create
|
||||
-c create -m "Release v${major}.${minor}.${patch}"
|
||||
github_release_manager.sh \
|
||||
-l notused -t ${CERC_PACKAGE_RELEASE_GITHUB_TOKEN} \
|
||||
-o ${github_org} -r ${github_repository} \
|
||||
|
||||
Reference in New Issue
Block a user