Add version metric for the VC; Enable VC metrics in the local simulation
This commit is contained in:
parent
2e09011d49
commit
fbbab3bfef
23
Makefile
23
Makefile
|
@ -162,6 +162,7 @@ libbacktrace:
|
||||||
# - --base-port + [0, --nodes + --light-clients)
|
# - --base-port + [0, --nodes + --light-clients)
|
||||||
# - --base-rest-port + [0, --nodes)
|
# - --base-rest-port + [0, --nodes)
|
||||||
# - --base-metrics-port + [0, --nodes)
|
# - --base-metrics-port + [0, --nodes)
|
||||||
|
# - --base-vc-metrics-port + [0, --nodes]
|
||||||
# - --base-remote-signer-port + [0, --remote-signers)
|
# - --base-remote-signer-port + [0, --remote-signers)
|
||||||
#
|
#
|
||||||
# If --run-geth or --run-nimbus is specified (only these ports):
|
# If --run-geth or --run-nimbus is specified (only these ports):
|
||||||
|
@ -196,11 +197,12 @@ local-testnet-minimal:
|
||||||
--base-port $$(( 6001 + EXECUTOR_NUMBER * 500 )) \
|
--base-port $$(( 6001 + EXECUTOR_NUMBER * 500 )) \
|
||||||
--base-rest-port $$(( 6031 + EXECUTOR_NUMBER * 500 )) \
|
--base-rest-port $$(( 6031 + EXECUTOR_NUMBER * 500 )) \
|
||||||
--base-metrics-port $$(( 6061 + EXECUTOR_NUMBER * 500 )) \
|
--base-metrics-port $$(( 6061 + EXECUTOR_NUMBER * 500 )) \
|
||||||
--base-remote-signer-port $$(( 6101 + EXECUTOR_NUMBER * 500 )) \
|
--base-vc-metrics-port $$(( 6161 + EXECUTOR_NUMBER * 500 )) \
|
||||||
--base-el-net-port $$(( 6201 + EXECUTOR_NUMBER * 500 )) \
|
--base-remote-signer-port $$(( 6201 + EXECUTOR_NUMBER * 500 )) \
|
||||||
--base-el-http-port $$(( 6202 + EXECUTOR_NUMBER * 500 )) \
|
--base-el-net-port $$(( 6301 + EXECUTOR_NUMBER * 500 )) \
|
||||||
--base-el-ws-port $$(( 6203 + EXECUTOR_NUMBER * 500 )) \
|
--base-el-http-port $$(( 6302 + EXECUTOR_NUMBER * 500 )) \
|
||||||
--base-el-auth-rpc-port $$(( 6204 + EXECUTOR_NUMBER * 500 )) \
|
--base-el-ws-port $$(( 6303 + EXECUTOR_NUMBER * 500 )) \
|
||||||
|
--base-el-auth-rpc-port $$(( 6304 + EXECUTOR_NUMBER * 500 )) \
|
||||||
--el-port-offset 5 \
|
--el-port-offset 5 \
|
||||||
--timeout 648 \
|
--timeout 648 \
|
||||||
--kill-old-processes \
|
--kill-old-processes \
|
||||||
|
@ -219,11 +221,12 @@ local-testnet-mainnet:
|
||||||
--base-port $$(( 7001 + EXECUTOR_NUMBER * 500 )) \
|
--base-port $$(( 7001 + EXECUTOR_NUMBER * 500 )) \
|
||||||
--base-rest-port $$(( 7031 + EXECUTOR_NUMBER * 500 )) \
|
--base-rest-port $$(( 7031 + EXECUTOR_NUMBER * 500 )) \
|
||||||
--base-metrics-port $$(( 7061 + EXECUTOR_NUMBER * 500 )) \
|
--base-metrics-port $$(( 7061 + EXECUTOR_NUMBER * 500 )) \
|
||||||
--base-remote-signer-port $$(( 7101 + EXECUTOR_NUMBER * 500 )) \
|
--base-vc-metrics-port $$(( 7161 + EXECUTOR_NUMBER * 500 )) \
|
||||||
--base-el-net-port $$(( 7201 + EXECUTOR_NUMBER * 500 )) \
|
--base-remote-signer-port $$(( 7201 + EXECUTOR_NUMBER * 500 )) \
|
||||||
--base-el-http-port $$(( 7202 + EXECUTOR_NUMBER * 500 )) \
|
--base-el-net-port $$(( 7301 + EXECUTOR_NUMBER * 500 )) \
|
||||||
--base-el-ws-port $$(( 7203 + EXECUTOR_NUMBER * 500 )) \
|
--base-el-http-port $$(( 7302 + EXECUTOR_NUMBER * 500 )) \
|
||||||
--base-el-auth-rpc-port $$(( 7204 + EXECUTOR_NUMBER * 500 )) \
|
--base-el-ws-port $$(( 7303 + EXECUTOR_NUMBER * 500 )) \
|
||||||
|
--base-el-auth-rpc-port $$(( 7304 + EXECUTOR_NUMBER * 500 )) \
|
||||||
--el-port-offset 5 \
|
--el-port-offset 5 \
|
||||||
--timeout 2784 \
|
--timeout 2784 \
|
||||||
--kill-old-processes \
|
--kill-old-processes \
|
||||||
|
|
|
@ -113,12 +113,6 @@ declareGauge ticks_delay,
|
||||||
declareGauge next_action_wait,
|
declareGauge next_action_wait,
|
||||||
"Seconds until the next attestation will be sent"
|
"Seconds until the next attestation will be sent"
|
||||||
|
|
||||||
declareGauge versionGauge, "Nimbus version info (as metric labels)", ["version", "commit"], name = "version"
|
|
||||||
versionGauge.set(1, labelValues=[fullVersionStr, gitRevision])
|
|
||||||
|
|
||||||
declareGauge nimVersionGauge, "Nim version info", ["version", "nim_commit"], name = "nim_version"
|
|
||||||
nimVersionGauge.set(1, labelValues=[NimVersion, getNimGitHash()])
|
|
||||||
|
|
||||||
logScope: topics = "beacnde"
|
logScope: topics = "beacnde"
|
||||||
|
|
||||||
func getPandas(stdoutKind: StdoutLogKind): VanityLogs =
|
func getPandas(stdoutKind: StdoutLogKind): VanityLogs =
|
||||||
|
|
|
@ -17,7 +17,7 @@ import
|
||||||
std/[tables, strutils, terminal, typetraits],
|
std/[tables, strutils, terminal, typetraits],
|
||||||
|
|
||||||
# Nimble packages
|
# Nimble packages
|
||||||
chronos, confutils, presto, toml_serialization,
|
chronos, confutils, presto, toml_serialization, metrics,
|
||||||
chronicles, chronicles/helpers as chroniclesHelpers, chronicles/topics_registry,
|
chronicles, chronicles/helpers as chroniclesHelpers, chronicles/topics_registry,
|
||||||
stew/io2,
|
stew/io2,
|
||||||
presto,
|
presto,
|
||||||
|
@ -25,11 +25,17 @@ import
|
||||||
# Local modules
|
# Local modules
|
||||||
./spec/[helpers],
|
./spec/[helpers],
|
||||||
./spec/datatypes/base,
|
./spec/datatypes/base,
|
||||||
"."/[beacon_clock, beacon_node_status, conf]
|
"."/[beacon_clock, beacon_node_status, conf, version]
|
||||||
|
|
||||||
when defined(posix):
|
when defined(posix):
|
||||||
import termios
|
import termios
|
||||||
|
|
||||||
|
declareGauge versionGauge, "Nimbus version info (as metric labels)", ["version", "commit"], name = "version"
|
||||||
|
versionGauge.set(1, labelValues=[fullVersionStr, gitRevision])
|
||||||
|
|
||||||
|
declareGauge nimVersionGauge, "Nim version info", ["version", "nim_commit"], name = "nim_version"
|
||||||
|
nimVersionGauge.set(1, labelValues=[NimVersion, getNimGitHash()])
|
||||||
|
|
||||||
export
|
export
|
||||||
confutils, toml_serialization, beacon_clock, beacon_node_status, conf
|
confutils, toml_serialization, beacon_clock, beacon_node_status, conf
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||||
|
|
||||||
|
## This module implements the version tagging details of all binaries included
|
||||||
|
## in the Nimbus release process (i.e. beacon_node, validator_client, etc)
|
||||||
|
|
||||||
when (NimMajor, NimMinor) < (1, 4):
|
when (NimMajor, NimMinor) < (1, 4):
|
||||||
{.push raises: [Defect].}
|
{.push raises: [Defect].}
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -55,7 +55,7 @@ CURL_BINARY="$(command -v curl)" || { echo "Curl not installed. Aborting."; exit
|
||||||
JQ_BINARY="$(command -v jq)" || { echo "Jq not installed. Aborting."; exit 1; }
|
JQ_BINARY="$(command -v jq)" || { echo "Jq not installed. Aborting."; exit 1; }
|
||||||
|
|
||||||
OPTS="ht:n:d:g"
|
OPTS="ht:n:d:g"
|
||||||
LONGOPTS="help,preset:,nodes:,data-dir:,remote-validators-count:,threshold:,remote-signers:,with-ganache,stop-at-epoch:,disable-htop,disable-vc,enable-logtrace,log-level:,base-port:,base-rest-port:,base-metrics-port:,base-remote-signer-port:,base-el-net-port:,base-el-http-port:,base-el-ws-port:,base-el-auth-rpc-port:,el-port-offset:,reuse-existing-data-dir,reuse-binaries,timeout:,kill-old-processes,eth2-docker-image:,lighthouse-vc-nodes:,run-geth,dl-geth,dl-eth2,light-clients:,run-nimbus-el,verbose"
|
LONGOPTS="help,preset:,nodes:,data-dir:,remote-validators-count:,threshold:,remote-signers:,with-ganache,stop-at-epoch:,disable-htop,disable-vc,enable-logtrace,log-level:,base-port:,base-rest-port:,base-metrics-port:,base-vc-metrics-port:,base-remote-signer-port:,base-el-net-port:,base-el-http-port:,base-el-ws-port:,base-el-auth-rpc-port:,el-port-offset:,reuse-existing-data-dir,reuse-binaries,timeout:,kill-old-processes,eth2-docker-image:,lighthouse-vc-nodes:,run-geth,dl-geth,dl-eth2,light-clients:,run-nimbus-el,verbose"
|
||||||
|
|
||||||
# default values
|
# default values
|
||||||
BINARIES=""
|
BINARIES=""
|
||||||
|
@ -72,6 +72,7 @@ BASE_REMOTE_SIGNER_PORT="6000"
|
||||||
BASE_METRICS_PORT="8008"
|
BASE_METRICS_PORT="8008"
|
||||||
BASE_REST_PORT="7500"
|
BASE_REST_PORT="7500"
|
||||||
BASE_VC_KEYMANAGER_PORT="8500"
|
BASE_VC_KEYMANAGER_PORT="8500"
|
||||||
|
BASE_VC_METRICS_PORT="9008"
|
||||||
BASE_EL_NET_PORT="30303"
|
BASE_EL_NET_PORT="30303"
|
||||||
BASE_EL_HTTP_PORT="8545"
|
BASE_EL_HTTP_PORT="8545"
|
||||||
BASE_EL_WS_PORT="8546"
|
BASE_EL_WS_PORT="8546"
|
||||||
|
@ -124,7 +125,8 @@ CI run: $(basename "$0") --disable-htop -- --verify-finalization
|
||||||
--preset Const preset to be (default: mainnet)
|
--preset Const preset to be (default: mainnet)
|
||||||
--base-port bootstrap node's Eth2 traffic port (default: ${BASE_PORT})
|
--base-port bootstrap node's Eth2 traffic port (default: ${BASE_PORT})
|
||||||
--base-rest-port bootstrap node's REST port (default: ${BASE_REST_PORT})
|
--base-rest-port bootstrap node's REST port (default: ${BASE_REST_PORT})
|
||||||
--base-metrics-port bootstrap node's metrics server port (default: ${BASE_METRICS_PORT})
|
--base-metrics-port bootstrap node's metrics port (default: ${BASE_METRICS_PORT})
|
||||||
|
--base-vc-metrics-port The first validator client metrics port (default: ${BASE_VC_METRICS_PORT})
|
||||||
--base-remote-signer-port first remote signing node's port (default: ${BASE_REMOTE_SIGNER_PORT})
|
--base-remote-signer-port first remote signing node's port (default: ${BASE_REMOTE_SIGNER_PORT})
|
||||||
--base-el-net-port first EL's network traffic port (default: ${BASE_EL_NET_PORT})
|
--base-el-net-port first EL's network traffic port (default: ${BASE_EL_NET_PORT})
|
||||||
--base-el-http-port first EL's HTTP web3 port (default: ${BASE_EL_HTTP_PORT})
|
--base-el-http-port first EL's HTTP web3 port (default: ${BASE_EL_HTTP_PORT})
|
||||||
|
@ -231,6 +233,10 @@ while true; do
|
||||||
BASE_METRICS_PORT="$2"
|
BASE_METRICS_PORT="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
--base-vc-metrics-port)
|
||||||
|
BASE_VC_METRICS_PORT="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
--base-remote-signer-port)
|
--base-remote-signer-port)
|
||||||
BASE_REMOTE_SIGNER_PORT="$2"
|
BASE_REMOTE_SIGNER_PORT="$2"
|
||||||
shift 2
|
shift 2
|
||||||
|
@ -1023,6 +1029,8 @@ for NUM_NODE in $(seq 0 $(( NUM_NODES - 1 ))); do
|
||||||
--log-level="${LOG_LEVEL}" \
|
--log-level="${LOG_LEVEL}" \
|
||||||
${STOP_AT_EPOCH_FLAG} \
|
${STOP_AT_EPOCH_FLAG} \
|
||||||
--data-dir="${VALIDATOR_DATA_DIR}" \
|
--data-dir="${VALIDATOR_DATA_DIR}" \
|
||||||
|
--metrics \
|
||||||
|
--metrics-port:$((BASE_VC_METRICS_PORT + NUM_NODE)) \
|
||||||
${KEYMANAGER_FLAG} \
|
${KEYMANAGER_FLAG} \
|
||||||
--keymanager-port=$((BASE_VC_KEYMANAGER_PORT + NUM_NODE)) \
|
--keymanager-port=$((BASE_VC_KEYMANAGER_PORT + NUM_NODE)) \
|
||||||
--keymanager-token-file="${DATA_DIR}/keymanager-token" \
|
--keymanager-token-file="${DATA_DIR}/keymanager-token" \
|
||||||
|
|
Loading…
Reference in New Issue