chore: bump dependencies to v0.37.0 (#3536)

This commit is contained in:
Darshan K
2025-09-10 13:20:37 +05:30
committed by GitHub
parent a36601ab0d
commit 5fc8c59f54
37 changed files with 76 additions and 57 deletions
-1
View File
@@ -71,7 +71,6 @@ jobs:
- name: Building miniupnpc
run: |
cd vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc
git checkout little_chore_windows_support
make -f Makefile.mingw CC=gcc CXX=g++ libminiupnpc.a V=1
cd ../../../../..
+1 -1
View File
@@ -41,7 +41,7 @@ ifeq ($(detected_OS),Windows)
NIM_PARAMS += --passL:"-Lvendor/nim-nat-traversal/vendor/miniupnp/miniupnpc"
NIM_PARAMS += --passL:"-Lvendor/nim-nat-traversal/vendor/libnatpmp-upstream"
LIBS = -static -lws2_32 -lbcrypt -liphlpapi -luserenv -lntdll -lminiupnpc -lnatpmp -lpq
LIBS = -lws2_32 -lbcrypt -liphlpapi -luserenv -lntdll -lminiupnpc -lnatpmp -lpq
NIM_PARAMS += $(foreach lib,$(LIBS),--passL:"$(lib)")
endif
@@ -7,8 +7,13 @@ import
results,
regex
const git_version* {.strdefine.} = "n/a"
type EthRpcUrl* = distinct string
proc `$`*(u: EthRpcUrl): string =
string(u)
type NetworkMonitorConf* = object
logLevel* {.
desc: "Sets the log level",
+1 -1
View File
@@ -31,7 +31,7 @@ proc decodeBytes*(
try:
let jsonContent = parseJson(res)
if $jsonContent["status"].getStr() != "success":
error "query failed", result = jsonContent
error "query failed", result = $jsonContent
return err("query failed")
return ok(
NodeLocation(
+1 -1
View File
@@ -1,5 +1,5 @@
# Dockerfile to build a distributable container image from pre-existing binaries
FROM debian:stable-slim AS prod
FROM debian:bookworm-slim AS prod
ARG MAKE_TARGET=wakunode2
@@ -1,4 +1,4 @@
import std/[sequtils, strutils]
import std/[sequtils, strutils, tables]
import chronicles, chronos, results, options, json
import
../../../waku/factory/waku,
-3
View File
@@ -37,13 +37,10 @@ cd ../../../..
echo "6. -.-.-.- Building libunwind -.-.-.-"
cd vendor/nim-libbacktrace
execute_command "make all V=1 -j8"
execute_command "make install/usr/lib/libunwind.a V=1 -j8"
cp ./vendor/libunwind/build/lib/libunwind.a install/usr/lib
cd ../../
echo "7. -.-.-.- Building miniupnpc -.-.-.- "
cd vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc
execute_command "git checkout little_chore_windows_support"
execute_command "make -f Makefile.mingw CC=gcc CXX=g++ libminiupnpc.a V=1 -j8"
cd ../../../../..
+4 -4
View File
@@ -405,9 +405,9 @@ suite "Waku Sync: reconciliation":
let (_, deliveredHash) = await remoteNeeds.get()
check deliveredHash in diffMsgHashes
asyncTest "sync 2 nodes, 40 msgs: 20 in-window diff, 20 out-window ignored":
asyncTest "sync 2 nodes, 40 msgs: 18 in-window diff, 20 out-window ignored":
const
diffInWin = 20
diffInWin = 18
diffOutWin = 20
stepOutNs = 100_000_000'u64
outOffsetNs = 2_300_000_000'u64 # for 20 mesg they sent 2 seconds earlier
@@ -424,7 +424,7 @@ suite "Waku Sync: reconciliation":
var inWinHashes, outWinHashes: HashSet[WakuMessageHash]
var ts = sliceStart
var ts = sliceStart + (Timestamp(stepIn) * 2)
for _ in 0 ..< diffInWin:
let msg = fakeWakuMessage(ts = Timestamp ts, contentTopic = DefaultContentTopic)
let hash = computeMessageHash(DefaultPubsubTopic, msg)
@@ -462,7 +462,7 @@ suite "Waku Sync: reconciliation":
check remoteNeeds.len == diffInWin
for _ in 0 ..< diffInWin:
let (_, deliveredHashes) = await remoteNeeds.get()
let (_, deliveredHashes) = await remoteNeeds.popFirst()
check deliveredHashes in inWinHashes
check deliveredHashes notin outWinHashes
+1 -1
+1 -1
View File
@@ -1,5 +1,5 @@
import
std/[times, strutils, os, sets, strformat],
std/[times, strutils, os, sets, strformat, tables],
results,
chronos,
chronos/threadsync,
+6 -1
View File
@@ -96,7 +96,12 @@ proc readValue*[T](r: var EnvvarReader, value: var T) {.raises: [SerializationEr
var reader = findFieldReader(fields[], fieldName, expectedFieldPos)
if reader != nil:
reader(value, r)
try:
reader(value, r)
except ValueError, IOError:
raise newException(
SerializationError, "Couldn't read field: " & getCurrentExceptionMsg()
)
discard r.key.pop()
else:
const typeName = typetraits.name(T)
+1 -1
View File
@@ -1,7 +1,7 @@
## This module reinforces the publish operation with regular store-v3 requests.
##
import std/sequtils
import std/[sequtils, tables]
import chronos, chronicles, libp2p/utility
import
./delivery_callback,
+1 -1
View File
@@ -1,7 +1,7 @@
{.push raises: [].}
import
std/[options, sets, sequtils, times, strformat, strutils, math, random],
std/[options, sets, sequtils, times, strformat, strutils, math, random, tables],
chronos,
chronicles,
metrics,
+2 -1
View File
@@ -53,7 +53,8 @@ proc withWssTransport*(
upgr,
tlsPrivateKey = key,
tlsCertificate = cert,
{TLSFlags.NoVerifyHost, TLSFlags.NoVerifyServerName},
autotls = nil, # required 5th param
tlsFlags = {TLSFlags.NoVerifyHost, TLSFlags.NoVerifyServerName},
)
)
+29 -17
View File
@@ -40,30 +40,42 @@ proc readValue*(
value = Base64String(reader.readValue(string))
proc decodeFromJsonString*[T](
t: typedesc[T], data: JsonString, requireAllFields = true
t: typedesc[T], data: JsonString, requireAllFields: bool = true
): SerdesResult[T] =
try:
ok(
RestJson.decode(
string(data), T, requireAllFields = requireAllFields, allowUnknownFields = true
if requireAllFields:
ok(
RestJson.decode(
string(data), T, requireAllFields = true, allowUnknownFields = true
)
)
else:
ok(
RestJson.decode(
string(data), T, requireAllFields = false, allowUnknownFields = true
)
)
)
except SerializationError:
# TODO: Do better error reporting here
err("Unable to deserialize data")
# Internal static implementation
proc decodeFromJsonBytes*[T](
t: typedesc[T], data: openArray[byte], requireAllFields = true
t: typedesc[T], data: openArray[byte], requireAllFields: bool = true
): SerdesResult[T] =
try:
ok(
RestJson.decode(
string.fromBytes(data),
T,
requireAllFields = requireAllFields,
allowUnknownFields = true,
if requireAllFields:
ok(
RestJson.decode(
string.fromBytes(data), T, requireAllFields = true, allowUnknownFields = true
)
)
else:
ok(
RestJson.decode(
string.fromBytes(data), T, requireAllFields = false, allowUnknownFields = true
)
)
)
except SerializationError:
err("Unable to deserialize data: " & getCurrentExceptionMsg())
@@ -95,16 +107,16 @@ proc encodeIntoJsonBytes*(value: auto): SerdesResult[seq[byte]] =
#### helpers
proc encodeString*(value: string): RestResult[string] =
proc encodeString*(value: string): SerdesResult[string] =
ok(value)
proc decodeString*(t: typedesc[string], value: string): RestResult[string] =
proc decodeString*(t: typedesc[string], value: string): SerdesResult[string] =
ok(value)
proc encodeString*(value: SomeUnsignedInt): RestResult[string] =
proc encodeString*(value: SomeUnsignedInt): SerdesResult[string] =
ok(Base10.toString(value))
proc decodeString*(T: typedesc[SomeUnsignedInt], value: string): RestResult[T] =
proc decodeString*(T: typedesc[SomeUnsignedInt], value: string): SerdesResult[T] =
let v = Base10.decode(T, value)
if v.isErr():
return err(v.error())
+1 -1
View File
@@ -1,6 +1,6 @@
{.push raises: [].}
import std/options, results, chronicles, chronos, metrics, bearssl/rand
import std/[options, tables], results, chronicles, chronos, metrics, bearssl/rand
import
../node/peer_manager, ../utils/requests, ./protocol_metrics, ./common, ./rpc_codec
+1 -1
View File
@@ -1,7 +1,7 @@
{.push raises: [].}
import
std/sets,
std/[sets, tables],
results,
chronicles,
chronos,