Skip to content

Commit

Permalink
Merge pull request #142 from ethpandaops/bbusa/add-human-readable-time
Browse files Browse the repository at this point in the history
feat: add humanly readable time
  • Loading branch information
barnabasbusa authored Jun 25, 2024
2 parents 0feccdf + 1370511 commit 3ec1d66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions config-example/cl/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ CONFIG_NAME: testnet # needs to exist because of Prysm. Otherwise it conflicts w
# ---------------------------------------------------------------
# `2**14` (= 16,384)
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: $NUMBER_OF_VALIDATORS
# Mar-01-2021 08:53:32 AM +UTC
# This is an invalid valid and should be updated when you create the genesis
#HUMAN_TIME_PLACEHOLDER
MIN_GENESIS_TIME: $GENESIS_TIMESTAMP
GENESIS_FORK_VERSION: $GENESIS_FORK_VERSION
GENESIS_DELAY: $GENESIS_DELAY
Expand Down
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ gen_cl_config(){
tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX)
mkdir -p /data/metadata
mkdir -p /data/parsed
HUMAN_READABLE_TIMESTAMP=$(date -u -d @"$GENESIS_TIMESTAMP" +"%Y-%b-%d %I:%M:%S %p %Z")
COMMENT="# $HUMAN_READABLE_TIMESTAMP"
sed -i "s/#HUMAN_TIME_PLACEHOLDER/$COMMENT/" /config/cl/config.yaml
envsubst < /config/cl/config.yaml > /data/metadata/config.yaml
envsubst < /config/cl/mnemonics.yaml > $tmp_dir/mnemonics.yaml
# Conditionally override values if preset is "minimal"
Expand Down

0 comments on commit 3ec1d66

Please sign in to comment.