Skip to content

Commit dceadf6

Browse files
authored
Merge pull request #18063 from MinaProtocol/lyh/compat-into-dev-nov4-2025
Merge compatible into develop Nov. 4th 2025
2 parents f5b3c1d + 9782ffd commit dceadf6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2100
-554
lines changed

.gitignore

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,14 @@ target
3434
./release
3535
.vscode
3636

37-
### IntelliJ IDEA ###
38-
**/.idea/
39-
*.iws
40-
*.iml
41-
*.ipr
42-
4337
### Direnv ###
4438
.env
4539
.envrc
4640
.direnv/
4741

42+
### Python ###
43+
**/.venv
44+
**/__pycache__
4845
# pipenv
4946
Pipfile
5047
Pipfile.lock

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ build-daemon-utils: ocaml_checks reformat-diff libp2p_helper ## Build daemon uti
164164
src/app/validate_keypair/validate_keypair.exe \
165165
src/app/runtime_genesis_ledger/runtime_genesis_ledger.exe \
166166
src/lib/snark_worker/standalone/run_snark_worker.exe \
167+
src/app/rocksdb-scanner/rocksdb_scanner.exe \
167168
--profile=$(DUNE_PROFILE) \
168169
&& echo "✅ Build complete"
169170

@@ -221,6 +222,7 @@ build-archive-utils: ocaml_checks reformat-diff ## Build archive node and relate
221222
src/app/archive_blocks/archive_blocks.exe \
222223
src/app/extract_blocks/extract_blocks.exe \
223224
src/app/missing_blocks_auditor/missing_blocks_auditor.exe \
225+
src/app/archive_hardfork_toolbox/archive_hardfork_toolbox.exe \
224226
--profile=$(DUNE_PROFILE) \
225227
&& echo "✅ Build complete"
226228

buildkite/scripts/entrypoints/run-hardfork-package-gen.sh

