Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions buildkite/scripts/build-hardfork-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion scripts/mina-verify-packaged-fork-config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down