From a15660f70fcfc287767b9d45c015339575e4846c Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Wed, 10 Dec 2025 20:44:01 +0100 Subject: [PATCH 1/3] chore: fix import conflict There's a new byteutils in newer versions of stew - also, remove upraises and disable windows testing which requires SSL library install --- .github/workflows/ci.yml | 6 ++--- .gitignore | 1 + config.nims | 5 ++-- nimble.lock | 50 +++++++++++++++--------------------- nitro.nimble | 5 ++-- nitro/basics.nim | 2 -- nitro/basics/destination.nim | 3 +-- nitro/json.nim | 6 ++--- nitro/keys.nim | 2 +- nitro/protocol/abi.nim | 2 +- nitro/protocol/channel.nim | 2 +- nitro/protocol/outcome.nim | 2 +- nitro/protocol/signature.nim | 4 +-- nitro/protocol/state.nim | 2 +- nitro/wallet/balances.nim | 2 +- nitro/wallet/nonces.nim | 2 +- nitro/wallet/signedstate.nim | 2 +- nitro/wallet/wallet.nim | 2 +- 18 files changed, 44 insertions(+), 56 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11ba4e7..bd20d6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,11 +7,11 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] + os: [ubuntu-latest, macOS-latest] nim: [stable, 2.0.14] steps: - - uses: actions/checkout@v2 - - uses: iffy/install-nim@v3 + - uses: actions/checkout@v6 + - uses: iffy/install-nim@v5 with: version: ${{ matrix.nim }} - name: Build diff --git a/.gitignore b/.gitignore index 272d8fb..5c20a9f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ !*.* nimble.develop nimble.paths +nimbledeps diff --git a/config.nims b/config.nims index 7c9db32..fcbd3f8 100644 --- a/config.nims +++ b/config.nims @@ -1,4 +1,5 @@ -# begin Nimble config (version 1) -when fileExists("nimble.paths"): +# begin Nimble config (version 2) +--noNimblePath +when withDir(thisDir(), system.fileExists("nimble.paths")): include "nimble.paths" # end Nimble config diff --git a/nimble.lock b/nimble.lock index 6090a9f..cfb9317 100644 --- a/nimble.lock +++ b/nimble.lock @@ -12,18 +12,18 @@ } }, "unittest2": { - "version": "0.2.3", - "vcsRevision": "845b6af28b9f68f02d320e03ad18eccccea7ddb9", + "version": "0.2.5", + "vcsRevision": "26f2ef3ae0ec72a2a75bfe557e02e88f6a31c189", "url": "https://github.com/status-im/nim-unittest2", "downloadMethod": "git", "dependencies": [], "checksums": { - "sha1": "6936b4e4676c9b37537d93f31cb8fc46f4ebaacb" + "sha1": "02bb3751ba9ddc3c17bfd89f2e41cb6bfb8fc0c9" } }, "stew": { - "version": "0.2.0", - "vcsRevision": "79e4fa5a9d3374db17ed63622714d3e1094c7f34", + "version": "0.4.2", + "vcsRevision": "b66168735d6f3841c5239c3169d3fe5fe98b1257", "url": "https://github.com/status-im/nim-stew", "downloadMethod": "git", "dependencies": [ @@ -31,12 +31,12 @@ "unittest2" ], "checksums": { - "sha1": "26d477c735913b7daa1dab53dd74803c88209634" + "sha1": "928e82cb8d2f554e8f10feb2349ee9c32fee3a8c" } }, "stint": { - "version": "0.8.1", - "vcsRevision": "1a2c661e3f50ff696b0b6692fab0d7bb2abf10cc", + "version": "0.8.2", + "vcsRevision": "470b7892561b5179ab20bd389a69217d6213fe58", "url": "https://github.com/status-im/nim-stint", "downloadMethod": "git", "dependencies": [ @@ -44,66 +44,56 @@ "unittest2" ], "checksums": { - "sha1": "fe3c8b7b0484135294b8fb3dab5b1a030a08bddc" + "sha1": "d8f871fd617e7857192d4609fe003b48942a8ae5" } }, "nimcrypto": { - "version": "0.6.2", - "vcsRevision": "dc07e3058c6904eef965394493b6ea99aa2adefc", + "version": "0.6.4", + "vcsRevision": "721fb99ee099b632eb86dfad1f0d96ee87583774", "url": "https://github.com/cheatfate/nimcrypto", "downloadMethod": "git", "dependencies": [], "checksums": { - "sha1": "8e3e42530f54c8c312942a89640b7e0f687f33a5" + "sha1": "f9ab24fa940ed03d0fb09729a7303feb50b7eaec" } }, "questionable": { "version": "0.10.15", "vcsRevision": "82d90b67bcfb7f2e918b61dace2ff1a4ced60935", - "url": "https://github.com/markspanbroek/questionable", + "url": "https://github.com/codex-storage/questionable", "downloadMethod": "git", "dependencies": [], "checksums": { "sha1": "3238ff637c7b44d2fa8fcb839a8ded968e389de3" } }, - "upraises": { - "version": "0.1.0", - "vcsRevision": "d9f268db1021959fe0f2c7a5e49fba741f9932a0", - "url": "https://github.com/markspanbroek/upraises", - "downloadMethod": "git", - "dependencies": [], - "checksums": { - "sha1": "176234f808b44a0be763df706ed634d6e8df17bb" - } - }, "contractabi": { - "version": "0.7.1", - "vcsRevision": "524bda044baecdf1ead4f179bdad2b8706ae3a5a", + "version": "0.7.3", + "vcsRevision": "0a7b4cecce725bcb11ad8648035a92704a8854d3", "url": "https://github.com/status-im/nim-contract-abi", "downloadMethod": "git", "dependencies": [ "stint", "stew", "nimcrypto", - "questionable", - "upraises" + "questionable" ], "checksums": { - "sha1": "c45b2abde354c731ed9cb3bf30a8fe0a444ed027" + "sha1": "1bb9af15f02a77b44af02ec94b0e392b1ec88438" } }, "secp256k1": { "version": "0.6.0.3.2", - "vcsRevision": "62e16b4dff513f1eea7148a8cbba8a8c547b9546", + "vcsRevision": "b526c4b436809aa1cfe650026d796cf7b8328b91", "url": "https://github.com/status-im/nim-secp256k1", "downloadMethod": "git", "dependencies": [ "stew", + "results", "nimcrypto" ], "checksums": { - "sha1": "443802551ed2f7ba273df38e06a18164dffa14c9" + "sha1": "e6e50bd4a29cb473b070eb5359d87d8946d96075" } } }, diff --git a/nitro.nimble b/nitro.nimble index b674233..8459769 100644 --- a/nitro.nimble +++ b/nitro.nimble @@ -1,4 +1,4 @@ -version = "0.6.0" +version = "0.6.1" author = "Nim Nitro developers" license = "MIT" description = "Nitro state channels" @@ -6,8 +6,7 @@ description = "Nitro state channels" requires "nim >= 2.0.14 & < 3.0.0" requires "nimcrypto >= 0.6.0 & < 0.7.0" requires "questionable >= 0.10.10 & < 0.11.0" -requires "upraises >= 0.1.0 & < 0.2.0" requires "contractabi >= 0.7.1 & < 0.8.0" requires "secp256k1 >= 0.6.0 & < 0.7.0" requires "stint >= 0.8.0 & < 0.9.0" -requires "stew >= 0.2.0 & < 0.3.0" \ No newline at end of file +requires "stew >= 0.2.0" diff --git a/nitro/basics.nim b/nitro/basics.nim index 3db10c0..b052b97 100644 --- a/nitro/basics.nim +++ b/nitro/basics.nim @@ -1,6 +1,5 @@ import pkg/questionable import pkg/questionable/results -import pkg/upraises import pkg/stint import ./basics/uint48 import ./basics/ethaddress @@ -8,7 +7,6 @@ import ./basics/destination export questionable export results -export upraises export stint export uint48 export ethaddress diff --git a/nitro/basics/destination.nim b/nitro/basics/destination.nim index c7ad54e..230fc82 100644 --- a/nitro/basics/destination.nim +++ b/nitro/basics/destination.nim @@ -1,11 +1,10 @@ import std/hashes import pkg/questionable import pkg/questionable/results -import pkg/upraises import pkg/stew/byteutils import ./ethaddress -push: {.upraises:[].} +{.push raises: [].} type Destination* = distinct array[32, byte] diff --git a/nitro/json.nim b/nitro/json.nim index 433a274..f373082 100644 --- a/nitro/json.nim +++ b/nitro/json.nim @@ -8,7 +8,7 @@ import ./wallet/signedstate export signedstate -push: {.upraises:[].} +{.push raises: [].} func `%`(value: Outcome | Allocation): JsonNode = type Base = distinctBase(typeof value) @@ -37,7 +37,7 @@ func toJson*(payment: SignedState): string = {.pop.} -push: {.upraises: [ValueError].} +{.push raises: [ValueError].} func expectKind(node: JsonNode, kind: JsonNodeKind) = if node.kind != kind: @@ -74,7 +74,7 @@ func initFromJson*(signature: var Signature, node: JsonNode, _: var string) = {.pop.} -push: {.upraises: [].} +{.push raises: [].} proc fromJson*(_: type SignedState, json: string): ?SignedState = try: diff --git a/nitro/keys.nim b/nitro/keys.nim index 26f6578..71706f7 100644 --- a/nitro/keys.nim +++ b/nitro/keys.nim @@ -5,7 +5,7 @@ import ./basics export basics export toPublicKey -push: {.upraises:[].} +{.push raises: [].} type EthPrivateKey* = SkSecretKey diff --git a/nitro/protocol/abi.nim b/nitro/protocol/abi.nim index bd882a1..a7246b9 100644 --- a/nitro/protocol/abi.nim +++ b/nitro/protocol/abi.nim @@ -1,7 +1,7 @@ import pkg/contractabi import ../basics -push: {.upraises:[].} +{.push raises: [].} export basics export contractabi diff --git a/nitro/protocol/channel.nim b/nitro/protocol/channel.nim index 7f95ccd..751c65a 100644 --- a/nitro/protocol/channel.nim +++ b/nitro/protocol/channel.nim @@ -2,7 +2,7 @@ import pkg/nimcrypto import ../basics import ./abi -push: {.upraises:[].} +{.push raises: [].} export basics diff --git a/nitro/protocol/outcome.nim b/nitro/protocol/outcome.nim index 5ff07fa..cb893f0 100644 --- a/nitro/protocol/outcome.nim +++ b/nitro/protocol/outcome.nim @@ -2,7 +2,7 @@ import pkg/nimcrypto import ../basics import ./abi -push: {.upraises:[].} +{.push raises: [].} export basics diff --git a/nitro/protocol/signature.nim b/nitro/protocol/signature.nim index 5abb2f5..309a595 100644 --- a/nitro/protocol/signature.nim +++ b/nitro/protocol/signature.nim @@ -1,11 +1,11 @@ import pkg/secp256k1 -import pkg/nimcrypto +import pkg/nimcrypto/keccak import pkg/stew/byteutils import ../basics import ../keys import ./state -push: {.upraises:[].} +{.push raises: [].} export basics export keys diff --git a/nitro/protocol/state.nim b/nitro/protocol/state.nim index d584a0a..f9f15fc 100644 --- a/nitro/protocol/state.nim +++ b/nitro/protocol/state.nim @@ -4,7 +4,7 @@ import ./channel import ./outcome import ./abi -push: {.upraises:[].} +{.push raises: [].} export basics export channel diff --git a/nitro/wallet/balances.nim b/nitro/wallet/balances.nim index 7119924..140ad91 100644 --- a/nitro/wallet/balances.nim +++ b/nitro/wallet/balances.nim @@ -3,7 +3,7 @@ import std/sequtils import ../basics import ../protocol -push: {.upraises:[].} +{.push raises: [].} export tables diff --git a/nitro/wallet/nonces.nim b/nitro/wallet/nonces.nim index ea1d029..8ee38ca 100644 --- a/nitro/wallet/nonces.nim +++ b/nitro/wallet/nonces.nim @@ -3,7 +3,7 @@ import std/sets import std/hashes import ../basics -push: {.upraises: [].} +{.push raises: [].} type Nonces* = object diff --git a/nitro/wallet/signedstate.nim b/nitro/wallet/signedstate.nim index 7322c93..ecad31b 100644 --- a/nitro/wallet/signedstate.nim +++ b/nitro/wallet/signedstate.nim @@ -1,7 +1,7 @@ import ../basics import ../protocol -push: {.upraises:[].} +{.push raises: [].} type SignedState* = object diff --git a/nitro/wallet/wallet.nim b/nitro/wallet/wallet.nim index 781b94a..0b70e9c 100644 --- a/nitro/wallet/wallet.nim +++ b/nitro/wallet/wallet.nim @@ -8,7 +8,7 @@ import ./balances import ./nonces import ./deref -push: {.upraises:[].} +{.push raises: [].} export basics export keys From 86d5601b4b5e0d78f7a95d112aa9e4bf0181bc84 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Thu, 11 Dec 2025 09:25:26 +0100 Subject: [PATCH 2/3] readd windows --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd20d6c..651f218 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,13 +7,16 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macOS-latest] + os: [ubuntu-latest, macOS-latest, windows-latest] nim: [stable, 2.0.14] steps: - uses: actions/checkout@v6 - - uses: iffy/install-nim@v5 with: - version: ${{ matrix.nim }} + submodules: recursive + - uses: jiro4989/setup-nim-action@v2 + with: + nim-version: ${{matrix.nim}} + repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Build run: nimble install -y --maximumtaggedversions=2 - name: Test From fdcea5a2aa3b7652b3124425305fa84ef071e42e Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Thu, 11 Dec 2025 09:30:27 +0100 Subject: [PATCH 3/3] try without maxtagged --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 651f218..7fa3d53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,6 @@ jobs: nim-version: ${{matrix.nim}} repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Build - run: nimble install -y --maximumtaggedversions=2 + run: nimble install -y - name: Test run: nimble test -y