Lines changed: 63 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
set -euox pipefail
4+
35
# Generate Hardfork Package Build Script
46
#
57
# This script generates Dhall configuration for creating hardfork packages in the Mina protocol
@@ -10,11 +12,12 @@
1012
# ./run-hardfork-package-gen.sh
1113
#
1214
# REQUIRED ENVIRONMENT VARIABLES:
13-
# CODENAMES - Comma-separated list of Debian codenames (e.g., "Bullseye,Focal")
14-
# NETWORK - Target network name (e.g., "Devnet", "Mainnet")
15-
# GENESIS_TIMESTAMP - Genesis timestamp in ISO format (e.g., "2024-04-07T11:45:00Z")
16-
# CONFIG_JSON_GZ_URL - URL to the gzipped genesis config JSON file
17-
# VERSION - Version string for the hardfork package
15+
# CODENAMES - Comma-separated list of Debian codenames (e.g., "Bullseye,Focal")
16+
# NETWORK - Target network name (e.g., "Devnet", "Mainnet")
17+
# GENESIS_TIMESTAMP - Genesis timestamp in ISO format (e.g., "2024-04-07T11:45:00Z")
18+
# CONFIG_JSON_GZ_URL - URL to the gzipped genesis config JSON file
19+
# VERSION - Version string for the hardfork package (optional, if not set, defaults to calculated from git)
20+
# PRECOMPUTED_FORK_BLOCK_PREFIX - (Optional) Prefix for precomputed fork block URLs (e.g., "gs://mina_network_block_data/mainnet")
1821
#
1922
# EXAMPLE:
2023
# export CODENAMES="Bullseye,Focal"
@@ -42,20 +45,21 @@ function usage() {
4245
echo -e "${RED}$1${CLEAR}\n";
4346
fi
4447
cat << EOF
45-
CODENAMES The Debian codenames (Bullseye, Focal etc.)
46-
NETWORK The Docker and Debian network (Devnet, Mainnet)
47-
GENESIS_TIMESTAMP The Genesis timestamp in ISO format (e.g. 2024-04-07T11:45:00Z)
48-
CONFIG_JSON_GZ_URL The URL to the gzipped genesis config JSON file
49-
VERSION The version of the hardfork package to generate (e.g. 3.0.0devnet-tooling-dkijania-hardfork-package-gen-in-nightly-b37f50e)
50-
48+
CODENAMES The Debian codenames (Bullseye, Focal etc.)
49+
NETWORK The Docker and Debian network (Devnet, Mainnet)
50+
GENESIS_TIMESTAMP The Genesis timestamp in ISO format (e.g. 2024-04-07T11:45:00Z)
51+
CONFIG_JSON_GZ_URL The URL to the gzipped genesis config JSON file
52+
VERSION (Optional) The version of the hardfork package to generate (e.g. 3.0.0devnet-tooling-dkijania-hardfork-package-gen-in-nightly-b37f50e)
53+
PRECOMPUTED_FORK_BLOCK_PREFIX (Optional) The prefix for precomputed fork block URLs (e.g. gs://mina_network_block_data/mainnet)
5154
EOF
5255
exit 1
5356
}
5457

5558
function to_dhall_list() {
5659
local input_str="$1"
5760
local dhall_type="$2"
58-
local arr=("${input_str//,/ }")
61+
local arr
62+
IFS=',' read -ra arr <<< "$input_str"
5963
local dhall_list=""
6064

6165
if [[ ${#arr[@]} -eq 0 || -z "${arr[0]}" ]]; then
@@ -72,6 +76,52 @@ function to_dhall_list() {
7276
echo "$dhall_list"
7377
}
7478

79+
if [[ -z "$CODENAMES" ]]; then
80+
usage "CODENAMES environment variable is required"
81+
fi
82+
83+
if [[ -z "$NETWORK" ]]; then
84+
usage "NETWORK environment variable is required"
85+
fi
86+
87+
if [[ -z "$CONFIG_JSON_GZ_URL" ]]; then
88+
usage "CONFIG_JSON_GZ_URL environment variable is required"
89+
fi
90+
91+
# Format GENESIS_TIMESTAMP as Optional Text for Dhall
92+
if [[ -z "$GENESIS_TIMESTAMP" ]]; then
93+
GENESIS_TIMESTAMP="None Text"
94+
else
95+
# shellcheck disable=SC2089
96+
GENESIS_TIMESTAMP="(Some \"${GENESIS_TIMESTAMP}\")"
97+
fi
98+
99+
# Format VERSION as Optional Text for Dhall
100+
if [[ -z "$VERSION" ]]; then
101+
VERSION="(None Text)"
102+
else
103+
# shellcheck disable=SC2089
104+
VERSION="(Some \"${VERSION}\")"
105+
fi
106+
107+
# Format PRECOMPUTED_FORK_BLOCK_PREFIX as Optional Text for Dhall
108+
if [[ -z "$PRECOMPUTED_FORK_BLOCK_PREFIX" ]]; then
109+
PRECOMPUTED_FORK_BLOCK_PREFIX="(None Text)"
110+
else
111+
# shellcheck disable=SC2089
112+
PRECOMPUTED_FORK_BLOCK_PREFIX="(Some \"${PRECOMPUTED_FORK_BLOCK_PREFIX}\")"
113+
fi
114+
75115
DHALL_CODENAMES=$(to_dhall_list "$CODENAMES" "$DEBIAN_VERSION_DHALL_DEF.DebVersion")
76116

77-
echo $GENERATE_HARDFORK_PACKAGE_DHALL_DEF'.generate_hardfork_package '"$DHALL_CODENAMES"' '$NETWORK_DHALL_DEF'.Type.'"${NETWORK}"' (None Text) "'"${CONFIG_JSON_GZ_URL}"'" "'""'" ' | dhall-to-yaml --quoted
117+
# shellcheck disable=SC2089
118+
printf '%s.generate_hardfork_package %s %s.Type.%s %s "%s" "%s" %s %s\n' \
119+
"$GENERATE_HARDFORK_PACKAGE_DHALL_DEF" \
120+
"$DHALL_CODENAMES" \
121+
"$NETWORK_DHALL_DEF" \
122+
"$NETWORK" \
123+
"$GENESIS_TIMESTAMP" \
124+
"$CONFIG_JSON_GZ_URL" \
125+
"" \
126+
"$VERSION" \
127+
"$PRECOMPUTED_FORK_BLOCK_PREFIX" | dhall-to-yaml --quoted

0 commit comments

Comments
 (0)