Compare commits

...
Author SHA1 Message Date
telackey d4c4cc1ed0 Add comments.
Former-commit-id: 46f00e1d485661b6328b8ca6911a81455a346f6a
2023-01-30 11:24:56 -06:00
telackey 2e5eee0223 Add comments.
Former-commit-id: a3a60b76959056ba9cc40f0de3a8bd9a2ee2e17e
2023-01-30 11:23:45 -06:00
telackey c0455e3e0b Simplify build.
Former-commit-id: 3a80606d6c20751fa12c911fc965380b49086710
2023-01-30 11:20:23 -06:00
telackey cecc7a1274 EOL
Former-commit-id: 5f09e42422e5c458919925de751be93e028d05ba
2023-01-30 11:09:05 -06:00
telackey 97592b0fca Remove unneeded env
Former-commit-id: a3880de4cde7b5fdd43cd953a7c4b198cc445573
2023-01-30 11:08:27 -06:00
telackey da3636bc17 Fix typo
Former-commit-id: 34413ea2607ead60df6905992b29808828d60448
2023-01-28 00:54:48 -06:00
telackey 22077dedc8 Remove generated files.
Former-commit-id: d0c506af881fee53f174f6d8380c1e2b36cdc3d6
2023-01-28 00:51:11 -06:00
telackey ce43e3061c Add a pod for generating geth data as quickly as possible.
Former-commit-id: e8bdb205c7faa89c583b0652fac1801d0177a3c1
2023-01-28 00:49:46 -06:00
dboreham 24ab259741 Merge pull request #167 from cerc-io/dboreham/release-doc
Add release process doc

Former-commit-id: 605a9aeda1
2023-01-27 22:25:53 -07:00
David Boreham 607575e4f4 Add release process doc
Former-commit-id: 1b3a14d86f
2023-01-27 21:22:43 -07:00
dboreham 86e245e272 Merge pull request #166 from cerc-io/dboreham/fix-fixturenet-status
Fix status script

Former-commit-id: fc31b44b5a
2023-01-27 08:10:32 -07:00
dboreham d677e5f369 Fix status script
Former-commit-id: 5a3bdd269d
2023-01-27 08:10:04 -07:00
dboreham 9991baa8d6 Update version
Former-commit-id: 04f61293b5
2023-01-27 07:30:14 -07:00
dboreham d033d4ff93 Merge pull request #164 from cerc-io/dboreham/fixturenet-eth-fixes
Fixes to fixturenet-eth

Former-commit-id: ecf943b593
2023-01-26 21:36:23 -07:00
dboreham f02bbee3bf Fixes to fixturenet-eth
Former-commit-id: e4229e4ceb
2023-01-26 16:47:06 -07:00
telackey bdde1b2c9e Include all eth API operation metrics. (#162)
Former-commit-id: ce0c7ee9ba
2023-01-26 13:53:02 -06:00
dboreham 96a83422e7 Merge pull request #161 from cerc-io/dboreham/run-command-in-container
Exec command inside container

Former-commit-id: 6770f7af6e
2023-01-25 23:22:57 -07:00
dboreham af03208da7 Exec command inside container
Former-commit-id: ade20fb2f5
2023-01-25 23:22:05 -07:00
dboreham 86e2407800 Update version
Former-commit-id: bf91048dbb
2023-01-25 22:47:08 -07:00
dboreham c01ff28b4f Add release description
Former-commit-id: a520cce17c
2023-01-25 22:46:37 -07:00
dboreham ec54258285 Merge pull request #159 from cerc-io/dboreham/enhanced-publish-script
Better publish scripts

Former-commit-id: e1421045eb
2023-01-25 22:40:24 -07:00
dboreham 1f2ee33b42 Update version
Former-commit-id: 0b08d7ba65
2023-01-25 22:38:25 -07:00
dboreham a2b700727c Better publish scripts
Former-commit-id: 7fdf9bc4db
2023-01-25 22:37:43 -07:00
20 changed files with 603 additions and 59 deletions
@@ -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"
@@ -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
View File
@@ -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"]
@@ -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`
+1
View File
@@ -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
+1
View File
@@ -8,6 +8,7 @@ ipld-eth-server
lighthouse
laconicd
fixturenet-laconicd
datanet-eth
fixturenet-eth
fixturenet-eth-metrics
watcher-mobymask
+3 -3
View File
@@ -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
+2 -1
View File
@@ -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 -1
View File
@@ -1,2 +1,2 @@
# This file should be re-generated running: scripts/update-version-file.sh script
v1.0.13-alpha-8b19e0f
v1.0.16-ecf943b
+16 -1
View File
@@ -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":
+29
View File
@@ -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
```
+17 -7
View File
@@ -12,19 +12,29 @@
# ./scripts/publish_shiv_package_github.sh
# In addition, a valid GitHub token must be defined in
# CERC_PACKAGE_RELEASE_GITHUB_TOKEN
if [[ -z "${CERC_PACKAGE_RELEASE_GITHUB_TOKEN}" ]]; then
echo "CERC_PACKAGE_RELEASE_GITHUB_TOKEN is not set" >&2
exit 1
fi
# TODO: check args and env vars
major=$1
minor=$2
patch=$3
export PATH=$CERC_GH_RELEASE_SCRIPTS_DIR:$PATH
git_tag_manager.sh -M ${major} -m ${minor} -p ${patch} -t "Release ${major}.${minor}.${patch}"
github_org="cerc-io"
github_repository="stack-orchestrator"
latest_package=$(ls -1t ./package/* | head -1)
uploaded_package="./package/laconic-so"
# Remove any old package
rm ${uploaded_package}
cp ${latest_package} ${uploaded_package}
github_release_manager.sh \
-l david@bozemanpass.com -t ${CERC_PACKAGE_RELEASE_GITHUB_TOKEN} \
-o cerc-io -r stack-orchestrator \
-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 david@bozemanpass.com -t ${CERC_PACKAGE_RELEASE_GITHUB_TOKEN} \
-o cerc-io -r stack-orchestrator \
-l notused -t ${CERC_PACKAGE_RELEASE_GITHUB_TOKEN} \
-o ${github_org} -r ${github_repository} \
-d v${major}.${minor}.${patch} \
-c upload ./package/laconic-so
-c upload ${uploaded_package}
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Usage: tag_new_release.sh <major> <minor> <patch>
# Uses this script package to tag a new release:
# User must define: CERC_GH_RELEASE_SCRIPTS_DIR
# pointing to the location of that cloned repository
# e.g.
# cd ~/projects
# git clone https://github.com/cerc-io/github-release-api
# cd ./stack-orchestrator
# export CERC_GH_RELEASE_SCRIPTS_DIR=~/projects/github-release-api
# ./scripts/publish_shiv_package_github.sh
# TODO: check args and env vars
major=$1
minor=$2
patch=$3
export PATH=$CERC_GH_RELEASE_SCRIPTS_DIR:$PATH
git_tag_manager.sh -M ${major} -m ${minor} -p ${patch} -t "Release ${major}.${minor}.${patch}"