From ccb66a10dba587fc9ce635354bda98f2b41c83ea Mon Sep 17 00:00:00 2001 From: Janez Podhostnik Date: Tue, 20 Jan 2026 15:02:01 +0100 Subject: [PATCH 1/3] make fixes --- Makefile | 2 +- crypto_adx_flag.mk | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 510254b94c0..40af735d74f 100644 --- a/Makefile +++ b/Makefile @@ -167,7 +167,7 @@ tidy: # Builds a custom version of the golangci-lint binary which includes custom plugins tools/custom-gcl: tools/structwrite .custom-gcl.yml - golangci-lint custom + $(shell go env GOPATH)/bin/golangci-lint custom .PHONY: lint lint: tools/custom-gcl diff --git a/crypto_adx_flag.mk b/crypto_adx_flag.mk index 0d0d5ac7467..0634b7d4426 100644 --- a/crypto_adx_flag.mk +++ b/crypto_adx_flag.mk @@ -16,14 +16,19 @@ else ADX_SUPPORT := 1 endif -DISABLE_ADX := "-O2 -D__BLST_PORTABLE__" +# C standard flag to ensure compatibility with GCC 15+ which defaults to C23 +# where 'bool' is a keyword and cannot be redefined via typedef +C_STD_FLAG := -std=gnu17 + +# Flags to disable ADX instructions for older CPUs +DISABLE_ADX := -O2 -D__BLST_PORTABLE__ # Then, set `CRYPTO_FLAG` # the crypto package uses BLST source files underneath which may use ADX instructions. ifeq ($(ADX_SUPPORT), 1) -# if ADX instructions are supported on the current machine, default is to use a fast ADX implementation - CRYPTO_FLAG := "" +# if ADX instructions are supported on the current machine, default is to use a fast ADX implementation + CRYPTO_FLAG := "$(C_STD_FLAG)" else -# if ADX instructions aren't supported, this CGO flags uses a slower non-ADX implementation - CRYPTO_FLAG := $(DISABLE_ADX) +# if ADX instructions aren't supported, this CGO flags uses a slower non-ADX implementation + CRYPTO_FLAG := "$(C_STD_FLAG) $(DISABLE_ADX)" endif \ No newline at end of file From 41889a95464136ff526076a8572df36bb8334098 Mon Sep 17 00:00:00 2001 From: Tarak Ben Youssef Date: Thu, 22 Jan 2026 00:49:47 +0800 Subject: [PATCH 2/3] revert adx flag change and update the crypto module --- crypto_adx_flag.mk | 8 ++------ go.mod | 4 ++-- go.sum | 4 ++-- insecure/go.mod | 4 ++-- insecure/go.sum | 4 ++-- integration/go.mod | 4 ++-- integration/go.sum | 4 ++-- 7 files changed, 14 insertions(+), 18 deletions(-) diff --git a/crypto_adx_flag.mk b/crypto_adx_flag.mk index 0634b7d4426..b21ca39ca1c 100644 --- a/crypto_adx_flag.mk +++ b/crypto_adx_flag.mk @@ -16,10 +16,6 @@ else ADX_SUPPORT := 1 endif -# C standard flag to ensure compatibility with GCC 15+ which defaults to C23 -# where 'bool' is a keyword and cannot be redefined via typedef -C_STD_FLAG := -std=gnu17 - # Flags to disable ADX instructions for older CPUs DISABLE_ADX := -O2 -D__BLST_PORTABLE__ @@ -27,8 +23,8 @@ DISABLE_ADX := -O2 -D__BLST_PORTABLE__ # the crypto package uses BLST source files underneath which may use ADX instructions. ifeq ($(ADX_SUPPORT), 1) # if ADX instructions are supported on the current machine, default is to use a fast ADX implementation - CRYPTO_FLAG := "$(C_STD_FLAG)" + CRYPTO_FLAG := "" else # if ADX instructions aren't supported, this CGO flags uses a slower non-ADX implementation - CRYPTO_FLAG := "$(C_STD_FLAG) $(DISABLE_ADX)" + CRYPTO_FLAG := "$(DISABLE_ADX)" endif \ No newline at end of file diff --git a/go.mod b/go.mod index 351257e8008..6a2d6fbf2fb 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/onflow/flow-go -go 1.25.0 +go 1.25.1 require ( cloud.google.com/go/compute/metadata v0.9.0 @@ -48,7 +48,7 @@ require ( github.com/multiformats/go-multihash v0.2.3 github.com/onflow/atree v0.12.0 github.com/onflow/cadence v1.9.5 - github.com/onflow/crypto v0.25.3 + github.com/onflow/crypto v0.25.4 github.com/onflow/flow v0.4.15 github.com/onflow/flow-core-contracts/lib/go/contracts v1.9.2 github.com/onflow/flow-core-contracts/lib/go/templates v1.9.2 diff --git a/go.sum b/go.sum index 7b95ae83b9d..99b5523bdb2 100644 --- a/go.sum +++ b/go.sum @@ -944,8 +944,8 @@ github.com/onflow/boxo v0.0.0-20240201202436-f2477b92f483 h1:LpiQhTAfM9CAmNVEs0n github.com/onflow/boxo v0.0.0-20240201202436-f2477b92f483/go.mod h1:pIZgTWdm3k3pLF9Uq6MB8JEcW07UDwNJjlXW1HELW80= github.com/onflow/cadence v1.9.5 h1:m82RsERxvrknL69J9YxzOEKFhiHARBQkvNIFTUATGNk= github.com/onflow/cadence v1.9.5/go.mod h1:MlJsCwhCZwdnAUd24XHzcsizZfG7a2leab1PztabUsE= -github.com/onflow/crypto v0.25.3 h1:XQ3HtLsw8h1+pBN+NQ1JYM9mS2mVXTyg55OldaAIF7U= -github.com/onflow/crypto v0.25.3/go.mod h1:+1igaXiK6Tjm9wQOBD1EGwW7bYWMUGKtwKJ/2QL/OWs= +github.com/onflow/crypto v0.25.4 h1:R615PWPdSoA5RATNb/j3cYaloBIZlSXVNgS7BjwHiwM= +github.com/onflow/crypto v0.25.4/go.mod h1:DlkW/1SPUvLHYvUcjWa9PkLIRgSBKR4EDc3i+ATQKW4= github.com/onflow/fixed-point v0.1.1 h1:j0jYZVO8VGyk1476alGudEg7XqCkeTVxb5ElRJRKS90= github.com/onflow/fixed-point v0.1.1/go.mod h1:gJdoHqKtToKdOZbvryJvDZfcpzC7d2fyWuo3ZmLtcGY= github.com/onflow/flow v0.4.15 h1:MdrhULSE5iSYNyLCihH8DI4uab5VciVZUKDFON6zylY= diff --git a/insecure/go.mod b/insecure/go.mod index 388cd9b518c..a38ceb8e297 100644 --- a/insecure/go.mod +++ b/insecure/go.mod @@ -1,6 +1,6 @@ module github.com/onflow/flow-go/insecure -go 1.25.0 +go 1.25.1 require ( github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 @@ -10,7 +10,7 @@ require ( github.com/libp2p/go-libp2p v0.38.2 github.com/libp2p/go-libp2p-pubsub v0.13.0 github.com/multiformats/go-multiaddr-dns v0.4.1 - github.com/onflow/crypto v0.25.3 + github.com/onflow/crypto v0.25.4 github.com/onflow/flow-go v0.36.2-0.20240717162253-d5d2e606ef53 github.com/rs/zerolog v1.29.0 github.com/spf13/pflag v1.0.6 diff --git a/insecure/go.sum b/insecure/go.sum index 59057e697f3..5e8f0d4479c 100644 --- a/insecure/go.sum +++ b/insecure/go.sum @@ -894,8 +894,8 @@ github.com/onflow/boxo v0.0.0-20240201202436-f2477b92f483 h1:LpiQhTAfM9CAmNVEs0n github.com/onflow/boxo v0.0.0-20240201202436-f2477b92f483/go.mod h1:pIZgTWdm3k3pLF9Uq6MB8JEcW07UDwNJjlXW1HELW80= github.com/onflow/cadence v1.9.5 h1:m82RsERxvrknL69J9YxzOEKFhiHARBQkvNIFTUATGNk= github.com/onflow/cadence v1.9.5/go.mod h1:MlJsCwhCZwdnAUd24XHzcsizZfG7a2leab1PztabUsE= -github.com/onflow/crypto v0.25.3 h1:XQ3HtLsw8h1+pBN+NQ1JYM9mS2mVXTyg55OldaAIF7U= -github.com/onflow/crypto v0.25.3/go.mod h1:+1igaXiK6Tjm9wQOBD1EGwW7bYWMUGKtwKJ/2QL/OWs= +github.com/onflow/crypto v0.25.4 h1:R615PWPdSoA5RATNb/j3cYaloBIZlSXVNgS7BjwHiwM= +github.com/onflow/crypto v0.25.4/go.mod h1:DlkW/1SPUvLHYvUcjWa9PkLIRgSBKR4EDc3i+ATQKW4= github.com/onflow/fixed-point v0.1.1 h1:j0jYZVO8VGyk1476alGudEg7XqCkeTVxb5ElRJRKS90= github.com/onflow/fixed-point v0.1.1/go.mod h1:gJdoHqKtToKdOZbvryJvDZfcpzC7d2fyWuo3ZmLtcGY= github.com/onflow/flow-core-contracts/lib/go/contracts v1.9.2 h1:mkd1NSv74+OnCHwrFqI2c5VETS1j06xf0ZuOto7gMio= diff --git a/integration/go.mod b/integration/go.mod index 92feabca203..cd69c24cba1 100644 --- a/integration/go.mod +++ b/integration/go.mod @@ -1,6 +1,6 @@ module github.com/onflow/flow-go/integration -go 1.25.0 +go 1.25.1 require ( cloud.google.com/go/bigquery v1.72.0 @@ -22,7 +22,7 @@ require ( github.com/ipfs/go-ds-pebble v0.5.0 github.com/libp2p/go-libp2p v0.38.2 github.com/onflow/cadence v1.9.5 - github.com/onflow/crypto v0.25.3 + github.com/onflow/crypto v0.25.4 github.com/onflow/flow v0.4.15 github.com/onflow/flow-core-contracts/lib/go/contracts v1.9.2 github.com/onflow/flow-core-contracts/lib/go/templates v1.9.2 diff --git a/integration/go.sum b/integration/go.sum index 8e0f66ddc4c..b5e4b8b9934 100644 --- a/integration/go.sum +++ b/integration/go.sum @@ -768,8 +768,8 @@ github.com/onflow/boxo v0.0.0-20240201202436-f2477b92f483 h1:LpiQhTAfM9CAmNVEs0n github.com/onflow/boxo v0.0.0-20240201202436-f2477b92f483/go.mod h1:pIZgTWdm3k3pLF9Uq6MB8JEcW07UDwNJjlXW1HELW80= github.com/onflow/cadence v1.9.5 h1:m82RsERxvrknL69J9YxzOEKFhiHARBQkvNIFTUATGNk= github.com/onflow/cadence v1.9.5/go.mod h1:MlJsCwhCZwdnAUd24XHzcsizZfG7a2leab1PztabUsE= -github.com/onflow/crypto v0.25.3 h1:XQ3HtLsw8h1+pBN+NQ1JYM9mS2mVXTyg55OldaAIF7U= -github.com/onflow/crypto v0.25.3/go.mod h1:+1igaXiK6Tjm9wQOBD1EGwW7bYWMUGKtwKJ/2QL/OWs= +github.com/onflow/crypto v0.25.4 h1:R615PWPdSoA5RATNb/j3cYaloBIZlSXVNgS7BjwHiwM= +github.com/onflow/crypto v0.25.4/go.mod h1:DlkW/1SPUvLHYvUcjWa9PkLIRgSBKR4EDc3i+ATQKW4= github.com/onflow/fixed-point v0.1.1 h1:j0jYZVO8VGyk1476alGudEg7XqCkeTVxb5ElRJRKS90= github.com/onflow/fixed-point v0.1.1/go.mod h1:gJdoHqKtToKdOZbvryJvDZfcpzC7d2fyWuo3ZmLtcGY= github.com/onflow/flow v0.4.15 h1:MdrhULSE5iSYNyLCihH8DI4uab5VciVZUKDFON6zylY= From cafe04be8973dbcafc95d587b419afe0fb067d3b Mon Sep 17 00:00:00 2001 From: Tarak Ben Youssef Date: Thu, 22 Jan 2026 00:52:12 +0800 Subject: [PATCH 3/3] revert a minor makefile change --- crypto_adx_flag.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_adx_flag.mk b/crypto_adx_flag.mk index b21ca39ca1c..ca25829f8f2 100644 --- a/crypto_adx_flag.mk +++ b/crypto_adx_flag.mk @@ -26,5 +26,5 @@ ifeq ($(ADX_SUPPORT), 1) CRYPTO_FLAG := "" else # if ADX instructions aren't supported, this CGO flags uses a slower non-ADX implementation - CRYPTO_FLAG := "$(DISABLE_ADX)" + CRYPTO_FLAG := $(DISABLE_ADX) endif \ No newline at end of file