From 3b78afa4b118fbdfd66ec1ad054954fe22f1b77b Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Sun, 12 Apr 2026 21:12:02 +0200 Subject: [PATCH 01/14] use nimble 0.22.3 --- Makefile | 53 +-- nimble.lock | 750 ++++++++++++++++++++++------------------- scripts/install_nim.sh | 72 ++++ waku.nimble | 12 +- 4 files changed, 493 insertions(+), 394 deletions(-) create mode 100755 scripts/install_nim.sh diff --git a/Makefile b/Makefile index cabeec80f..99fa24208 100644 --- a/Makefile +++ b/Makefile @@ -18,8 +18,11 @@ ifneq (,$(findstring MINGW,$(detected_OS))) detected_OS := Windows endif +# Ensure the nim/nimble installed by install-nim/install-nimble are found first +export PATH := $(HOME)/.nimble/bin:$(PATH) + # NIM binary location -NIM_BINARY := $(shell which nim) +NIM_BINARY := $(shell which nim 2>/dev/null) NPH := $(HOME)/.nimble/bin/nph NIMBLEDEPS_STAMP := nimbledeps/.nimble-setup @@ -39,7 +42,7 @@ endif ########## ## Main ## ########## -.PHONY: all test update clean examples deps nimble +.PHONY: all test update clean examples deps nimble install-nim install-nimble # default target all: | wakunode2 libwaku liblogosdelivery @@ -67,7 +70,7 @@ waku.nims: ln -s waku.nimble $@ $(NIMBLEDEPS_STAMP): nimble.lock | waku.nims - @if ! command -v nimble > /dev/null 2>&1; then $(MAKE) install-nimble; fi + $(MAKE) install-nimble nimble setup --localdeps $(MAKE) build-nph $(MAKE) rebuild-bearssl-nimbledeps @@ -86,54 +89,24 @@ clean: rm nimble.paths 2> /dev/null || true nimble clean -REQUIRED_NIM_VERSION := $(shell grep -E '^const NimVersion\s*=' waku.nimble | grep -oE '"[0-9]+\.[0-9]+\.[0-9]+"' | tr -d '"') -REQUIRED_NIMBLE_VERSION := $(shell grep -E '^const NimbleVersion\s*=' waku.nimble | grep -oE '"[0-9]+\.[0-9]+\.[0-9]+"' | tr -d '"') +REQUIRED_NIM_VERSION := $(shell grep -E '^const RequiredNimVersion\s*=' waku.nimble | grep -oE '"[0-9]+\.[0-9]+\.[0-9]+"' | tr -d '"') +REQUIRED_NIMBLE_VERSION := $(shell grep -E '^const RequiredNimbleVersion\s*=' waku.nimble | grep -oE '"[0-9]+\.[0-9]+\.[0-9]+"' | tr -d '"') install-nim: - $(eval NIM_OS := $(shell uname -s | tr 'A-Z' 'a-z' | sed 's/darwin/macosx/')) - $(eval NIM_ARCH := $(shell uname -m | sed 's/x86_64/x64/;s/aarch64/arm64/')) - $(eval NIM_INSTALL_DIR := $(HOME)/.nim_runtime) - @nim_ver=$$(nim --version 2>/dev/null | head -1 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1); \ - if [ "$$nim_ver" = "$(REQUIRED_NIM_VERSION)" ]; then \ - echo "nim $(REQUIRED_NIM_VERSION) already installed, skipping."; \ - else \ - curl -L "https://github.com/nim-lang/Nim/releases/download/v$(REQUIRED_NIM_VERSION)/nim-$(REQUIRED_NIM_VERSION)-$(NIM_OS)_$(NIM_ARCH).tar.xz" \ - -o /tmp/nim-$(REQUIRED_NIM_VERSION).tar.xz && \ - tar -xJf /tmp/nim-$(REQUIRED_NIM_VERSION).tar.xz -C /tmp && \ - mkdir -p $(NIM_INSTALL_DIR) && \ - cd /tmp/nim-$(REQUIRED_NIM_VERSION) && ./install.sh $(NIM_INSTALL_DIR); \ - fi + scripts/install_nim.sh $(REQUIRED_NIM_VERSION) install-nimble: install-nim @nimble_ver=$$(nimble --version 2>/dev/null | head -1 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1); \ if [ "$$nimble_ver" = "$(REQUIRED_NIMBLE_VERSION)" ]; then \ echo "nimble $(REQUIRED_NIMBLE_VERSION) already installed, skipping."; \ else \ - cd /tmp && PATH="$(HOME)/.nim_runtime/bin:$$PATH" \ - nimble install "nimble@$(REQUIRED_NIMBLE_VERSION)" -y; \ + nimble install "nimble@$(REQUIRED_NIMBLE_VERSION)" -y; \ fi build: - @nim_ver=$$(nim --version 2>/dev/null | head -1 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1); \ - if [ "$$nim_ver" != "$(REQUIRED_NIM_VERSION)" ]; then \ - echo "Error: Nim $(REQUIRED_NIM_VERSION) is required, but found '$$nim_ver'"; \ - exit 1; \ - fi - @nimble_ver=$$(nimble --version 2>/dev/null | head -1 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1); \ - if [ "$$nimble_ver" != "$(REQUIRED_NIMBLE_VERSION)" ]; then \ - echo "Error: Nimble $(REQUIRED_NIMBLE_VERSION) is required, but found '$$nimble_ver'"; \ - exit 1; \ - fi mkdir -p build -nimble: - echo "Inside nimble target, checking for nimble..." && \ - command -v nimble >/dev/null 2>&1 || { \ - mv nimbledeps nimbledeps_backup 2>/dev/null || true; \ - echo "choosenim not found, installing ..."; \ - curl -sSf https://nim-lang.org/choosenim/init.sh | sh; \ - mv nimbledeps_backup nimbledeps 2>/dev/null || true; \ - } +nimble: install-nimble ## Possible values: prod; debug TARGET ?= prod @@ -230,7 +203,7 @@ clean: | clean-librln ################# .PHONY: testcommon -testcommon: | build +testcommon: | $(NIMBLEDEPS_STAMP) build echo -e $(BUILD_MSG) "build/$@" && \ nimble testcommon @@ -239,7 +212,7 @@ testcommon: | build ########## .PHONY: testwaku wakunode2 testwakunode2 example2 chat2 chat2bridge liteprotocoltester -testwaku: | build rln-deps librln +testwaku: | $(NIMBLEDEPS_STAMP) build rln-deps librln echo -e $(BUILD_MSG) "build/$@" && \ nimble test diff --git a/nimble.lock b/nimble.lock index 96f64baf3..978ea926f 100644 --- a/nimble.lock +++ b/nimble.lock @@ -1,103 +1,66 @@ { "version": 2, "packages": { + "nim": { + "version": "2.2.4", + "vcsRevision": "911e0dbb1f76de61fa0215ab1bb85af5334cc9a8", + "url": "https://github.com/nim-lang/Nim.git", + "downloadMethod": "git", + "dependencies": [], + "checksums": { + "sha1": "68bb85cbfb1832ce4db43943911b046c3af3caab" + } + }, "unittest2": { "version": "0.2.5", "vcsRevision": "26f2ef3ae0ec72a2a75bfe557e02e88f6a31c189", "url": "https://github.com/status-im/nim-unittest2", "downloadMethod": "git", - "dependencies": [], + "dependencies": [ + "nim" + ], "checksums": { "sha1": "02bb3751ba9ddc3c17bfd89f2e41cb6bfb8fc0c9" } }, "bearssl": { - "version": "0.2.7", - "vcsRevision": "3b341f30d8c619b9a75c154243f9a55468a404e2", + "version": "0.2.8", + "vcsRevision": "22c6a76ce015bc07e011562bdcfc51d9446c1e82", "url": "https://github.com/status-im/nim-bearssl", "downloadMethod": "git", "dependencies": [ + "nim", "unittest2" ], "checksums": { - "sha1": "a85aab15b1b9a8b2438e9a128ac2eba41227da79" + "sha1": "da4dd7ae96d536bdaf42dca9c85d7aed024b6a86" } }, "bearssl_pkey_decoder": { - "version": "0.1.0", + "version": "#21dd3710df9345ed2ad8bf8f882761e07863b8e0", "vcsRevision": "21dd3710df9345ed2ad8bf8f882761e07863b8e0", "url": "https://github.com/vacp2p/bearssl_pkey_decoder", "downloadMethod": "git", "dependencies": [ + "nim", "bearssl" ], "checksums": { "sha1": "21b42e2e6ddca6c875d3fc50f36a5115abf51714" } }, - "results": { - "version": "0.5.1", - "vcsRevision": "df8113dda4c2d74d460a8fa98252b0b771bf1f27", - "url": "https://github.com/arnetheduck/nim-results", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "a9c011f74bc9ed5c91103917b9f382b12e82a9e7" - } - }, - "stew": { - "version": "0.5.0", - "vcsRevision": "4382b18f04b3c43c8409bfcd6b62063773b2bbaa", - "url": "https://github.com/status-im/nim-stew", + "jwt": { + "version": "#18f8378de52b241f321c1f9ea905456e89b95c6f", + "vcsRevision": "18f8378de52b241f321c1f9ea905456e89b95c6f", + "url": "https://github.com/vacp2p/nim-jwt.git", "downloadMethod": "git", "dependencies": [ - "results", - "unittest2" + "nim", + "bearssl", + "bearssl_pkey_decoder" ], "checksums": { - "sha1": "db22942939773ab7d5a0f2b2668c237240c67dd6" - } - }, - "faststreams": { - "version": "0.5.0", - "vcsRevision": "ce27581a3e881f782f482cb66dc5b07a02bd615e", - "url": "https://github.com/status-im/nim-faststreams", - "downloadMethod": "git", - "dependencies": [ - "stew", - "unittest2" - ], - "checksums": { - "sha1": "ee61e507b805ae1df7ec936f03f2d101b0d72383" - } - }, - "serialization": { - "version": "0.5.2", - "vcsRevision": "b0f2fa32960ea532a184394b0f27be37bd80248b", - "url": "https://github.com/status-im/nim-serialization", - "downloadMethod": "git", - "dependencies": [ - "faststreams", - "unittest2", - "stew" - ], - "checksums": { - "sha1": "fa35c1bb76a0a02a2379fe86eaae0957c7527cb8" - } - }, - "json_serialization": { - "version": "0.4.4", - "vcsRevision": "c343b0e243d9e17e2c40f3a8a24340f7c4a71d44", - "url": "https://github.com/status-im/nim-json-serialization", - "downloadMethod": "git", - "dependencies": [ - "faststreams", - "serialization", - "stew", - "results" - ], - "checksums": { - "sha1": "8b3115354104858a0ac9019356fb29720529c2bd" + "sha1": "bcfd6fc9c5e10a52b87117219b7ab5c98136bc8e" } }, "testutils": { @@ -106,25 +69,76 @@ "url": "https://github.com/status-im/nim-testutils", "downloadMethod": "git", "dependencies": [ + "nim", "unittest2" ], "checksums": { "sha1": "96a11cf8b84fa9bd12d4a553afa1cc4b7f9df4e3" } }, - "chronicles": { - "version": "0.12.2", - "vcsRevision": "27ec507429a4eb81edc20f28292ee8ec420be05b", - "url": "https://github.com/status-im/nim-chronicles", + "db_connector": { + "version": "0.1.0", + "vcsRevision": "29450a2063970712422e1ab857695c12d80112a6", + "url": "https://github.com/nim-lang/db_connector", "downloadMethod": "git", "dependencies": [ - "faststreams", - "serialization", - "json_serialization", - "testutils" + "nim" ], "checksums": { - "sha1": "02febb20d088120b2836d3306cfa21f434f88f65" + "sha1": "4f2e67d0e4b61af9ac5575509305660b473f01a4" + } + }, + "results": { + "version": "0.5.1", + "vcsRevision": "df8113dda4c2d74d460a8fa98252b0b771bf1f27", + "url": "https://github.com/arnetheduck/nim-results", + "downloadMethod": "git", + "dependencies": [ + "nim" + ], + "checksums": { + "sha1": "a9c011f74bc9ed5c91103917b9f382b12e82a9e7" + } + }, + "nat_traversal": { + "version": "0.0.1", + "vcsRevision": "860e18c37667b5dd005b94c63264560c35d88004", + "url": "https://github.com/status-im/nim-nat-traversal", + "downloadMethod": "git", + "dependencies": [ + "nim", + "results" + ], + "checksums": { + "sha1": "1a376d3e710590ef2c48748a546369755f0a7c97" + } + }, + "stew": { + "version": "0.5.0", + "vcsRevision": "4382b18f04b3c43c8409bfcd6b62063773b2bbaa", + "url": "https://github.com/status-im/nim-stew", + "downloadMethod": "git", + "dependencies": [ + "nim", + "results", + "unittest2" + ], + "checksums": { + "sha1": "db22942939773ab7d5a0f2b2668c237240c67dd6" + } + }, + "zlib": { + "version": "0.1.0", + "vcsRevision": "e680f269fb01af2c34a2ba879ff281795a5258fe", + "url": "https://github.com/status-im/nim-zlib", + "downloadMethod": "git", + "dependencies": [ + "nim", + "stew", + "results" + ], + "checksums": { + "sha1": "bbde4f5a97a84b450fef7d107461e5f35cf2b47f" } }, "httputils": { @@ -133,6 +147,7 @@ "url": "https://github.com/status-im/nim-http-utils", "downloadMethod": "git", "dependencies": [ + "nim", "stew", "results", "unittest2" @@ -147,6 +162,7 @@ "url": "https://github.com/status-im/nim-chronos", "downloadMethod": "git", "dependencies": [ + "nim", "results", "stew", "bearssl", @@ -157,95 +173,13 @@ "sha1": "3a4c9477df8cef20a04e4f1b54a2d74fdfc2a3d0" } }, - "confutils": { - "version": "0.1.0", - "vcsRevision": "7728f6bd81a1eedcfe277d02ea85fdb805bcc05a", - "url": "https://github.com/status-im/nim-confutils", - "downloadMethod": "git", - "dependencies": [ - "stew", - "serialization", - "results" - ], - "checksums": { - "sha1": "8bc8c30b107fdba73b677e5f257c6c42ae1cdc8e" - } - }, - "db_connector": { - "version": "0.1.0", - "vcsRevision": "29450a2063970712422e1ab857695c12d80112a6", - "url": "https://github.com/nim-lang/db_connector", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "4f2e67d0e4b61af9ac5575509305660b473f01a4" - } - }, - "dnsclient": { - "version": "0.3.4", - "vcsRevision": "23214235d4784d24aceed99bbfe153379ea557c8", - "url": "https://github.com/ba0f3/dnsclient.nim", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "65262c7e533ff49d6aca5539da4bc6c6ce132f40" - } - }, - "nimcrypto": { - "version": "0.6.4", - "vcsRevision": "721fb99ee099b632eb86dfad1f0d96ee87583774", - "url": "https://github.com/cheatfate/nimcrypto", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "f9ab24fa940ed03d0fb09729a7303feb50b7eaec" - } - }, - "stint": { - "version": "0.8.2", - "vcsRevision": "470b7892561b5179ab20bd389a69217d6213fe58", - "url": "https://github.com/status-im/nim-stint", - "downloadMethod": "git", - "dependencies": [ - "stew", - "unittest2" - ], - "checksums": { - "sha1": "d8f871fd617e7857192d4609fe003b48942a8ae5" - } - }, - "secp256k1": { - "version": "0.6.0.3.2", - "vcsRevision": "d8f1288b7c72f00be5fc2c5ea72bf5cae1eafb15", - "url": "https://github.com/status-im/nim-secp256k1", - "downloadMethod": "git", - "dependencies": [ - "stew", - "results", - "nimcrypto" - ], - "checksums": { - "sha1": "6618ef9de17121846a8c1d0317026b0ce8584e10" - } - }, - "nat_traversal": { - "version": "0.0.1", - "vcsRevision": "860e18c37667b5dd005b94c63264560c35d88004", - "url": "https://github.com/status-im/nim-nat-traversal", - "downloadMethod": "git", - "dependencies": [ - "results" - ], - "checksums": { - "sha1": "1a376d3e710590ef2c48748a546369755f0a7c97" - } - }, "metrics": { "version": "0.2.1", "vcsRevision": "a1296caf3ebb5f30f51a5feae7749a30df2824c2", "url": "https://github.com/status-im/nim-metrics", "downloadMethod": "git", "dependencies": [ + "nim", "chronos", "results", "stew" @@ -254,27 +188,18 @@ "sha1": "84bb09873d7677c06046f391c7b473cd2fcff8a2" } }, - "sqlite3_abi": { - "version": "3.52.0.0", - "vcsRevision": "4b79c5e1882b7fc6c00aec311daf1ed50ad653d5", - "url": "https://github.com/arnetheduck/nim-sqlite3-abi", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "b56b489a7cb01eef8821d66d38d411923a14316d" - } - }, - "minilru": { - "version": "0.1.0", - "vcsRevision": "6dd93feb60f4cded3c05e7af7209cf63fb677893", - "url": "https://github.com/status-im/nim-minilru", + "faststreams": { + "version": "0.5.0", + "vcsRevision": "ce27581a3e881f782f482cb66dc5b07a02bd615e", + "url": "https://github.com/status-im/nim-faststreams", "downloadMethod": "git", "dependencies": [ - "results", + "nim", + "stew", "unittest2" ], "checksums": { - "sha1": "0be03a5da29fdd4409ea74a60fd0ccce882601b4" + "sha1": "ee61e507b805ae1df7ec936f03f2d101b0d72383" } }, "snappy": { @@ -283,6 +208,7 @@ "url": "https://github.com/status-im/nim-snappy", "downloadMethod": "git", "dependencies": [ + "nim", "faststreams", "unittest2", "results", @@ -292,12 +218,271 @@ "sha1": "e572d60d6a3178c5b1cde2400c51ad771812cd3d" } }, + "serialization": { + "version": "0.5.2", + "vcsRevision": "b0f2fa32960ea532a184394b0f27be37bd80248b", + "url": "https://github.com/status-im/nim-serialization", + "downloadMethod": "git", + "dependencies": [ + "nim", + "faststreams", + "unittest2", + "stew" + ], + "checksums": { + "sha1": "fa35c1bb76a0a02a2379fe86eaae0957c7527cb8" + } + }, + "toml_serialization": { + "version": "0.2.18", + "vcsRevision": "b5b387e6fb2a7cc75d54a269b07cc6218361bd46", + "url": "https://github.com/status-im/nim-toml-serialization", + "downloadMethod": "git", + "dependencies": [ + "nim", + "faststreams", + "serialization", + "stew" + ], + "checksums": { + "sha1": "76ae1c2af5dd092849b41750ff29217980dc9ca3" + } + }, + "confutils": { + "version": "0.1.0", + "vcsRevision": "7728f6bd81a1eedcfe277d02ea85fdb805bcc05a", + "url": "https://github.com/status-im/nim-confutils", + "downloadMethod": "git", + "dependencies": [ + "nim", + "stew", + "serialization", + "results" + ], + "checksums": { + "sha1": "8bc8c30b107fdba73b677e5f257c6c42ae1cdc8e" + } + }, + "json_serialization": { + "version": "0.4.4", + "vcsRevision": "c343b0e243d9e17e2c40f3a8a24340f7c4a71d44", + "url": "https://github.com/status-im/nim-json-serialization", + "downloadMethod": "git", + "dependencies": [ + "nim", + "faststreams", + "serialization", + "stew", + "results" + ], + "checksums": { + "sha1": "8b3115354104858a0ac9019356fb29720529c2bd" + } + }, + "chronicles": { + "version": "0.12.2", + "vcsRevision": "27ec507429a4eb81edc20f28292ee8ec420be05b", + "url": "https://github.com/status-im/nim-chronicles", + "downloadMethod": "git", + "dependencies": [ + "nim", + "faststreams", + "serialization", + "json_serialization", + "testutils" + ], + "checksums": { + "sha1": "02febb20d088120b2836d3306cfa21f434f88f65" + } + }, + "presto": { + "version": "0.1.1", + "vcsRevision": "d66043dd7ede146442e6c39720c76a20bde5225f", + "url": "https://github.com/status-im/nim-presto", + "downloadMethod": "git", + "dependencies": [ + "nim", + "chronos", + "chronicles", + "metrics", + "results", + "stew" + ], + "checksums": { + "sha1": "8df97c45683abe2337bdff43b844c4fbcc124ca2" + } + }, + "stint": { + "version": "0.8.2", + "vcsRevision": "470b7892561b5179ab20bd389a69217d6213fe58", + "url": "https://github.com/status-im/nim-stint", + "downloadMethod": "git", + "dependencies": [ + "nim", + "stew", + "unittest2" + ], + "checksums": { + "sha1": "d8f871fd617e7857192d4609fe003b48942a8ae5" + } + }, + "minilru": { + "version": "0.1.0", + "vcsRevision": "6dd93feb60f4cded3c05e7af7209cf63fb677893", + "url": "https://github.com/status-im/nim-minilru", + "downloadMethod": "git", + "dependencies": [ + "nim", + "results", + "unittest2" + ], + "checksums": { + "sha1": "0be03a5da29fdd4409ea74a60fd0ccce882601b4" + } + }, + "sqlite3_abi": { + "version": "3.53.0.0", + "vcsRevision": "8240e8e2819dfce1b67fa2733135d01b5cc80ae0", + "url": "https://github.com/arnetheduck/nim-sqlite3-abi", + "downloadMethod": "git", + "dependencies": [ + "nim" + ], + "checksums": { + "sha1": "fb7a6e6f36fc4eb4dfa6634dbcbf5cd0dfd0ebf0" + } + }, + "dnsclient": { + "version": "0.3.4", + "vcsRevision": "23214235d4784d24aceed99bbfe153379ea557c8", + "url": "https://github.com/ba0f3/dnsclient.nim", + "downloadMethod": "git", + "dependencies": [ + "nim" + ], + "checksums": { + "sha1": "65262c7e533ff49d6aca5539da4bc6c6ce132f40" + } + }, + "unicodedb": { + "version": "0.13.2", + "vcsRevision": "66f2458710dc641dd4640368f9483c8a0ec70561", + "url": "https://github.com/nitely/nim-unicodedb", + "downloadMethod": "git", + "dependencies": [ + "nim" + ], + "checksums": { + "sha1": "739102d885d99bb4571b1955f5f12aee423c935b" + } + }, + "regex": { + "version": "0.26.3", + "vcsRevision": "4593305ed1e49731fc75af1dc572dd2559aad19c", + "url": "https://github.com/nitely/nim-regex", + "downloadMethod": "git", + "dependencies": [ + "nim", + "unicodedb" + ], + "checksums": { + "sha1": "4d24e7d7441137cd202e16f2359a5807ddbdc31f" + } + }, + "nimcrypto": { + "version": "0.6.4", + "vcsRevision": "721fb99ee099b632eb86dfad1f0d96ee87583774", + "url": "https://github.com/cheatfate/nimcrypto", + "downloadMethod": "git", + "dependencies": [ + "nim" + ], + "checksums": { + "sha1": "f9ab24fa940ed03d0fb09729a7303feb50b7eaec" + } + }, + "websock": { + "version": "0.3.0", + "vcsRevision": "c105d98e6522e0e2cbe3dfa11b07a273e9fd0e7b", + "url": "https://github.com/status-im/nim-websock", + "downloadMethod": "git", + "dependencies": [ + "nim", + "chronos", + "httputils", + "chronicles", + "stew", + "nimcrypto", + "bearssl", + "results", + "zlib" + ], + "checksums": { + "sha1": "1294a66520fa4541e261dec8a6a84f774fb8c0ac" + } + }, + "json_rpc": { + "version": "#43bbf499143eb45046c83ac9794c9e3280a2b8e7", + "vcsRevision": "43bbf499143eb45046c83ac9794c9e3280a2b8e7", + "url": "https://github.com/status-im/nim-json-rpc.git", + "downloadMethod": "git", + "dependencies": [ + "nim", + "stew", + "nimcrypto", + "stint", + "chronos", + "httputils", + "chronicles", + "websock", + "serialization", + "json_serialization", + "unittest2" + ], + "checksums": { + "sha1": "30ff6ead115b88c79862c5c7e37b1c9852eea59f" + } + }, + "lsquic": { + "version": "#4fb03ee7bfb39aecb3316889fdcb60bec3d0936f", + "vcsRevision": "4fb03ee7bfb39aecb3316889fdcb60bec3d0936f", + "url": "https://github.com/vacp2p/nim-lsquic", + "downloadMethod": "git", + "dependencies": [ + "nim", + "zlib", + "stew", + "chronos", + "nimcrypto", + "unittest2", + "chronicles" + ], + "checksums": { + "sha1": "f465fa994346490d0924d162f53d9b5aec62f948" + } + }, + "secp256k1": { + "version": "0.6.0.3.2", + "vcsRevision": "d8f1288b7c72f00be5fc2c5ea72bf5cae1eafb15", + "url": "https://github.com/status-im/nim-secp256k1", + "downloadMethod": "git", + "dependencies": [ + "nim", + "stew", + "results", + "nimcrypto" + ], + "checksums": { + "sha1": "6618ef9de17121846a8c1d0317026b0ce8584e10" + } + }, "eth": { "version": "0.9.0", "vcsRevision": "d9135e6c3c5d6d819afdfb566aa8d958756b73a8", "url": "https://github.com/status-im/nim-eth", "downloadMethod": "git", "dependencies": [ + "nim", "nimcrypto", "stint", "secp256k1", @@ -318,12 +503,37 @@ "sha1": "2e01b0cfff9523d110562af70d19948280f8013e" } }, + "web3": { + "version": "0.8.0", + "vcsRevision": "cdfe5601d2812a58e54faf53ee634452d01e5918", + "url": "https://github.com/status-im/nim-web3", + "downloadMethod": "git", + "dependencies": [ + "nim", + "chronicles", + "chronos", + "bearssl", + "eth", + "faststreams", + "json_rpc", + "serialization", + "json_serialization", + "nimcrypto", + "stew", + "stint", + "results" + ], + "checksums": { + "sha1": "26a112af032ef1536f97da2ca7364af618a11b80" + } + }, "dnsdisc": { "version": "0.1.0", "vcsRevision": "38f2e0f52c0a8f032ef4530835e519d550706d9e", "url": "https://github.com/status-im/nim-dnsdisc", "downloadMethod": "git", "dependencies": [ + "nim", "bearssl", "chronicles", "chronos", @@ -339,119 +549,13 @@ "sha1": "055b882a0f6b1d1e57a25a7af99d2e5ac6268154" } }, - "taskpools": { - "version": "0.1.0", - "vcsRevision": "9e8ccc754631ac55ac2fd495e167e74e86293edb", - "url": "https://github.com/status-im/nim-taskpools", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "09e1b2fdad55b973724d61227971afc0df0b7a81" - } - }, - "ffi": { - "version": "0.1.3", - "vcsRevision": "06111de155253b34e47ed2aaed1d61d08d62cc1b", - "url": "https://github.com/logos-messaging/nim-ffi", - "downloadMethod": "git", - "dependencies": [ - "chronos", - "chronicles", - "taskpools" - ], - "checksums": { - "sha1": "6f9d49375ea1dc71add55c72ac80a808f238e5b0" - } - }, - "zlib": { - "version": "0.1.0", - "vcsRevision": "e680f269fb01af2c34a2ba879ff281795a5258fe", - "url": "https://github.com/status-im/nim-zlib", - "downloadMethod": "git", - "dependencies": [ - "stew", - "results" - ], - "checksums": { - "sha1": "bbde4f5a97a84b450fef7d107461e5f35cf2b47f" - } - }, - "websock": { - "version": "0.2.2", - "vcsRevision": "3918ce3900c83e1cc7496232a307709f195f7acd", - "url": "https://github.com/status-im/nim-websock", - "downloadMethod": "git", - "dependencies": [ - "chronos", - "httputils", - "chronicles", - "stew", - "nimcrypto", - "bearssl", - "results", - "zlib" - ], - "checksums": { - "sha1": "3c424661eff56c925b01e1cd1a911ff744e72962" - } - }, - "json_rpc": { - "version": "0.5.4", - "vcsRevision": "b6e40a776fa2d00b97a9366761fb7da18f31ae5c", - "url": "https://github.com/status-im/nim-json-rpc", - "downloadMethod": "git", - "dependencies": [ - "stew", - "nimcrypto", - "stint", - "chronos", - "httputils", - "chronicles", - "websock", - "serialization", - "json_serialization", - "unittest2" - ], - "checksums": { - "sha1": "d8e8be795fcf098f4ce03b5826f6b3153f6a6e07" - } - }, - "jwt": { - "version": "0.2", - "vcsRevision": "18f8378de52b241f321c1f9ea905456e89b95c6f", - "url": "https://github.com/vacp2p/nim-jwt.git", - "downloadMethod": "git", - "dependencies": [ - "bearssl", - "bearssl_pkey_decoder" - ], - "checksums": { - "sha1": "bcfd6fc9c5e10a52b87117219b7ab5c98136bc8e" - } - }, - "lsquic": { - "version": "0.0.1", - "vcsRevision": "4fb03ee7bfb39aecb3316889fdcb60bec3d0936f", - "url": "https://github.com/vacp2p/nim-lsquic", - "downloadMethod": "git", - "dependencies": [ - "zlib", - "stew", - "chronos", - "nimcrypto", - "unittest2", - "chronicles" - ], - "checksums": { - "sha1": "f465fa994346490d0924d162f53d9b5aec62f948" - } - }, "libp2p": { - "version": "1.15.2", + "version": "#ff8d51857b4b79a68468e7bcc27b2026cca02996", "vcsRevision": "ff8d51857b4b79a68468e7bcc27b2026cca02996", "url": "https://github.com/vacp2p/nim-libp2p.git", "downloadMethod": "git", "dependencies": [ + "nim", "nimcrypto", "dnsclient", "bearssl", @@ -471,79 +575,31 @@ "sha1": "fa2a7552c6ec860717b77ce34cf0b7afe4570234" } }, - "presto": { - "version": "0.1.1", - "vcsRevision": "d66043dd7ede146442e6c39720c76a20bde5225f", - "url": "https://github.com/status-im/nim-presto", + "taskpools": { + "version": "0.1.0", + "vcsRevision": "9e8ccc754631ac55ac2fd495e167e74e86293edb", + "url": "https://github.com/status-im/nim-taskpools", "downloadMethod": "git", "dependencies": [ + "nim" + ], + "checksums": { + "sha1": "09e1b2fdad55b973724d61227971afc0df0b7a81" + } + }, + "ffi": { + "version": "0.1.3", + "vcsRevision": "06111de155253b34e47ed2aaed1d61d08d62cc1b", + "url": "https://github.com/logos-messaging/nim-ffi", + "downloadMethod": "git", + "dependencies": [ + "nim", "chronos", "chronicles", - "metrics", - "results", - "stew" + "taskpools" ], "checksums": { - "sha1": "8df97c45683abe2337bdff43b844c4fbcc124ca2" - } - }, - "unicodedb": { - "version": "0.13.2", - "vcsRevision": "66f2458710dc641dd4640368f9483c8a0ec70561", - "url": "https://github.com/nitely/nim-unicodedb", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "739102d885d99bb4571b1955f5f12aee423c935b" - } - }, - "regex": { - "version": "0.26.3", - "vcsRevision": "4593305ed1e49731fc75af1dc572dd2559aad19c", - "url": "https://github.com/nitely/nim-regex", - "downloadMethod": "git", - "dependencies": [ - "unicodedb" - ], - "checksums": { - "sha1": "4d24e7d7441137cd202e16f2359a5807ddbdc31f" - } - }, - "toml_serialization": { - "version": "0.2.18", - "vcsRevision": "b5b387e6fb2a7cc75d54a269b07cc6218361bd46", - "url": "https://github.com/status-im/nim-toml-serialization", - "downloadMethod": "git", - "dependencies": [ - "faststreams", - "serialization", - "stew" - ], - "checksums": { - "sha1": "76ae1c2af5dd092849b41750ff29217980dc9ca3" - } - }, - "web3": { - "version": "0.8.0", - "vcsRevision": "cdfe5601d2812a58e54faf53ee634452d01e5918", - "url": "https://github.com/status-im/nim-web3", - "downloadMethod": "git", - "dependencies": [ - "chronicles", - "chronos", - "bearssl", - "eth", - "faststreams", - "json_rpc", - "serialization", - "json_serialization", - "nimcrypto", - "stew", - "stint", - "results" - ], - "checksums": { - "sha1": "26a112af032ef1536f97da2ca7364af618a11b80" + "sha1": "6f9d49375ea1dc71add55c72ac80a808f238e5b0" } } }, diff --git a/scripts/install_nim.sh b/scripts/install_nim.sh new file mode 100755 index 000000000..c8d0f439d --- /dev/null +++ b/scripts/install_nim.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +# Installs a specific Nim version. +# Usage: install_nim.sh +# +# Installs to ~/.nim/nim-/ and symlinks binaries into ~/.nimble/bin/, +# which is the idiomatic Nim location already on PATH. +# +# Pre-built binaries are downloaded from nim-lang.org when available. +# Falls back to building from source otherwise (e.g. macOS on older releases). + +set -e + +NIM_VERSION="${1:-}" + +if [ -z "${NIM_VERSION}" ]; then + echo "Usage: $0 " >&2 + exit 1 +fi + +# Check if the right version is already installed +nim_ver=$(nim --version 2>/dev/null | head -1 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true) +if [ "${nim_ver}" = "${NIM_VERSION}" ]; then + echo "Nim ${NIM_VERSION} already installed, skipping." + exit 0 +fi + +if [ -n "${nim_ver}" ]; then + newer=$(printf '%s\n%s\n' "${NIM_VERSION}" "${nim_ver}" | sort -V | tail -1) + if [ "${newer}" = "${nim_ver}" ]; then + echo "WARNING: Nim ${nim_ver} is installed; this repo is validated against ${NIM_VERSION}." >&2 + echo "WARNING: The build will proceed but may behave differently." >&2 + exit 0 + fi +fi + +OS=$(uname -s | tr 'A-Z' 'a-z' | sed 's/darwin/macosx/') +ARCH=$(uname -m | sed 's/x86_64/x64/;s/aarch64/arm64/') + +NIM_DEST="${HOME}/.nim/nim-${NIM_VERSION}" +BINARY_URL="https://nim-lang.org/download/nim-${NIM_VERSION}-${OS}_${ARCH}.tar.xz" +WORK_DIR=$(mktemp -d) +trap 'rm -rf "${WORK_DIR}"' EXIT + +echo "Checking for pre-built Nim ${NIM_VERSION} (${OS}_${ARCH})..." +HTTP_STATUS=$(curl -sI "${BINARY_URL}" | head -1 | grep -oE '[0-9]{3}' || true) + +if [ "${HTTP_STATUS}" = "200" ]; then + echo "Downloading pre-built binary from ${BINARY_URL}..." + curl -fL "${BINARY_URL}" -o "${WORK_DIR}/nim.tar.xz" + tar -xJf "${WORK_DIR}/nim.tar.xz" -C "${WORK_DIR}" + rm -rf "${NIM_DEST}" + mkdir -p "${HOME}/.nim" + cp -r "${WORK_DIR}/nim-${NIM_VERSION}" "${NIM_DEST}" +else + echo "No pre-built binary found for ${OS}_${ARCH}. Building from source..." + SRC_URL="https://github.com/nim-lang/Nim/archive/refs/tags/v${NIM_VERSION}.tar.gz" + curl -fL "${SRC_URL}" -o "${WORK_DIR}/nim-src.tar.gz" + tar -xzf "${WORK_DIR}/nim-src.tar.gz" -C "${WORK_DIR}" + cd "${WORK_DIR}/Nim-${NIM_VERSION}" + sh build_all.sh + rm -rf "${NIM_DEST}" + mkdir -p "${HOME}/.nim" + cp -r "${WORK_DIR}/Nim-${NIM_VERSION}" "${NIM_DEST}" +fi + +mkdir -p "${HOME}/.nimble/bin" +for bin_path in "${NIM_DEST}/bin/"*; do + ln -sf "${bin_path}" "${HOME}/.nimble/bin/$(basename "${bin_path}")" +done + +echo "Nim ${NIM_VERSION} installed to ${NIM_DEST}" +echo "Binaries symlinked in ~/.nimble/bin — ensure it is in your PATH." diff --git a/waku.nimble b/waku.nimble index 3a7956873..d99f05e84 100644 --- a/waku.nimble +++ b/waku.nimble @@ -8,13 +8,11 @@ version = "0.37.4" author = "Status Research & Development GmbH" description = "Waku, Private P2P Messaging for Resource-Restricted Devices" license = "MIT or Apache License 2.0" -#bin = @["build/waku"] -## This indicates the nim compiler version we are currently working on. It may compile with others -## but we haven't tested. -const NimVersion = "2.2.4" -## This is the underlying nimble version that gets installed after doing `choosenim 2.2.4`. -const NimbleVersion = "0.18.2" +const RequiredNimVersion = "2.2.4" + ## This is the nim compiler version that we are working on. Other versions may behave differently. +const RequiredNimbleVersion = "0.22.3" + ## Enforced nimble version to ensure a reproducible flow ### Dependencies requires "nim >= 2.2.4", @@ -41,7 +39,7 @@ requires "nim >= 2.2.4", "secp256k1", "bearssl", # RPC & APIs - "json_rpc", + "https://github.com/status-im/nim-json-rpc.git#43bbf499143eb45046c83ac9794c9e3280a2b8e7", "presto", "web3", # Database From 94d5ad40acce6c82caaf78aab76cb15d699be936 Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Sun, 12 Apr 2026 22:32:33 +0200 Subject: [PATCH 02/14] pin nimble to 0.22.3 in ci and nix --- .github/workflows/ci.yml | 2 +- .github/workflows/container-image.yml | 2 +- .github/workflows/windows-build.yml | 2 +- flake.nix | 14 +++++++++++++- nix/shell.nix | 17 ++++++++++++++--- 5 files changed, 30 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f6fcdfec..0c8b710a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ env: MAKEFLAGS: "-j${NPROC}" NIMFLAGS: "--parallelBuild:${NPROC} --colors:off -d:chronicles_colors:none" NIM_VERSION: '2.2.4' - NIMBLE_VERSION: '0.18.2' + NIMBLE_VERSION: '0.22.3' jobs: changes: # changes detection diff --git a/.github/workflows/container-image.yml b/.github/workflows/container-image.yml index c2fb9d4d2..b240bf05e 100644 --- a/.github/workflows/container-image.yml +++ b/.github/workflows/container-image.yml @@ -16,7 +16,7 @@ env: MAKEFLAGS: "-j${NPROC}" NIMFLAGS: "--parallelBuild:${NPROC}" NIM_VERSION: '2.2.4' - NIMBLE_VERSION: '0.18.2' + NIMBLE_VERSION: '0.22.3' # This workflow should not run for outside contributors # If org secrets are not available, we'll avoid building and publishing the docker image and we'll pass the workflow diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 5b0894368..f436e7417 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -10,7 +10,7 @@ on: env: NPROC: 4 NIM_VERSION: '2.2.4' - NIMBLE_VERSION: '0.18.2' + NIMBLE_VERSION: '0.22.3' jobs: build: diff --git a/flake.nix b/flake.nix index 57592722b..31d5a120c 100644 --- a/flake.nix +++ b/flake.nix @@ -36,9 +36,21 @@ forAllSystems = nixpkgs.lib.genAttrs systems; + nimbleOverlay = final: prev: { + nimble = prev.nimble.overrideAttrs (_: { + version = "0.22.3"; + src = prev.fetchFromGitHub { + owner = "nim-lang"; + repo = "nimble"; + rev = "v0.22.3"; + sha256 = "sha256-f7DYpRGVUeSi6basK1lfu5AxZpMFOSJ3oYsy+urYErg="; + }; + }); + }; + pkgsFor = system: import nixpkgs { inherit system; - overlays = [ (import rust-overlay) ]; + overlays = [ (import rust-overlay) nimbleOverlay ]; }; in { packages = forAllSystems (system: diff --git a/nix/shell.nix b/nix/shell.nix index 80e3b7930..edff468ae 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -1,5 +1,17 @@ { pkgs }: +let + nimble = pkgs.nimble.overrideAttrs (_: { + version = "0.22.3"; + src = pkgs.fetchFromGitHub { + owner = "nim-lang"; + repo = "nimble"; + rev = "v0.22.3"; + sha256 = "sha256-f7DYpRGVUeSi6basK1lfu5AxZpMFOSJ3oYsy+urYErg="; + }; + }); +in + pkgs.mkShell { inputsFrom = [ pkgs.androidShell @@ -8,13 +20,12 @@ pkgs.mkShell { pkgs.darwin.apple_sdk.frameworks.Security ]; - buildInputs = with pkgs; [ + buildInputs = (with pkgs; [ git cargo rustup rustc cmake nim-2_2 - nimble - ]; + ]) ++ [ nimble ]; # nimble pinned to 0.22.3 via let binding above } From 01392597d9ae7e2934acfae77e7259edec20d12c Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Sun, 12 Apr 2026 22:54:47 +0200 Subject: [PATCH 03/14] fix ubuntu compilation issue in nim-testutils The when defined(enable_libbacktrace): is evaluated at compile time and is false by default. When Nim loads this config.nims as a parent config during the testutils build, the libbacktrace block is silently skipped. Nothing is passed as --import. Why the old guard (not defined(disable_libbacktrace)) wasn't enough: it required someone to explicitly opt out, but disable_libbacktrace is never passed during nimble's internal dependency build invocations. The opt-in approach is safe by default. If any build in this project genuinely uses libbacktrace, you'd need to both add it to waku.nimble requires and pass -d:enable_libbacktrace explicitly. --- config.nims | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config.nims b/config.nims index 329384ac4..0f6052c9b 100644 --- a/config.nims +++ b/config.nims @@ -83,8 +83,9 @@ if not defined(macosx) and not defined(android): # add debugging symbols and original files and line numbers --debugger: native - if not (defined(windows) and defined(i386)) and not defined(disable_libbacktrace): + when defined(enable_libbacktrace): # light-weight stack traces using libbacktrace and libunwind + # opt-in: pass -d:enable_libbacktrace (requires libbacktrace in project deps) --define: nimStackTraceOverride switch("import", "libbacktrace") From 12bb46d0b61ef76e9a6009973de6872002e318b0 Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Sun, 12 Apr 2026 23:05:24 +0200 Subject: [PATCH 04/14] make windows ci to clone with LF so that checksum matches nimble.lock --- .github/workflows/windows-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index f436e7417..417b8a936 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -93,6 +93,7 @@ jobs: if: steps.cache-nimbledeps.outputs.cache-hit != 'true' run: | export PATH="$GITHUB_WORKSPACE/.nim_runtime/bin:$HOME/.nimble/bin:$PATH" + git config --global core.autocrlf false nimble setup --localdeps -y make rebuild-nat-libs-nimbledeps CC=gcc make rebuild-bearssl-nimbledeps CC=gcc From 6f5daac289504c3e75f6c29c7c2691350881794f Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Sun, 12 Apr 2026 23:19:28 +0200 Subject: [PATCH 05/14] fix: allow git to run in any directory before nimble setup --- .github/workflows/windows-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 417b8a936..9019c4a0e 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -93,7 +93,7 @@ jobs: if: steps.cache-nimbledeps.outputs.cache-hit != 'true' run: | export PATH="$GITHUB_WORKSPACE/.nim_runtime/bin:$HOME/.nimble/bin:$PATH" - git config --global core.autocrlf false + git config --global --add safe.directory '*' nimble setup --localdeps -y make rebuild-nat-libs-nimbledeps CC=gcc make rebuild-bearssl-nimbledeps CC=gcc From 9307e225fd6703f9bd50c5f32e0bf33edce64e05 Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Sun, 12 Apr 2026 23:43:03 +0200 Subject: [PATCH 06/14] try to fix checksum issue on windows --- .github/workflows/windows-build.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 9019c4a0e..45429f103 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -89,11 +89,20 @@ jobs: nimble.paths key: ${{ runner.os }}-nimbledeps-${{ hashFiles('nimble.lock', 'BearSSL.mk', 'Nat.mk') }} + - name: Configure Windows Git line endings + # nimble.exe is a Windows binary that spawns Windows Git (not MSYS2 git). + # Windows Git reads %USERPROFILE%\.gitconfig (C:\Users\\.gitconfig), + # which is a different file from MSYS2's ~/,gitconfig (C:\msys64\home\\.gitconfig). + # core.autocrlf defaults to true on Windows, which converts LF→CRLF on checkout + # and causes nimble's SHA1 checksum to differ from the Linux-computed value in nimble.lock. + run: | + "/c/Program Files/Git/bin/git.exe" config --global core.autocrlf false + "/c/Program Files/Git/bin/git.exe" config --global --add safe.directory '*' + - name: Install nimble deps if: steps.cache-nimbledeps.outputs.cache-hit != 'true' run: | export PATH="$GITHUB_WORKSPACE/.nim_runtime/bin:$HOME/.nimble/bin:$PATH" - git config --global --add safe.directory '*' nimble setup --localdeps -y make rebuild-nat-libs-nimbledeps CC=gcc make rebuild-bearssl-nimbledeps CC=gcc From f00d24039ed7903a2a8236fefa089f1337377c8f Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Sun, 12 Apr 2026 23:59:13 +0200 Subject: [PATCH 07/14] make cache depend on nimble version to force clean cache on nimble version change --- .github/workflows/ci.yml | 6 +++--- .github/workflows/container-image.yml | 2 +- .github/workflows/windows-build.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c8b710a0..b45853e21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,7 +83,7 @@ jobs: path: | nimbledeps/ nimble.paths - key: ${{ runner.os }}-nimbledeps-${{ hashFiles('nimble.lock', 'BearSSL.mk', 'Nat.mk') }} + key: ${{ runner.os }}-nimbledeps-nimble${{ env.NIMBLE_VERSION }}-${{ hashFiles('nimble.lock', 'BearSSL.mk', 'Nat.mk') }} - name: Install nimble deps if: steps.cache-nimbledeps.outputs.cache-hit != 'true' @@ -136,7 +136,7 @@ jobs: path: | nimbledeps/ nimble.paths - key: ${{ runner.os }}-nimbledeps-${{ hashFiles('nimble.lock', 'BearSSL.mk', 'Nat.mk') }} + key: ${{ runner.os }}-nimbledeps-nimble${{ env.NIMBLE_VERSION }}-${{ hashFiles('nimble.lock', 'BearSSL.mk', 'Nat.mk') }} - name: Install nimble deps if: steps.cache-nimbledeps.outputs.cache-hit != 'true' @@ -215,7 +215,7 @@ jobs: path: | nimbledeps/ nimble.paths - key: ${{ runner.os }}-nimbledeps-${{ hashFiles('nimble.lock', 'BearSSL.mk', 'Nat.mk') }} + key: ${{ runner.os }}-nimbledeps-nimble${{ env.NIMBLE_VERSION }}-${{ hashFiles('nimble.lock', 'BearSSL.mk', 'Nat.mk') }} - name: Install nimble deps if: steps.cache-nimbledeps.outputs.cache-hit != 'true' diff --git a/.github/workflows/container-image.yml b/.github/workflows/container-image.yml index b240bf05e..0783c1f66 100644 --- a/.github/workflows/container-image.yml +++ b/.github/workflows/container-image.yml @@ -69,7 +69,7 @@ jobs: path: | nimbledeps/ nimble.paths - key: ${{ runner.os }}-nimbledeps-${{ hashFiles('nimble.lock', 'BearSSL.mk', 'Nat.mk') }} + key: ${{ runner.os }}-nimbledeps-nimble${{ env.NIMBLE_VERSION }}-${{ hashFiles('nimble.lock', 'BearSSL.mk', 'Nat.mk') }} - name: Install nimble deps if: ${{ steps.secrets.outcome == 'success' && steps.cache-nimbledeps.outputs.cache-hit != 'true' }} diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 45429f103..42942c515 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -87,7 +87,7 @@ jobs: path: | nimbledeps/ nimble.paths - key: ${{ runner.os }}-nimbledeps-${{ hashFiles('nimble.lock', 'BearSSL.mk', 'Nat.mk') }} + key: ${{ runner.os }}-nimbledeps-nimble${{ env.NIMBLE_VERSION }}-${{ hashFiles('nimble.lock', 'BearSSL.mk', 'Nat.mk') }} - name: Configure Windows Git line endings # nimble.exe is a Windows binary that spawns Windows Git (not MSYS2 git). From ac600f4ff4a00965a9f025dbd73f520bda5a68dd Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Mon, 13 Apr 2026 00:28:54 +0200 Subject: [PATCH 08/14] avoid parallelism in ci --- .github/workflows/ci-daily.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/container-image.yml | 2 +- .github/workflows/pre-release.yml | 2 +- .github/workflows/release-assets.yml | 2 +- .github/workflows/windows-build.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-daily.yml b/.github/workflows/ci-daily.yml index a4cf39340..98cf28716 100644 --- a/.github/workflows/ci-daily.yml +++ b/.github/workflows/ci-daily.yml @@ -5,7 +5,7 @@ on: - cron: '30 6 * * *' env: - NPROC: 2 + NPROC: 1 MAKEFLAGS: "-j${NPROC}" NIMFLAGS: "--parallelBuild:${NPROC} --colors:off -d:chronicles_colors:none" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b45853e21..9768ad14e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ concurrency: cancel-in-progress: true env: - NPROC: 2 + NPROC: 1 MAKEFLAGS: "-j${NPROC}" NIMFLAGS: "--parallelBuild:${NPROC} --colors:off -d:chronicles_colors:none" NIM_VERSION: '2.2.4' diff --git a/.github/workflows/container-image.yml b/.github/workflows/container-image.yml index 0783c1f66..d471eee2a 100644 --- a/.github/workflows/container-image.yml +++ b/.github/workflows/container-image.yml @@ -12,7 +12,7 @@ on: value: ${{ jobs.build-docker-image.outputs.image }} env: - NPROC: 2 + NPROC: 1 MAKEFLAGS: "-j${NPROC}" NIMFLAGS: "--parallelBuild:${NPROC}" NIM_VERSION: '2.2.4' diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index e3c8bb575..02ddfcd28 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -11,7 +11,7 @@ on: env: RELEASE_NAME: nightly - NPROC: 2 + NPROC: 1 MAKEFLAGS: "-j${NPROC}" NIMFLAGS: "--parallelBuild:${NPROC}" diff --git a/.github/workflows/release-assets.yml b/.github/workflows/release-assets.yml index 50e3c4c3d..dbab8cc1b 100644 --- a/.github/workflows/release-assets.yml +++ b/.github/workflows/release-assets.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: env: - NPROC: 2 + NPROC: 1 jobs: build-and-upload: diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 42942c515..8dd5479a4 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -8,7 +8,7 @@ on: type: string env: - NPROC: 4 + NPROC: 1 NIM_VERSION: '2.2.4' NIMBLE_VERSION: '0.22.3' From e6082067cd10d3af67209ef6093e8c3e4c9fabba Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Mon, 13 Apr 2026 00:38:46 +0200 Subject: [PATCH 09/14] patch checksum on windows ci --- .github/workflows/windows-build.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 8dd5479a4..855752533 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -89,15 +89,13 @@ jobs: nimble.paths key: ${{ runner.os }}-nimbledeps-nimble${{ env.NIMBLE_VERSION }}-${{ hashFiles('nimble.lock', 'BearSSL.mk', 'Nat.mk') }} - - name: Configure Windows Git line endings - # nimble.exe is a Windows binary that spawns Windows Git (not MSYS2 git). - # Windows Git reads %USERPROFILE%\.gitconfig (C:\Users\\.gitconfig), - # which is a different file from MSYS2's ~/,gitconfig (C:\msys64\home\\.gitconfig). - # core.autocrlf defaults to true on Windows, which converts LF→CRLF on checkout - # and causes nimble's SHA1 checksum to differ from the Linux-computed value in nimble.lock. + - name: Patch nimble.lock for Windows nim checksum + # nimble.exe uses Windows Git (core.autocrlf=true by default), which converts LF→CRLF + # on checkout. This changes the SHA1 of the nim package source tree relative to the + # Linux-computed checksum stored in nimble.lock. Patch the lock file with the + # Windows-computed checksum before nimble reads it. run: | - "/c/Program Files/Git/bin/git.exe" config --global core.autocrlf false - "/c/Program Files/Git/bin/git.exe" config --global --add safe.directory '*' + sed -i 's/68bb85cbfb1832ce4db43943911b046c3af3caab/a092a045d3a427d127a5334a6e59c76faff54686/g' nimble.lock - name: Install nimble deps if: steps.cache-nimbledeps.outputs.cache-hit != 'true' From 529adc9c26eaf3dd4f94ed5ea6b06389dba8c1c3 Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Mon, 13 Apr 2026 01:04:48 +0200 Subject: [PATCH 10/14] try to reduce the path length on windows ci --- .github/workflows/windows-build.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 855752533..0b903833b 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -99,8 +99,16 @@ jobs: - name: Install nimble deps if: steps.cache-nimbledeps.outputs.cache-hit != 'true' + env: + # lsquic bundles BoringSSL as a submodule whose fuzz corpus has deeply-nested + # paths. With the default TEMP at D:\a\_temp\msys64\tmp the total path length + # exceeds Windows MAX_PATH (260 chars). Use a short TEMP so nimble's scratch + # directory stays within the limit. + TEMP: 'C:\t' + TMP: 'C:\t' run: | export PATH="$GITHUB_WORKSPACE/.nim_runtime/bin:$HOME/.nimble/bin:$PATH" + mkdir -p /c/t nimble setup --localdeps -y make rebuild-nat-libs-nimbledeps CC=gcc make rebuild-bearssl-nimbledeps CC=gcc From 53ab5fe6e3d45585c493ed00ea6af7d1f80f84d8 Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Mon, 13 Apr 2026 10:54:09 +0200 Subject: [PATCH 11/14] use latest libp2p and bump some deps to try help windows ci path issue --- waku.nimble | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waku.nimble b/waku.nimble index d99f05e84..eb2804382 100644 --- a/waku.nimble +++ b/waku.nimble @@ -27,7 +27,7 @@ requires "nim >= 2.2.4", "toml_serialization", "faststreams", # Networking & P2P - "https://github.com/vacp2p/nim-libp2p.git#ff8d51857b4b79a68468e7bcc27b2026cca02996", + "https://github.com/vacp2p/nim-libp2p.git#ebd8b7fe525e75b2dd59b175ee1e7517cc0a270f", "eth", "nat_traversal", "dnsdisc", From 21d2af74a3900c7dcf27e60ec149d8c7fa672144 Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Mon, 13 Apr 2026 11:45:01 +0200 Subject: [PATCH 12/14] update nimble.lock and deps.nix --- nimble.lock | 8 +- nix/deps.nix | 314 +++++++++++++++++++++++++-------------------------- 2 files changed, 161 insertions(+), 161 deletions(-) diff --git a/nimble.lock b/nimble.lock index 978ea926f..977617133 100644 --- a/nimble.lock +++ b/nimble.lock @@ -550,8 +550,8 @@ } }, "libp2p": { - "version": "#ff8d51857b4b79a68468e7bcc27b2026cca02996", - "vcsRevision": "ff8d51857b4b79a68468e7bcc27b2026cca02996", + "version": "#ebd8b7fe525e75b2dd59b175ee1e7517cc0a270f", + "vcsRevision": "ebd8b7fe525e75b2dd59b175ee1e7517cc0a270f", "url": "https://github.com/vacp2p/nim-libp2p.git", "downloadMethod": "git", "dependencies": [ @@ -564,15 +564,15 @@ "metrics", "secp256k1", "stew", - "websock", "unittest2", "results", "serialization", + "websock", "lsquic", "jwt" ], "checksums": { - "sha1": "fa2a7552c6ec860717b77ce34cf0b7afe4570234" + "sha1": "1a17b741774190d8a9400b4291d6a9046f29faf7" } }, "taskpools": { diff --git a/nix/deps.nix b/nix/deps.nix index 2f30a572c..a8f4a209d 100644 --- a/nix/deps.nix +++ b/nix/deps.nix @@ -12,8 +12,8 @@ bearssl = pkgs.fetchgit { url = "https://github.com/status-im/nim-bearssl"; - rev = "3b341f30d8c619b9a75c154243f9a55468a404e2"; - sha256 = "059avc2dh39vv9c3a1qayah98fjm5pw04r3dn2bqrgs6vf7licmv"; + rev = "22c6a76ce015bc07e011562bdcfc51d9446c1e82"; + sha256 = "1cvdd7lfrpa6asmc39al3g4py5nqhpqmvypc36r5qyv7p5arc8a3"; fetchSubmodules = true; }; @@ -24,38 +24,10 @@ fetchSubmodules = true; }; - results = pkgs.fetchgit { - url = "https://github.com/arnetheduck/nim-results"; - rev = "df8113dda4c2d74d460a8fa98252b0b771bf1f27"; - sha256 = "1h7amas16sbhlr7zb7n3jb5434k98ji375vzw72k1fsc86vnmcr9"; - fetchSubmodules = true; - }; - - stew = pkgs.fetchgit { - url = "https://github.com/status-im/nim-stew"; - rev = "4382b18f04b3c43c8409bfcd6b62063773b2bbaa"; - sha256 = "0mx9g5m636h3sk5pllcpylk51brf7lx91izx3gc23k3ih3hrxyk2"; - fetchSubmodules = true; - }; - - faststreams = pkgs.fetchgit { - url = "https://github.com/status-im/nim-faststreams"; - rev = "ce27581a3e881f782f482cb66dc5b07a02bd615e"; - sha256 = "0y6bw2scnmr8cxj4fg18w7f34l2bh9qwg5nhlgd84m9fpr5bqarn"; - fetchSubmodules = true; - }; - - serialization = pkgs.fetchgit { - url = "https://github.com/status-im/nim-serialization"; - rev = "b0f2fa32960ea532a184394b0f27be37bd80248b"; - sha256 = "0wip1fjx7ka39ck1g1xvmyarzq1p5dlngpqil6zff8k8z5skiz27"; - fetchSubmodules = true; - }; - - json_serialization = pkgs.fetchgit { - url = "https://github.com/status-im/nim-json-serialization"; - rev = "c343b0e243d9e17e2c40f3a8a24340f7c4a71d44"; - sha256 = "0i8sq51nqj8lshf6bfixaz9a7sq0ahsbvq3chkxdvv4khsqvam91"; + jwt = pkgs.fetchgit { + url = "https://github.com/vacp2p/nim-jwt.git"; + rev = "18f8378de52b241f321c1f9ea905456e89b95c6f"; + sha256 = "1986czmszdxj6g9yr7xn1fx8y2y9mwpb3f1bn9nc6973qawsdm0p"; fetchSubmodules = true; }; @@ -66,10 +38,38 @@ fetchSubmodules = true; }; - chronicles = pkgs.fetchgit { - url = "https://github.com/status-im/nim-chronicles"; - rev = "27ec507429a4eb81edc20f28292ee8ec420be05b"; - sha256 = "1xx9fcfwgcaizq3s7i3s03mclz253r5j8va38l9ycl19fcbc96z9"; + db_connector = pkgs.fetchgit { + url = "https://github.com/nim-lang/db_connector"; + rev = "29450a2063970712422e1ab857695c12d80112a6"; + sha256 = "11dna09ccdhj3pzpqa04j7a95ibx907z6n1ff33yf0n92qa4x59z"; + fetchSubmodules = true; + }; + + results = pkgs.fetchgit { + url = "https://github.com/arnetheduck/nim-results"; + rev = "df8113dda4c2d74d460a8fa98252b0b771bf1f27"; + sha256 = "1h7amas16sbhlr7zb7n3jb5434k98ji375vzw72k1fsc86vnmcr9"; + fetchSubmodules = true; + }; + + nat_traversal = pkgs.fetchgit { + url = "https://github.com/status-im/nim-nat-traversal"; + rev = "860e18c37667b5dd005b94c63264560c35d88004"; + sha256 = "0319k5bbl468phwfnvlrh7725sc80rnf7m9gyj0i3cb5hb9q78bs"; + fetchSubmodules = true; + }; + + stew = pkgs.fetchgit { + url = "https://github.com/status-im/nim-stew"; + rev = "4382b18f04b3c43c8409bfcd6b62063773b2bbaa"; + sha256 = "0mx9g5m636h3sk5pllcpylk51brf7lx91izx3gc23k3ih3hrxyk2"; + fetchSubmodules = true; + }; + + zlib = pkgs.fetchgit { + url = "https://github.com/status-im/nim-zlib"; + rev = "e680f269fb01af2c34a2ba879ff281795a5258fe"; + sha256 = "1xw9f1gjsgqihdg7kdkbaq1wankgnx2vn9l3ihc6nqk2jzv5bvk5"; fetchSubmodules = true; }; @@ -87,55 +87,6 @@ fetchSubmodules = true; }; - confutils = pkgs.fetchgit { - url = "https://github.com/status-im/nim-confutils"; - rev = "7728f6bd81a1eedcfe277d02ea85fdb805bcc05a"; - sha256 = "18bj1ilx10jm2vmqx2wy2xl9rzy7alymi2m4n9jgpa4sbxnfh0x3"; - fetchSubmodules = true; - }; - - db_connector = pkgs.fetchgit { - url = "https://github.com/nim-lang/db_connector"; - rev = "29450a2063970712422e1ab857695c12d80112a6"; - sha256 = "11dna09ccdhj3pzpqa04j7a95ibx907z6n1ff33yf0n92qa4x59z"; - fetchSubmodules = true; - }; - - dnsclient = pkgs.fetchgit { - url = "https://github.com/ba0f3/dnsclient.nim"; - rev = "23214235d4784d24aceed99bbfe153379ea557c8"; - sha256 = "03mf3lw5c0m5nq9ppa49nylrl8ibkv2zzlc0wyhqg7w09kz6hks6"; - fetchSubmodules = true; - }; - - nimcrypto = pkgs.fetchgit { - url = "https://github.com/cheatfate/nimcrypto"; - rev = "721fb99ee099b632eb86dfad1f0d96ee87583774"; - sha256 = "178vzb3q8wzjq295ik2pd25rrqf32w381ck76hm5x2d8qnzfmkkc"; - fetchSubmodules = true; - }; - - stint = pkgs.fetchgit { - url = "https://github.com/status-im/nim-stint"; - rev = "470b7892561b5179ab20bd389a69217d6213fe58"; - sha256 = "1isfwmbj98qfi5pm9acy0yyvq0vlz38nxp30xl43jx2mmaga2w22"; - fetchSubmodules = true; - }; - - secp256k1 = pkgs.fetchgit { - url = "https://github.com/status-im/nim-secp256k1"; - rev = "d8f1288b7c72f00be5fc2c5ea72bf5cae1eafb15"; - sha256 = "1qjrmwbngb73f6r1fznvig53nyal7wj41d1cmqfksrmivk2sgrn2"; - fetchSubmodules = true; - }; - - nat_traversal = pkgs.fetchgit { - url = "https://github.com/status-im/nim-nat-traversal"; - rev = "860e18c37667b5dd005b94c63264560c35d88004"; - sha256 = "0319k5bbl468phwfnvlrh7725sc80rnf7m9gyj0i3cb5hb9q78bs"; - fetchSubmodules = true; - }; - metrics = pkgs.fetchgit { url = "https://github.com/status-im/nim-metrics"; rev = "a1296caf3ebb5f30f51a5feae7749a30df2824c2"; @@ -143,17 +94,10 @@ fetchSubmodules = true; }; - sqlite3_abi = pkgs.fetchgit { - url = "https://github.com/arnetheduck/nim-sqlite3-abi"; - rev = "4b79c5e1882b7fc6c00aec311daf1ed50ad653d5"; - sha256 = "0qa6p2vnxmf6r2w19mfydr5rzv7bg1lfxccnpdhk0akzxnc7i5gy"; - fetchSubmodules = true; - }; - - minilru = pkgs.fetchgit { - url = "https://github.com/status-im/nim-minilru"; - rev = "6dd93feb60f4cded3c05e7af7209cf63fb677893"; - sha256 = "1xgx4j56ais3hk8b51zhnfs9q85g2afkp3y1j9ky5iziqvcs2sml"; + faststreams = pkgs.fetchgit { + url = "https://github.com/status-im/nim-faststreams"; + rev = "ce27581a3e881f782f482cb66dc5b07a02bd615e"; + sha256 = "0y6bw2scnmr8cxj4fg18w7f34l2bh9qwg5nhlgd84m9fpr5bqarn"; fetchSubmodules = true; }; @@ -164,73 +108,38 @@ fetchSubmodules = true; }; - eth = pkgs.fetchgit { - url = "https://github.com/status-im/nim-eth"; - rev = "d9135e6c3c5d6d819afdfb566aa8d958756b73a8"; - sha256 = "15r6aszalnbk6mkyfbv5rnz5vcf1mmgj6yg332wry53xsd2ipg7r"; + serialization = pkgs.fetchgit { + url = "https://github.com/status-im/nim-serialization"; + rev = "b0f2fa32960ea532a184394b0f27be37bd80248b"; + sha256 = "0wip1fjx7ka39ck1g1xvmyarzq1p5dlngpqil6zff8k8z5skiz27"; fetchSubmodules = true; }; - dnsdisc = pkgs.fetchgit { - url = "https://github.com/status-im/nim-dnsdisc"; - rev = "38f2e0f52c0a8f032ef4530835e519d550706d9e"; - sha256 = "0dk787ny49n41bmzhlrvm87giwajr01gwdw9nlmphch89rdqpxxn"; + toml_serialization = pkgs.fetchgit { + url = "https://github.com/status-im/nim-toml-serialization"; + rev = "b5b387e6fb2a7cc75d54a269b07cc6218361bd46"; + sha256 = "175swdj01rz57h1hvflkyaz4x76qbfn0174ysrk3qk385i1zlg5z"; fetchSubmodules = true; }; - taskpools = pkgs.fetchgit { - url = "https://github.com/status-im/nim-taskpools"; - rev = "9e8ccc754631ac55ac2fd495e167e74e86293edb"; - sha256 = "1y78l33vdjxmb9dkr455pbphxa73rgdsh8m9gpkf4d9b1wm1yivy"; + confutils = pkgs.fetchgit { + url = "https://github.com/status-im/nim-confutils"; + rev = "7728f6bd81a1eedcfe277d02ea85fdb805bcc05a"; + sha256 = "18bj1ilx10jm2vmqx2wy2xl9rzy7alymi2m4n9jgpa4sbxnfh0x3"; fetchSubmodules = true; }; - ffi = pkgs.fetchgit { - url = "https://github.com/logos-messaging/nim-ffi"; - rev = "06111de155253b34e47ed2aaed1d61d08d62cc1b"; - sha256 = "0rb0d2i519amgsp7q0bn6m5465z1vwj4rab89529pyiivh3fgh8j"; + json_serialization = pkgs.fetchgit { + url = "https://github.com/status-im/nim-json-serialization"; + rev = "c343b0e243d9e17e2c40f3a8a24340f7c4a71d44"; + sha256 = "0i8sq51nqj8lshf6bfixaz9a7sq0ahsbvq3chkxdvv4khsqvam91"; fetchSubmodules = true; }; - zlib = pkgs.fetchgit { - url = "https://github.com/status-im/nim-zlib"; - rev = "e680f269fb01af2c34a2ba879ff281795a5258fe"; - sha256 = "1xw9f1gjsgqihdg7kdkbaq1wankgnx2vn9l3ihc6nqk2jzv5bvk5"; - fetchSubmodules = true; - }; - - websock = pkgs.fetchgit { - url = "https://github.com/status-im/nim-websock"; - rev = "3918ce3900c83e1cc7496232a307709f195f7acd"; - sha256 = "16zvdjyasfpb04708d072rpvg12pyz3gmszi3md5brmlhbc3x8jp"; - fetchSubmodules = true; - }; - - json_rpc = pkgs.fetchgit { - url = "https://github.com/status-im/nim-json-rpc"; - rev = "b6e40a776fa2d00b97a9366761fb7da18f31ae5c"; - sha256 = "0c86glijpzcxdb5fagdk98hm9dmsrgw179nn3ixbapl48pvly9nr"; - fetchSubmodules = true; - }; - - jwt = pkgs.fetchgit { - url = "https://github.com/vacp2p/nim-jwt.git"; - rev = "18f8378de52b241f321c1f9ea905456e89b95c6f"; - sha256 = "1986czmszdxj6g9yr7xn1fx8y2y9mwpb3f1bn9nc6973qawsdm0p"; - fetchSubmodules = true; - }; - - lsquic = pkgs.fetchgit { - url = "https://github.com/vacp2p/nim-lsquic"; - rev = "4fb03ee7bfb39aecb3316889fdcb60bec3d0936f"; - sha256 = "0qdhcd4hyp185szc9sv3jvwdwc9zp3j0syy7glxv13k9bchfmkfg"; - fetchSubmodules = true; - }; - - libp2p = pkgs.fetchgit { - url = "https://github.com/vacp2p/nim-libp2p.git"; - rev = "ff8d51857b4b79a68468e7bcc27b2026cca02996"; - sha256 = "08y4s0zhqzsd780bwaixfqbi79km0mcq5g8nyw7awfvcbjqsa53l"; + chronicles = pkgs.fetchgit { + url = "https://github.com/status-im/nim-chronicles"; + rev = "27ec507429a4eb81edc20f28292ee8ec420be05b"; + sha256 = "1xx9fcfwgcaizq3s7i3s03mclz253r5j8va38l9ycl19fcbc96z9"; fetchSubmodules = true; }; @@ -241,6 +150,34 @@ fetchSubmodules = true; }; + stint = pkgs.fetchgit { + url = "https://github.com/status-im/nim-stint"; + rev = "470b7892561b5179ab20bd389a69217d6213fe58"; + sha256 = "1isfwmbj98qfi5pm9acy0yyvq0vlz38nxp30xl43jx2mmaga2w22"; + fetchSubmodules = true; + }; + + minilru = pkgs.fetchgit { + url = "https://github.com/status-im/nim-minilru"; + rev = "6dd93feb60f4cded3c05e7af7209cf63fb677893"; + sha256 = "1xgx4j56ais3hk8b51zhnfs9q85g2afkp3y1j9ky5iziqvcs2sml"; + fetchSubmodules = true; + }; + + sqlite3_abi = pkgs.fetchgit { + url = "https://github.com/arnetheduck/nim-sqlite3-abi"; + rev = "8240e8e2819dfce1b67fa2733135d01b5cc80ae0"; + sha256 = "0g8bc0kiwxxh3h5w06ksa23cw81hnx87rdn93v64m2f053nb6bcm"; + fetchSubmodules = true; + }; + + dnsclient = pkgs.fetchgit { + url = "https://github.com/ba0f3/dnsclient.nim"; + rev = "23214235d4784d24aceed99bbfe153379ea557c8"; + sha256 = "03mf3lw5c0m5nq9ppa49nylrl8ibkv2zzlc0wyhqg7w09kz6hks6"; + fetchSubmodules = true; + }; + unicodedb = pkgs.fetchgit { url = "https://github.com/nitely/nim-unicodedb"; rev = "66f2458710dc641dd4640368f9483c8a0ec70561"; @@ -255,10 +192,45 @@ fetchSubmodules = true; }; - toml_serialization = pkgs.fetchgit { - url = "https://github.com/status-im/nim-toml-serialization"; - rev = "b5b387e6fb2a7cc75d54a269b07cc6218361bd46"; - sha256 = "175swdj01rz57h1hvflkyaz4x76qbfn0174ysrk3qk385i1zlg5z"; + nimcrypto = pkgs.fetchgit { + url = "https://github.com/cheatfate/nimcrypto"; + rev = "721fb99ee099b632eb86dfad1f0d96ee87583774"; + sha256 = "178vzb3q8wzjq295ik2pd25rrqf32w381ck76hm5x2d8qnzfmkkc"; + fetchSubmodules = true; + }; + + websock = pkgs.fetchgit { + url = "https://github.com/status-im/nim-websock"; + rev = "c105d98e6522e0e2cbe3dfa11b07a273e9fd0e7b"; + sha256 = "1zrigw27nwcmg7mw9867581ipcp3ckrqq3cwl2snabcjhkp5dm2c"; + fetchSubmodules = true; + }; + + json_rpc = pkgs.fetchgit { + url = "https://github.com/status-im/nim-json-rpc.git"; + rev = "43bbf499143eb45046c83ac9794c9e3280a2b8e7"; + sha256 = "1c1msxg958jm2ggvs875b6wh6n829d3lh7x4ch6dcxawda16qf95"; + fetchSubmodules = true; + }; + + lsquic = pkgs.fetchgit { + url = "https://github.com/vacp2p/nim-lsquic"; + rev = "4fb03ee7bfb39aecb3316889fdcb60bec3d0936f"; + sha256 = "0qdhcd4hyp185szc9sv3jvwdwc9zp3j0syy7glxv13k9bchfmkfg"; + fetchSubmodules = true; + }; + + secp256k1 = pkgs.fetchgit { + url = "https://github.com/status-im/nim-secp256k1"; + rev = "d8f1288b7c72f00be5fc2c5ea72bf5cae1eafb15"; + sha256 = "1qjrmwbngb73f6r1fznvig53nyal7wj41d1cmqfksrmivk2sgrn2"; + fetchSubmodules = true; + }; + + eth = pkgs.fetchgit { + url = "https://github.com/status-im/nim-eth"; + rev = "d9135e6c3c5d6d819afdfb566aa8d958756b73a8"; + sha256 = "15r6aszalnbk6mkyfbv5rnz5vcf1mmgj6yg332wry53xsd2ipg7r"; fetchSubmodules = true; }; @@ -269,4 +241,32 @@ fetchSubmodules = true; }; + dnsdisc = pkgs.fetchgit { + url = "https://github.com/status-im/nim-dnsdisc"; + rev = "38f2e0f52c0a8f032ef4530835e519d550706d9e"; + sha256 = "0dk787ny49n41bmzhlrvm87giwajr01gwdw9nlmphch89rdqpxxn"; + fetchSubmodules = true; + }; + + libp2p = pkgs.fetchgit { + url = "https://github.com/vacp2p/nim-libp2p.git"; + rev = "ebd8b7fe525e75b2dd59b175ee1e7517cc0a270f"; + sha256 = "131hz0lzz994l49zn2s8nq9j6815vd49axw68kpy746aqfdx2r6k"; + fetchSubmodules = true; + }; + + taskpools = pkgs.fetchgit { + url = "https://github.com/status-im/nim-taskpools"; + rev = "9e8ccc754631ac55ac2fd495e167e74e86293edb"; + sha256 = "1y78l33vdjxmb9dkr455pbphxa73rgdsh8m9gpkf4d9b1wm1yivy"; + fetchSubmodules = true; + }; + + ffi = pkgs.fetchgit { + url = "https://github.com/logos-messaging/nim-ffi"; + rev = "06111de155253b34e47ed2aaed1d61d08d62cc1b"; + sha256 = "0rb0d2i519amgsp7q0bn6m5465z1vwj4rab89529pyiivh3fgh8j"; + fetchSubmodules = true; + }; + } From a8935a2a3b06683d647c81204f0ea6d0fb3d566a Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Tue, 14 Apr 2026 02:19:06 +0200 Subject: [PATCH 13/14] bump libp2p to 1.15.3 --- nimble.lock | 16 ++++++++-------- nix/deps.nix | 10 +++++----- waku.nimble | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/nimble.lock b/nimble.lock index 977617133..9ea5db647 100644 --- a/nimble.lock +++ b/nimble.lock @@ -444,8 +444,8 @@ } }, "lsquic": { - "version": "#4fb03ee7bfb39aecb3316889fdcb60bec3d0936f", - "vcsRevision": "4fb03ee7bfb39aecb3316889fdcb60bec3d0936f", + "version": "#6ae249c5d9f5eba9999704e1ffe77483cbf8fcdd", + "vcsRevision": "6ae249c5d9f5eba9999704e1ffe77483cbf8fcdd", "url": "https://github.com/vacp2p/nim-lsquic", "downloadMethod": "git", "dependencies": [ @@ -458,7 +458,7 @@ "chronicles" ], "checksums": { - "sha1": "f465fa994346490d0924d162f53d9b5aec62f948" + "sha1": "b11b0a74191cb5bd643d97a0f917dc9668256849" } }, "secp256k1": { @@ -550,9 +550,9 @@ } }, "libp2p": { - "version": "#ebd8b7fe525e75b2dd59b175ee1e7517cc0a270f", - "vcsRevision": "ebd8b7fe525e75b2dd59b175ee1e7517cc0a270f", - "url": "https://github.com/vacp2p/nim-libp2p.git", + "version": "1.15.3", + "vcsRevision": "79002827ef32ba51b83e123e1649fc4b394612a1", + "url": "https://github.com/vacp2p/nim-libp2p", "downloadMethod": "git", "dependencies": [ "nim", @@ -564,15 +564,15 @@ "metrics", "secp256k1", "stew", + "websock", "unittest2", "results", "serialization", - "websock", "lsquic", "jwt" ], "checksums": { - "sha1": "1a17b741774190d8a9400b4291d6a9046f29faf7" + "sha1": "578e48f1e22cc14327e6d2f915c936f37c342c83" } }, "taskpools": { diff --git a/nix/deps.nix b/nix/deps.nix index a8f4a209d..744db27d1 100644 --- a/nix/deps.nix +++ b/nix/deps.nix @@ -215,8 +215,8 @@ lsquic = pkgs.fetchgit { url = "https://github.com/vacp2p/nim-lsquic"; - rev = "4fb03ee7bfb39aecb3316889fdcb60bec3d0936f"; - sha256 = "0qdhcd4hyp185szc9sv3jvwdwc9zp3j0syy7glxv13k9bchfmkfg"; + rev = "6ae249c5d9f5eba9999704e1ffe77483cbf8fcdd"; + sha256 = "18fcfw2sf7zgk562nk5pkp59r6b0g2742cf8lyamhcl4j7bsyrnj"; fetchSubmodules = true; }; @@ -249,9 +249,9 @@ }; libp2p = pkgs.fetchgit { - url = "https://github.com/vacp2p/nim-libp2p.git"; - rev = "ebd8b7fe525e75b2dd59b175ee1e7517cc0a270f"; - sha256 = "131hz0lzz994l49zn2s8nq9j6815vd49axw68kpy746aqfdx2r6k"; + url = "https://github.com/vacp2p/nim-libp2p"; + rev = "79002827ef32ba51b83e123e1649fc4b394612a1"; + sha256 = "0w7rvxvq934sq8ixnmgzgy1l9yla1p2hz0ycmdi7kq9v1xw4ddhn"; fetchSubmodules = true; }; diff --git a/waku.nimble b/waku.nimble index eb2804382..409e59193 100644 --- a/waku.nimble +++ b/waku.nimble @@ -27,7 +27,7 @@ requires "nim >= 2.2.4", "toml_serialization", "faststreams", # Networking & P2P - "https://github.com/vacp2p/nim-libp2p.git#ebd8b7fe525e75b2dd59b175ee1e7517cc0a270f", + "libp2p == 1.15.3", "eth", "nat_traversal", "dnsdisc", From 89339eaf96e3adba0c3c9b1648710f4ebf54d60b Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Tue, 14 Apr 2026 02:26:59 +0200 Subject: [PATCH 14/14] use same lsquic and jwt as libp2p repo in 1.15.3 --- waku.nimble | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/waku.nimble b/waku.nimble index 409e59193..f4bfd642a 100644 --- a/waku.nimble +++ b/waku.nimble @@ -61,8 +61,8 @@ requires "nim >= 2.2.4", # Packages not on nimble (use git URLs) requires "https://github.com/logos-messaging/nim-ffi" -requires "https://github.com/vacp2p/nim-lsquic" -requires "https://github.com/vacp2p/nim-jwt.git#057ec95eb5af0eea9c49bfe9025b3312c95dc5f2" +requires "https://github.com/vacp2p/nim-lsquic#6ae249c5d9f5eba9999704e1ffe77483cbf8fcdd" +requires "https://github.com/vacp2p/nim-jwt.git#18f8378de52b241f321c1f9ea905456e89b95c6f" proc getMyCPU(): string = ## Need to set cpu more explicit manner to avoid arch issues between dependencies