Skip to content

Commit

Permalink
Merge branch 'master' into fix-checking-for-keystore-file
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmer authored Feb 15, 2024
2 parents 85b4553 + 22026b7 commit 2e92fbe
Show file tree
Hide file tree
Showing 32 changed files with 447 additions and 195 deletions.
67 changes: 65 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,71 @@
## v0.25.0 (2024-02-06)

> **Note:**
> Waku Filter v2 now has three additional configuration options
> `--filter-max-peers-to-serve=1000` drives how many peers can subscribe at once and
> `--filter-max-criteria=1000` defines what is the maximum criterion stored per each peers
>
> This release introduces a major change in Filter v2 protocol subscription management.
> From now each subscribed peer needs to refresh its living subscriptions by sending a SUBSCRIBER_PING message every 5 minutes by default, otherwise the peer's subscription will be removed.
> `--filter-subscription-timeout=300` defines configurable timeout for the subscriptions (*in seconds*).
>
> New experimental feature, shard aware peer manager for relay protocol can be activated by the flag:
> `--relay-shard-manager=true|false`
> It is disabled by default.
> **Announcement:**
>
> Please notice that from the next release (0.26.0) we will deprecate features.
>
> - JSON-RPC API will be removed completely. Instead we recommend you to utilize REST API endpoints that have same and extended functionality.
> - We will retire websockets support for RLN on-chain group management. You are expected to use HTTP version of ETH_CLIENT_ADDRESS
### Features

