Skip to content

Commit 960590b

Browse files
committed
Merge remote-tracking branch 'origin/develop' into lyh/app-state-size32-dev
2 parents d66bb1c + dceadf6 commit 960590b

File tree

330 files changed

+9301
-4660
lines changed

Some content is hidden

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

330 files changed

+9301
-4660
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

CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/CODEOWNERS @dannywillems @deepthiskumar @georgeee
22
/buildkite @MinaProtocol/infra-eng-reviewers
3-
/frontend/ @MinaProtocol/product-eng-reviewers
43
/dockerfiles/ @MinaProtocol/infra-eng-reviewers
54
/scripts/ @MinaProtocol/infra-eng-reviewers @MinaProtocol/protocol-eng-reviewers
65
/Makefile @MinaProtocol/infra-eng-reviewers

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

README-dev.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ A number of C libraries are expected to be available in the system and are also
150150
If you use vim, add this snippet in your `.vimrc` file to use Merlin. (Note:Be sure to change the HOME directory to match yours.)
151151

152152
```bash
153-
let s:ocamlmerlin="/Users/USERNAME/.opam/4.14.0/share/merlin"
153+
let s:ocamlmerlin="/Users/USERNAME/.opam/4.14.2/share/merlin"
154154
execute "set rtp+=".s:ocamlmerlin."/vim"
155155
execute "set rtp+=".s:ocamlmerlin."/vimbufsync"
156156
let g:syntastic_ocaml_checkers=['merlin']
@@ -301,10 +301,10 @@ We use the [Dune](https://github.com/ocaml/dune/) build system for OCaml code.
301301
302302
OCaml dependencies live in the [`opam.export`](./opam.export) file. This file is machine generated and must not be modified.
303303
304-
To add a new dependency, you most likely will need to create a new fresh switch to avoid pushing in any local dependency (like `ocaml-lsp`). The following commands assume that the version of the OCaml compiler used in the codebase is 4.14.0:
304+
To add a new dependency, you most likely will need to create a new fresh switch to avoid pushing in any local dependency (like `ocaml-lsp`). The following commands assume that the version of the OCaml compiler used in the codebase is 4.14.2:
305305
306306
```shell
307-
opam switch create mina_fresh 4.14.0
307+
opam switch create mina_fresh 4.14.2
308308
opam switch import opam.export
309309
```
310310

README-spacetime.md

Lines changed: 0 additions & 74 deletions
This file was deleted.

buildkite/Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,26 @@ check_syntax:
44
# xargs will short-circuit if a command fails with code 255
55
find ./src/ -name "*.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'echo "{}" && dhall --file {} > /dev/null || exit 255'
66

7-
check_lint:
7+
convert_backticks_to_ifs:
8+
sed -i -E 's/`if` =/if =/g' src/Command/Base.dhall
9+
10+
convert_ifs_to_backticks:
11+
sed -i -E 's/if =/`if` =/g' src/Command/Base.dhall
12+
13+
check_lint: convert_backticks_to_ifs
814
find ./src/ -name "*.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'echo "{}" && dhall --ascii lint --check --inplace {} || exit 255'
915

10-
check_format:
16+
check_format: convert_backticks_to_ifs
17+
@echo "Dhall version: $$(dhall --version)"
1118
find ./src/ -name "*.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'echo "{} format" && dhall --ascii format --check --inplace {} || exit 255'
1219

1320
lint:
1421
find ./src/ -name "*.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'echo "{}" && dhall --ascii lint --inplace {} || exit 255'
22+
$(MAKE) convert_ifs_to_backticks
1523

1624
format:
1725
find ./src/ -name "*.dhall" -print0 | xargs -I{} -0 -n1 bash -c 'echo "{}" && dhall --ascii format --inplace {} || exit 255'
26+
$(MAKE) convert_ifs_to_backticks
1827

1928
check_filter:
2029
# Ensure Jobs.dhall is generated before proceeding

buildkite/scripts/archive/upgrade-script-check.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ main() {
137137
)
138138

139139
local scripts=(
140-
"src/app/archive/upgrade-to-mesa.sql"
141-
"src/app/archive/downgrade-to-berkeley.sql"
140+
"src/app/archive/upgrade_to_mesa.sql"
141+
"src/app/archive/downgrade_to_berkeley.sql"
142142
)
143143

144144
# Check if either monitored file has changes
@@ -202,4 +202,4 @@ main() {
202202
exit 0
203203
}
204204

205-
main "$@"
205+
main "$@"

buildkite/scripts/debian/start_local_repo.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ if [ -z $MINA_DEB_CODENAME ]; then
55
exit 1
66
fi
77

8+
# Parse command line arguments
9+
ARCH="amd64" # default architecture
10+
11+
while [[ $# -gt 0 ]]; do
12+
case $1 in
13+
--arch)
14+
ARCH="$2"
15+
shift 2
16+
;;
17+
*)
18+
echo "Unknown option: $1"
19+
exit 1
20+
;;
21+
esac
22+
done
23+
824
LOCAL_DEB_FOLDER=_build
925

1026
set -eou pipefail
@@ -16,4 +32,4 @@ mkdir -p $LOCAL_DEB_FOLDER
1632
source ./buildkite/scripts/export-git-env-vars.sh
1733
./buildkite/scripts/cache/manager.sh read --root legacy/debians "$MINA_DEB_CODENAME/*" _build
1834
./buildkite/scripts/cache/manager.sh read "debians/$MINA_DEB_CODENAME/*" _build
19-
./scripts/debian/aptly.sh start --codename $MINA_DEB_CODENAME --debians $LOCAL_DEB_FOLDER --component unstable --clean --background --wait
35+
./scripts/debian/aptly.sh start --codename $MINA_DEB_CODENAME --debians $LOCAL_DEB_FOLDER --component unstable --clean --background --wait --archs $ARCH

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

buildkite/scripts/merges-cleanly.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ fi
2121
# Fetch a fresh copy of the target branch
2222
source buildkite/scripts/refresh_code.sh
2323

24+
git fetch origin "${BRANCH}"
25+
2426
# Check mergeability. We use flags so that
2527
# * `--no-commit` stops us from updating the index with a merge commit,
2628
# * `--no-ff` stops us from updating the index to the HEAD, if the merge is a

0 commit comments

Comments
 (0)