diff --git a/buildkite/scripts/build-hardfork-package.sh b/buildkite/scripts/build-hardfork-package.sh index faef3755a41..c14f76a29dc 100755 --- a/buildkite/scripts/build-hardfork-package.sh +++ b/buildkite/scripts/build-hardfork-package.sh @@ -31,6 +31,10 @@ echo "--- Download and extract previous network config" curl -o config.json.gz $CONFIG_JSON_GZ_URL gunzip config.json.gz +# Patch against a bug in 1.4 which is fixed by PR #15462 +mv config.json config_orig.json +jq 'del(.ledger.num_accounts) | del(.ledger.name)' config_orig.json > config.json + echo "--- Migrate accounts to new network format" # TODO: At this stage, we need to migrate the json accounts into the new network's format. # For now, this is hard-coded to the mainnet -> berkeley migration, but we need to select diff --git a/scripts/mina-verify-packaged-fork-config b/scripts/mina-verify-packaged-fork-config index 0676255e0f9..6870687b4c9 100755 --- a/scripts/mina-verify-packaged-fork-config +++ b/scripts/mina-verify-packaged-fork-config @@ -130,12 +130,17 @@ GENESIS_TIMESTAMP=$(jq -r '.genesis.genesis_state_timestamp' "$PACKAGED_DAEMON_C echo "exporting ledgers from running node ... (this may take a while)" >&2 +override_file="$workdir/override-genesis-timestamp.json" +echo "{\"genesis\":{\"genesis_state_timestamp\":\"$(date -u +"%Y-%m-%dT%H:%M:%SZ")\"}}" > "$override_file" + # export the packaged ledgers in a way where we know which one is which function extract_ledgers() { config_file=$1 ledger_dir=$2 json_prefix=$3 - "$MINA_EXE" daemon --libp2p-keypair "$workdir/keys/p2p" --config-file "$config_file" --seed --genesis-ledger-dir "$ledger_dir" & + "$MINA_EXE" daemon --libp2p-keypair "$workdir/keys/p2p" \ + --config-file "$config_file" --config-file "$override_file" \ + --seed --genesis-ledger-dir "$ledger_dir" & while ! "$MINA_EXE" ledger export staged-ledger | jq . 2>/dev/null >"$json_prefix-staged.json"; do sleep 1m