* libwaku: Avoid global variable and changing callback signature
* Better signature for the callback. Two new parameters have been added:
one aimed to allow passing the caller result code; the other
param is to pass an optional userData pointer that might need
to be linked locally with the Context object. For example, this is needed
in Rust to make the passed closures live as
long as the Context.
* waku_example.c: adaptation to the latest changes
* libwaku.h: removing 'waku_set_user_data' function
* libwaku.nim: renaming parameter in WakuCallBack (isOk -> callerRet)
* When adding the dependency with 'librln' to 'libwaku', it is required
to remove the dependency with 'confutils' because the 'nim-confutils'
module prevents the creation of a dynamic library (libwaku.so.)
* waku_example.c: less code is needed because the Waku Thread attends
any Waku event whereas the main thread can have a blocking scanf
to retrieve user inputs.
Filter v2 rest api support implemented
Filter rest api documentation updated with v1 and v2 interface support.
Separated legacy filter rest interface
Fix code and tests of v2 Filter rest api
Filter v2 message push test added
Applied autoshard to Filter V2
Redesigned FilterPushHandling, code style, catch up apps and tests with filter v2 interface changes
Rename of FilterV1SubscriptionsRequest to FilterLegacySubscribeRequest, fix broken chat2 app, fix tests
Changed Filter v2 push handler subscription to simple register
Separate node's filterUnsubscribe and filterUnsubscribeAll
* libwaku: create the WakuNode in the Waku thread. Not in the main thread
* node_lifecycle_request.nim: moving hard-coded value to a const item
* libwaku.nim: start using 'isOkOr' instead of 'isErr()'-approach
* node_lifecycle_request.nim: better 'async' & 'await' usage. Not block the runtime
* chore: remove v1 code
* chore: deprecate support for v1 compatibility from JSON-RPC API
* chore: remove v1 tests from JSON-RPC suite
* chore: remove wakubridge code
* chore: remove v1 compatibility functions
* chore: remove support for v1 payloads from chat2 app
* chore: remove v1 from CI processes
* fix: lingering references to private API functions
* fix: remove v1 compat from chat2
* fix: some more lingering references in tests
* Simplifying libwaku.nim by extracting config parser to config.nim
* Adding json_base_event.nim
* Starting to control-version the libwaku.h
We are creating this libwaku.h inspired by the one that is automatically
generated by the nim compiler when `make libwaku` is invoked. Therefore,
the self-generated header is then placed in:
nimcache/release/libwaku/libwaku.h
* Better waku_example.c organization
* libwaku.nim: better memory management
We need to create a 'cstring' internally from the 'const char*' passed
from outside the library.
We invoke 'allocShared' in order to create the internal 'cstring',
and invoke 'deallocShared' in order to manually free the memory.
* Fixing issue that prevented the wakunode2 from starting
The issue was introduced in PR#1818.
Before this commit, the `wakunode2` app crashed with the next error:
ERR 2023-06-27 15:57:27.268+00:00 5/7 Starting node and protocols failed
topics="wakunode main" tid=1 file=wakunode2.nim:92 error="failed to
start waku discovery v5: "
* fix tests accordingly
* publisher.nim, subscriber.nim: fix
* feat(discv5): added find random nodes with predicate (#1762)
Co-authored-by: Lorenzo Delgado <lnsdev@proton.me>
* chore: play around with sleep times on tests
* chore: simplify flaky tests
* chore: update waku/v2/node/waku_node.nim
Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>
* chore: update tests/v2/test_waku_discv5.nim
Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>
* chore: update examples/v2/subscriber.nim
Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>
---------
Co-authored-by: Lorenzo Delgado <lnsdev@proton.me>
Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>
* chore(docs): fix docs and mark some as deprecated
* Update docs/contributors/continuous-integration.md
Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>
* Update examples/v2/README.md
Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>
* mark TODO with date
* replace nim-waku with nwaku in docs
---------
Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>
Notice that I had to adapt to use 'rlpx_connected_peers' instead
of 'connected_peers' in 'wakunode1.nim' because due to the update
of the 'vendor/nim-eth', which adds the dependency-break with
'confutils' but also includes another changes.
Aside note: we cannot have 'confutils' dependency in 'nim-eth' because
that will prevent the generation of any waku dynamic library.
* feat(cbindings): first commit - waku relay (#1632)
* test_app.nim: fix compilation issue. App.init(..) -> App.new(..)
* Simplifying library name (libwaku) and standardizing function names (waku_*)
* Proper wrapper of the waku_node API and creation of the libwaku.a
* Rolling back changes that are not needed
* Rolling back changes that are out of the scope of this task
* wakunode.nim: Removing unnecessary import
* Aplying PR suggestions
* Renaming 'waku.h' -> 'libwaku.h'
* Use of 'isNil' instead of '== nil'
* libwaku.nim: explicitly setting waku_poll() as gcsafe
* chore: update submodules
* fix: libp2p now provides callback to update peer addrs
* fix: breaking change in EthereumNode constructor
* fix: contentType type has changed (again)
* fix: explicit future type
* fix: nim 1.6.6 error handling requirements
* fix: missed a spot - peer info addrs in sim2
* fix: help compiler a bit here
* refactor(rln): convert 32 bytes arrays to hex as uints
* fix(rln): fix Kilic's proofVerify proc to take stub validRoots
* refactor(rln): use input's length when convert to/from hex
* chore(rln): print more commitments inHex in debug logs
* chore(rln-relay): make account address optional
* fix(rln-relay): onchain test
* chore(chat2): update docs, and handle error case in chat2
* fix(rln-relay): handle registration better