File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ # NOTE: This script patches the genesis timestamp of a fork config so a new
4+ # network could be schedueld to genesis in some instant in the future.
5+
36set -eo pipefail
47
8+ # ==================== Inputs to this script ====================
9+ # The fork config we aim to patch on
510FORK_CONFIG_JSON=${FORK_CONFIG_JSON:= fork_config.json}
11+ # The hashes file generated by runtime-genesis-ledger
612LEDGER_HASHES_JSON=${LEDGER_HASHES_JSON:= ledger_hashes.json}
13+ # The "base" config file, needed to know the genesis time of the prefork network
714FORKING_FROM_CONFIG_JSON=${FORKING_FROM_CONFIG_JSON:= genesis_ledgers/ mainnet.json}
8-
9- # If not given, the genesis timestamp is set to 10 mins into the future
15+ # Genesis timestamp of the postfork network, defaults to 10mins in the future
1016GENESIS_TIMESTAMP=${GENESIS_TIMESTAMP:= $(date -u +" %Y-%m-%dT%H:%M:%SZ" -d " 10 mins" )}
1117
1218# Pull the original genesis timestamp from the pre-fork config file
1319ORIGINAL_GENESIS_TIMESTAMP=$( jq -r ' .genesis.genesis_state_timestamp' " $FORKING_FROM_CONFIG_JSON " )
1420OFFSET=$( jq -r ' .proof.fork.global_slot_since_genesis' " $FORKING_FROM_CONFIG_JSON " )
21+ # ===============================================================
1522
1623if [[ " $OFFSET " == null ]]; then
1724 OFFSET=0
You can’t perform that action at this time.
0 commit comments