mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-08-24 23:11:12 +00:00
chore: bump dependencies to v0.37.0 (#3536)
This commit is contained in:
@@ -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 ../../../../..
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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,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,
|
||||
|
||||
@@ -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 ../../../../..
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule vendor/nim-bearssl updated: 667b40440a...11e798b62b
Vendored
+1
-1
Submodule vendor/nim-chronicles updated: a8fb38a10b...54f5b72602
Vendored
+1
-1
Submodule vendor/nim-dnsdisc updated: c3d37c2860...b71d029f4d
Vendored
+1
-1
Submodule vendor/nim-eth updated: a1f7d63aba...d9135e6c3c
Vendored
+1
-1
Submodule vendor/nim-faststreams updated: c51315d0ae...c3ac3f639e
Vendored
+1
-1
Submodule vendor/nim-json-rpc updated: cbe8edf69d...9665c26503
Vendored
+1
-1
Submodule vendor/nim-json-serialization updated: 2b1c5eb11d...0640259af2
Vendored
+1
-1
Submodule vendor/nim-libbacktrace updated: 8228498749...d8bd4ce5c4
Vendored
+1
-1
Submodule vendor/nim-libp2p updated: cd60b254a0...5eaa43b860
Vendored
+1
-1
Submodule vendor/nim-minilru updated: 2682cffa87...0c4b2bce95
Vendored
+1
-1
Submodule vendor/nim-nat-traversal updated: dfbf8c9ad3...860e18c376
Vendored
+1
-1
Submodule vendor/nim-presto updated: 3ccb356220...92b1c7ff14
Vendored
+1
-1
Submodule vendor/nim-secp256k1 updated: f808ed5e7a...9dd3df6212
Vendored
+1
-1
Submodule vendor/nim-serialization updated: 2086c99608...6f525d5447
Vendored
+1
-1
Submodule vendor/nim-sqlite3-abi updated: d08e964872...bdf01cf423
Vendored
+1
-1
Submodule vendor/nim-stew updated: 58abb4891f...e574001496
Vendored
+1
-1
Submodule vendor/nim-stint updated: 1a2c661e3f...470b789256
Vendored
+1
-1
Submodule vendor/nim-web3 updated: 3ef986c9d9...81ee8ce479
Vendored
+1
-1
Submodule vendor/nimbus-build-system updated: 0be0663e1a...e6c2c9da39
Vendored
+1
-1
Submodule vendor/nimcrypto updated: 19c41d6be4...721fb99ee0
Vendored
+1
-1
Submodule vendor/waku-rlnv2-contract updated: b7e9a9b1bc...900d4f95e0
@@ -1,5 +1,5 @@
|
||||
import
|
||||
std/[times, strutils, os, sets, strformat],
|
||||
std/[times, strutils, os, sets, strformat, tables],
|
||||
results,
|
||||
chronos,
|
||||
chronos/threadsync,
|
||||
|
||||
@@ -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,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,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,
|
||||
|
||||
@@ -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},
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -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,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,7 +1,7 @@
|
||||
{.push raises: [].}
|
||||
|
||||
import
|
||||
std/sets,
|
||||
std/[sets, tables],
|
||||
results,
|
||||
chronicles,
|
||||
chronos,
|
||||
|
||||
Reference in New Issue
Block a user