diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 55 |
1 files changed, 42 insertions, 13 deletions
| @@ -10,7 +10,7 @@ | |||
| 10 | ROOT := $(shell pwd) | 10 | ROOT := $(shell pwd) |
| 11 | NPROC := $(shell nproc 2>/dev/null || echo 2) | 11 | NPROC := $(shell nproc 2>/dev/null || echo 2) |
| 12 | SUDO := $(shell [ "$$(id -u)" = "0" ] && echo "" || echo "sudo") | 12 | SUDO := $(shell [ "$$(id -u)" = "0" ] && echo "" || echo "sudo") |
| 13 | VERSION := 1.2.15 | 13 | VERSION := 1.2.18 |
| 14 | 14 | ||
| 15 | # ---- Pinned third-party sources ------------------------------------------- | 15 | # ---- Pinned third-party sources ------------------------------------------- |
| 16 | # | 16 | # |
| @@ -34,9 +34,16 @@ VERSION := 1.2.15 | |||
| 34 | # resync before shipping the result. | 34 | # resync before shipping the result. |
| 35 | # | 35 | # |
| 36 | # RandomX pin is the commit this tree has been building and syncing against | 36 | # RandomX pin is the commit this tree has been building and syncing against |
| 37 | # (post-v2.0.1 master, 2026-05-24) -- chosen to change nothing today. | 37 | # (post-v2.0.1 master, 2026-05-24) -- identical to upstream's pin. |
| 38 | # | ||
| 39 | # libsecp256k1 is pinned to upstream v1.2.18's commit rather than the one this | ||
| 40 | # fork carried, so signature validation matches the binaries the rest of the | ||
| 41 | # network runs. Consensus code must not differ from the network by accident. | ||
| 42 | # There must be exactly ONE assignment of each of these variables in this file: | ||
| 43 | # upstream defines them near the top too, and GNU Make takes the last `:=`, so | ||
| 44 | # a second block silently decides the build. | ||
| 38 | SECP256K1_REPO := https://github.com/bitcoin-core/secp256k1 | 45 | SECP256K1_REPO := https://github.com/bitcoin-core/secp256k1 |
| 39 | SECP256K1_COMMIT := 6e2c8bc4ecdc6e71dbe7a368f360d8d453ce435d | 46 | SECP256K1_COMMIT := 7fecac74aed8e1fd9078380d67dd04663705c989 |
| 40 | RANDOMX_REPO := https://github.com/tevador/RandomX | 47 | RANDOMX_REPO := https://github.com/tevador/RandomX |
| 41 | RANDOMX_COMMIT := 1e9d4b2df63fa6edf46b06789486e23c0fcaa55a | 48 | RANDOMX_COMMIT := 1e9d4b2df63fa6edf46b06789486e23c0fcaa55a |
| 42 | 49 | ||
| @@ -71,7 +78,7 @@ deps-apt: | |||
| 71 | @if command -v apt-get >/dev/null 2>&1; then \ | 78 | @if command -v apt-get >/dev/null 2>&1; then \ |
| 72 | $(SUDO) apt-get install -y build-essential cmake git pkg-config autoconf \ | 79 | $(SUDO) apt-get install -y build-essential cmake git pkg-config autoconf \ |
| 73 | libtool libssl-dev libdb5.3++-dev libsodium-dev nlohmann-json3-dev \ | 80 | libtool libssl-dev libdb5.3++-dev libsodium-dev nlohmann-json3-dev \ |
| 74 | libboost-system-dev libglfw3-dev libgl-dev python3-pil; \ | 81 | libboost-system-dev libglfw3-dev libgl-dev python3-pil clang; \ |
| 75 | else \ | 82 | else \ |
| 76 | echo "Not an apt system — install: g++ cmake git autoconf libtool"; \ | 83 | echo "Not an apt system — install: g++ cmake git autoconf libtool"; \ |
| 77 | echo " libssl libdb++ libsodium nlohmann-json boost glfw3 opengl python3-pil"; \ | 84 | echo " libssl libdb++ libsodium nlohmann-json boost glfw3 opengl python3-pil"; \ |
| @@ -85,8 +92,10 @@ deps-secp256k1: | |||
| 85 | cd $(ROOT)/secp256k1-build && \ | 92 | cd $(ROOT)/secp256k1-build && \ |
| 86 | git remote add origin $(SECP256K1_REPO) && \ | 93 | git remote add origin $(SECP256K1_REPO) && \ |
| 87 | git fetch -q --depth 1 origin $(SECP256K1_COMMIT) && \ | 94 | git fetch -q --depth 1 origin $(SECP256K1_COMMIT) && \ |
| 88 | git checkout -q $(SECP256K1_COMMIT) && \ | 95 | git checkout -q --detach FETCH_HEAD && \ |
| 89 | ./autogen.sh && \ | 96 | test "$$(git rev-parse HEAD)" = "$(SECP256K1_COMMIT)" && \ |
| 97 | echo "==> libsecp256k1 pinned at $(SECP256K1_COMMIT)" && \ | ||
| 98 | cd $(ROOT)/secp256k1-build && ./autogen.sh && \ | ||
| 90 | ./configure --enable-module-schnorrsig --enable-module-extrakeys \ | 99 | ./configure --enable-module-schnorrsig --enable-module-extrakeys \ |
| 91 | --disable-shared --with-pic --disable-benchmark --disable-tests && \ | 100 | --disable-shared --with-pic --disable-benchmark --disable-tests && \ |
| 92 | make -j$(NPROC) && $(SUDO) make install && $(SUDO) ldconfig; \ | 101 | make -j$(NPROC) && $(SUDO) make install && $(SUDO) ldconfig; \ |
| @@ -103,7 +112,9 @@ deps-randomx: | |||
| 103 | cd $(HOME)/RandomX && \ | 112 | cd $(HOME)/RandomX && \ |
| 104 | git remote add origin $(RANDOMX_REPO) && \ | 113 | git remote add origin $(RANDOMX_REPO) && \ |
| 105 | git fetch -q --depth 1 origin $(RANDOMX_COMMIT) && \ | 114 | git fetch -q --depth 1 origin $(RANDOMX_COMMIT) && \ |
| 106 | git checkout -q $(RANDOMX_COMMIT); \ | 115 | git checkout -q --detach FETCH_HEAD && \ |
| 116 | test "$$(git rev-parse HEAD)" = "$(RANDOMX_COMMIT)" && \ | ||
| 117 | echo "==> RandomX pinned at $(RANDOMX_COMMIT)" && \ | ||
| 107 | mkdir -p $(HOME)/RandomX/build; \ | 118 | mkdir -p $(HOME)/RandomX/build; \ |
| 108 | cd $(HOME)/RandomX/build && cmake .. -DCMAKE_BUILD_TYPE=Release && \ | 119 | cd $(HOME)/RandomX/build && cmake .. -DCMAKE_BUILD_TYPE=Release && \ |
| 109 | make -j$(NPROC) randomx; \ | 120 | make -j$(NPROC) randomx; \ |
| @@ -182,8 +193,14 @@ deps-windows: | |||
| 182 | autoconf automake libtool | 193 | autoconf automake libtool |
| 183 | @if [ ! -f deps/lib/libsecp256k1.a ]; then \ | 194 | @if [ ! -f deps/lib/libsecp256k1.a ]; then \ |
| 184 | rm -rf secp256k1-build; \ | 195 | rm -rf secp256k1-build; \ |
| 185 | git clone --depth 1 https://github.com/bitcoin-core/secp256k1 secp256k1-build; \ | 196 | git init -q secp256k1-build; \ |
| 186 | cd secp256k1-build && ./autogen.sh && \ | 197 | cd secp256k1-build && \ |
| 198 | git remote add origin $(SECP256K1_REPO) && \ | ||
| 199 | git fetch -q --depth 1 origin $(SECP256K1_COMMIT) && \ | ||
| 200 | git checkout -q --detach FETCH_HEAD && \ | ||
| 201 | test "$$(git rev-parse HEAD)" = "$(SECP256K1_COMMIT)" && \ | ||
| 202 | echo "==> secp256k1 pinned at $(SECP256K1_COMMIT)" && \ | ||
| 203 | cd $(ROOT)/secp256k1-build && ./autogen.sh && \ | ||
| 187 | ./configure --prefix=$(ROOT)/deps \ | 204 | ./configure --prefix=$(ROOT)/deps \ |
| 188 | --enable-module-schnorrsig --enable-module-extrakeys \ | 205 | --enable-module-schnorrsig --enable-module-extrakeys \ |
| 189 | --disable-shared --with-pic --disable-benchmark --disable-tests && \ | 206 | --disable-shared --with-pic --disable-benchmark --disable-tests && \ |
| @@ -194,9 +211,15 @@ deps-windows: | |||
| 194 | fi | 211 | fi |
| 195 | @if [ ! -f RandomX/build/librandomx.a ]; then \ | 212 | @if [ ! -f RandomX/build/librandomx.a ]; then \ |
| 196 | rm -rf RandomX; \ | 213 | rm -rf RandomX; \ |
| 197 | git clone --depth 1 https://github.com/tevador/RandomX; \ | 214 | git init -q RandomX; \ |
| 198 | mkdir -p RandomX/build; \ | 215 | cd RandomX && \ |
| 199 | cd RandomX/build && cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release && \ | 216 | git remote add origin $(RANDOMX_REPO) && \ |
| 217 | git fetch -q --depth 1 origin $(RANDOMX_COMMIT) && \ | ||
| 218 | git checkout -q --detach FETCH_HEAD && \ | ||
| 219 | test "$$(git rev-parse HEAD)" = "$(RANDOMX_COMMIT)" && \ | ||
| 220 | echo "==> RandomX pinned at $(RANDOMX_COMMIT)" && \ | ||
| 221 | mkdir -p $(ROOT)/RandomX/build; \ | ||
| 222 | cd $(ROOT)/RandomX/build && cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release && \ | ||
| 200 | make randomx; \ | 223 | make randomx; \ |
| 201 | echo "==> RandomX done"; \ | 224 | echo "==> RandomX done"; \ |
| 202 | else \ | 225 | else \ |
| @@ -224,6 +247,12 @@ clean: | |||
| 224 | tests: | 247 | tests: |
| 225 | $(MAKE) -C src -f Makefile tests | 248 | $(MAKE) -C src -f Makefile tests |
| 226 | 249 | ||
| 250 | fuzz-net-message-smoke: deps-linux | ||
| 251 | $(MAKE) -C src -f Makefile fuzz-net-message-smoke | ||
| 252 | |||
| 253 | fuzz-script-smoke: deps-linux | ||
| 254 | $(MAKE) -C src -f Makefile fuzz-script-smoke | ||
| 255 | |||
| 227 | checksums: | 256 | checksums: |
| 228 | ./scripts/make-release-checksums.sh | 257 | ./scripts/make-release-checksums.sh |
| 229 | 258 | ||
| @@ -234,5 +263,5 @@ verify-release: | |||
| 234 | ./scripts/verify-release.sh $(if $(TAG),$(TAG),latest) | 263 | ./scripts/verify-release.sh $(if $(TAG),$(TAG),latest) |
| 235 | 264 | ||
| 236 | .PHONY: linux windows clean appimage \ | 265 | .PHONY: linux windows clean appimage \ |
| 237 | tests checksums sign-checksums verify-release \ | 266 | tests fuzz-net-message-smoke fuzz-script-smoke checksums sign-checksums verify-release \ |
| 238 | deps-linux deps-windows deps-apt deps-secp256k1 deps-randomx | 267 | deps-linux deps-windows deps-apt deps-secp256k1 deps-randomx |