- running validators in /relay/v1/auto/messages/{topic} ([#2394](https://github.com/waku-org/nwaku/issues/2394)) ([e4e147bc](https://github.com/waku-org/nwaku/commit/e4e147bc))
- **rln-relay-v2:** update C FFI api's and serde ([#2385](https://github.com/waku-org/nwaku/issues/2385)) ([b88facd0](https://github.com/waku-org/nwaku/commit/b88facd0))
- running validators in /relay/v1/messages/{pubsubTopic} ([#2373](https://github.com/waku-org/nwaku/issues/2373)) ([59d8b620](https://github.com/waku-org/nwaku/commit/59d8b620))
- shard aware relay peer management ([#2332](https://github.com/waku-org/nwaku/issues/2332)) ([edca1df1](https://github.com/waku-org/nwaku/commit/edca1df1))

### Bug Fixes

- adding rln validator as default ([#2367](https://github.com/waku-org/nwaku/issues/2367)) ([bb58a63a](https://github.com/waku-org/nwaku/commit/bb58a63a))
- Fix test for filter client receiving messages after restart ([#2360](https://github.com/waku-org/nwaku/issues/2360)) ([7de91d92](https://github.com/waku-org/nwaku/commit/7de91d92))
- making filter admin data test order independent ([#2355](https://github.com/waku-org/nwaku/issues/2355)) ([8a9fad29](https://github.com/waku-org/nwaku/commit/8a9fad29))

### Changes

- **rln-relay-v2:** use rln-v2 contract code ([#2381](https://github.com/waku-org/nwaku/issues/2381)) ([c55ca067](https://github.com/waku-org/nwaku/commit/c55ca067))
- v0.25 vendor bump and associated fixes ([#2352](https://github.com/waku-org/nwaku/issues/2352)) ([761ce7b1](https://github.com/waku-org/nwaku/commit/761ce7b1))
- handle errors w.r.t. configured cluster-id and pubsub topics ([#2368](https://github.com/waku-org/nwaku/issues/2368)) ([e04e35e2](https://github.com/waku-org/nwaku/commit/e04e35e2))
- add coverage target to Makefile ([#2382](https://github.com/waku-org/nwaku/issues/2382)) ([57378873](https://github.com/waku-org/nwaku/commit/57378873))
- Add check spell allowed words ([#2383](https://github.com/waku-org/nwaku/issues/2383)) ([c1121dd1](https://github.com/waku-org/nwaku/commit/c1121dd1))
- adding nwaku compose image update to release process ([#2370](https://github.com/waku-org/nwaku/issues/2370)) ([4f06dcff](https://github.com/waku-org/nwaku/commit/4f06dcff))
- changing digest and hash log format from bytes to hex ([#2363](https://github.com/waku-org/nwaku/issues/2363)) ([025c6ec9](https://github.com/waku-org/nwaku/commit/025c6ec9))
- log messageHash for lightpush request that helps in debugging ([#2366](https://github.com/waku-org/nwaku/issues/2366)) ([42204115](https://github.com/waku-org/nwaku/commit/42204115))
- **rln-relay:** enabled http based polling in OnchainGroupManager ([#2364](https://github.com/waku-org/nwaku/issues/2364)) ([efdc5244](https://github.com/waku-org/nwaku/commit/efdc5244))
- improve POST /relay/v1/auto/messages/{topic} error handling ([#2339](https://github.com/waku-org/nwaku/issues/2339)) ([f841454e](https://github.com/waku-org/nwaku/commit/f841454e))
- Refactor of FilterV2 subscription management with Time-to-live maintenance ([#2341](https://github.com/waku-org/nwaku/issues/2341)) ([c3358409](https://github.com/waku-org/nwaku/commit/c3358409))
- Bump `nim-dnsdisc` ([#2354](https://github.com/waku-org/nwaku/issues/2354)) ([3d816c08](https://github.com/waku-org/nwaku/commit/3d816c08))
- postgres-adoption.md add metadata title, description, and better first-readable-title ([#2346](https://github.com/waku-org/nwaku/issues/2346)) ([2f8e8bcb](https://github.com/waku-org/nwaku/commit/2f8e8bcb))
- fix typo ([#2348](https://github.com/waku-org/nwaku/issues/2348)) ([a4a8dee3](https://github.com/waku-org/nwaku/commit/a4a8dee3))

This release supports the following [libp2p protocols](https://docs.libp2p.io/concepts/protocols/):
| Protocol | Spec status | Protocol id |
| ---: | :---: | :--- |
| [`11/WAKU2-RELAY`](https://rfc.vac.dev/spec/11/) | `stable` | `/vac/waku/relay/2.0.0` |
| [`12/WAKU2-FILTER`](https://rfc.vac.dev/spec/12/) | `draft` | `/vac/waku/filter/2.0.0-beta1` <br />`/vac/waku/filter-subscribe/2.0.0-beta1` <br />`/vac/waku/filter-push/2.0.0-beta1` |
| [`13/WAKU2-STORE`](https://rfc.vac.dev/spec/13/) | `draft` | `/vac/waku/store/2.0.0-beta4` |
| [`19/WAKU2-LIGHTPUSH`](https://rfc.vac.dev/spec/19/) | `draft` | `/vac/waku/lightpush/2.0.0-beta1` |
| [`66/WAKU2-METADATA`](https://rfc.vac.dev/spec/66/) | `raw` | `/vac/waku/metadata/1.0.0` |

The Waku v1 implementation has been removed from this repository and can be found in a separate [Waku Legacy](https://github.com/waku-org/waku-legacy) repository.

## v0.24.0 (2024-01-10)

> Note: The Waku message size limit (150 KiB) is now enforced according to the specifications. To change this limit please use `--max-msg-size="1MiB"`
> Note: `--ip-colocation-limit=2` is the new parameter for limiting connections from the same IP
> Note: `--ip-colocation-limit=2` is the new parameter for limiting connections from the same IP
## What's Changed

Expand Down Expand Up @@ -257,7 +320,7 @@ The Waku v1 implementation has been removed from this repository and can be foun

This patch release addresses the following issues:
- WSS connections being suddenly terminated under rare conditions
- Ability for the user to control announced multiaddresses
- Ability for the user to control announced multiaddresses

### Changes

Expand Down
17 changes: 9 additions & 8 deletions apps/wakunode2/app.nim
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,13 @@ proc setupProtocols(node: WakuNode,
except CatchableError:
return err("failed to mount libp2p ping protocol: " & getCurrentExceptionMsg())

if conf.rlnRelay:
var onFatalErrorAction = proc(msg: string) {.gcsafe, closure.} =
## Action to be taken when an internal error occurs during the node run.
## e.g. the connection with the database is lost and not recovered.
error "Unrecoverable error occurred", error = msg
quit(QuitFailure)

if conf.rlnRelay:
when defined(rln_v2):
let rlnConf = WakuRlnConfig(
rlnRelayDynamic: conf.rlnRelayDynamic,
Expand All @@ -472,6 +477,7 @@ proc setupProtocols(node: WakuNode,
rlnRelayCredPassword: conf.rlnRelayCredPassword,
rlnRelayTreePath: conf.rlnRelayTreePath,
rlnRelayUserMessageLimit: conf.rlnRelayUserMessageLimit,
onFatalErrorAction: onFatalErrorAction,
)
else:
let rlnConf = WakuRlnConfig(
Expand All @@ -482,6 +488,7 @@ proc setupProtocols(node: WakuNode,
rlnRelayCredPath: conf.rlnRelayCredPath,
rlnRelayCredPassword: conf.rlnRelayCredPassword,
rlnRelayTreePath: conf.rlnRelayTreePath,
onFatalErrorAction: onFatalErrorAction,
)

try:
Expand All @@ -490,18 +497,12 @@ proc setupProtocols(node: WakuNode,
return err("failed to mount waku RLN relay protocol: " & getCurrentExceptionMsg())

if conf.store:
var onErrAction = proc(msg: string) {.gcsafe, closure.} =
## Action to be taken when an internal error occurs during the node run.
## e.g. the connection with the database is lost and not recovered.
error "Unrecoverable error occurred", error = msg
quit(QuitFailure)

# Archive setup
let archiveDriverRes = ArchiveDriver.new(conf.storeMessageDbUrl,
conf.storeMessageDbVacuum,
conf.storeMessageDbMigration,
conf.storeMaxNumDbConnections,
onErrAction)
onFatalErrorAction)
if archiveDriverRes.isErr():
return err("failed to setup archive driver: " & archiveDriverRes.error)

Expand Down
7 changes: 5 additions & 2 deletions ci/Jenkinsfile.release
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.6'

pipeline {
agent { label 'linux' }

Expand Down Expand Up @@ -98,10 +101,10 @@ pipeline {

post {
success { script {
def discord = load "${WORKSPACE}/ci/discord.groovy"
discord.send(
header: 'Nim-Waku deployment successful!',
header: '**Nim-Waku deployment successful!**',
cred: 'discord-waku-deployments-webhook',
descPrefix: "Image: [`${IMAGE_NAME}:${IMAGE_TAG}`](https://hub.docker.com/r/${IMAGE_NAME}/tags?name=${IMAGE_TAG})"
)
} }
always { sh 'docker image prune -f' }
Expand Down
40 changes: 0 additions & 40 deletions ci/discord.groovy

This file was deleted.

2 changes: 1 addition & 1 deletion examples/cbindings/waku_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ int main(int argc, char** argv) {
printf("Bind addr: %s:%u\n", cfgNode.host, cfgNode.port);
printf("Waku Relay enabled: %s\n", cfgNode.relay == 1 ? "YES": "NO");

waku_set_event_callback(event_handler, userData);
waku_set_event_callback(ctx, event_handler, userData);
waku_start(ctx, event_handler, userData);

printf("Establishing connection with: %s\n", cfgNode.peers);
Expand Down
3 changes: 2 additions & 1 deletion library/callback.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
type
WakuCallBack* = proc(callerRet: cint,
msg: ptr cchar,
len: csize_t) {.cdecl, gcsafe, raises: [].}
len: csize_t,
userData: pointer) {.cdecl, gcsafe, raises: [].}
7 changes: 5 additions & 2 deletions library/libwaku.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#ifndef __libwaku__
#define __libwaku__

#include <stddef.h>

// The possible returned values for the functions that return int
#define RET_OK 0
#define RET_ERR 1
Expand All @@ -15,7 +17,7 @@
extern "C" {
#endif

typedef void (*WakuCallBack) (int callerRet, const char* msg, size_t len);
typedef void (*WakuCallBack) (int callerRet, const char* msg, size_t len, void* userData);

// Creates a new instance of the waku node.
// Sets up the waku node from the given configuration.
Expand All @@ -37,7 +39,8 @@ int waku_version(void* ctx,
WakuCallBack callback,
void* userData);

void waku_set_event_callback(WakuCallBack callback,
void waku_set_event_callback(void* ctx,
WakuCallBack callback,
void* userData);

int waku_content_topic(void* ctx,
Expand Down
Loading

0 comments on commit 2e92fbe

Please sign in to comment.