Commit Graph

1413 Commits

Author SHA1 Message Date
Hanno Cornelius b9d5d28af5
chore: remove references to v2 (#1898)
* chore: remove references to v2

* fix: lingering rln-relay import path
2023-08-09 18:11:50 +01:00
Aaryamann Challani 311f5ea0ad
chore(submodules): use zerokit v0.3.1 only (#1886) 2023-08-09 20:21:06 +05:30
Vaclav Pavlin 84f94d5d09
feat(ci): add docker image builds per PR (#1881) 2023-08-09 13:13:37 +02:00
Alvaro Revuelta 127996f42a
Update nwaku-compose docs (#1899) 2023-08-09 13:10:31 +02:00
Alvaro Revuelta 03363f1bd8
fix: fixes out of bounds crash when waku2 is not set (#1895) 2023-08-08 16:22:53 +02:00
Ivan Folgueira Bande c8446aebca
Adding milestone issue template inspired by the one present in the `pm` repo (#1891) 2023-08-08 13:13:14 +02:00
Hanno Cornelius ab344a9dec
chore: remove Waku v1 and wakubridge code (#1874)
* 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
2023-08-07 15:11:46 +01:00
NagyZoltanPeter 08ff667227
feat: Rest API interface for legacy (v1) filter service. (#1851)
* Added Rest API interface for legacy (v1) filter service with tests.
2023-08-04 11:34:22 +02:00
Vaclav Pavlin 831a093f25
fix(wakucanary): add enr record to builder (#1882) 2023-08-04 07:22:31 +02:00
Vaclav Pavlin 2fc48842b7
fix: check nil before calling clearTimer (#1869) 2023-08-02 13:31:14 +02:00
Ivan Folgueira Bande be5dc8f379
Adding example on how to integrate a Waku node in NodeJs (#1751) 2023-08-02 10:45:15 +02:00
Aaryamann Challani 4756ccc179
fix(rln-relay): mark duplicated messages as spam (#1867)
* fix(rln-relay): mark duplicated messages as spam

* chore: fix fn desc
2023-08-02 10:40:18 +05:30
Simon-Pierre Vivier afb93e2995
feat: autosharding content topics in config (#1856)
- added content topic to config.
- updated ENR building to include content topics.
2023-08-01 16:01:44 -04:00
Simon-Pierre Vivier bbff1ac138
feat: autosharding core algorithm (#1854)
- basic rendezvous hashing
- content topic parsing
- sharding config
- tests
2023-08-01 09:05:16 -04:00
Ivan Folgueira Bande 0b2cfae5a4
feat(cbindings): tiny waku relay example in Python (#1793)
* Adding an example on how to integrate nwaku library (libwaku.so) in Python
* Adding requirements file
2023-07-31 17:54:26 +02:00
Vaclav Pavlin c560af119f
fix(ci): do not depend on number of procesors with job name (#1863) 2023-07-31 15:04:46 +02:00
Ivan Folgueira Bande 069c1ad2a5
refactor(cbindings): libwaku - run waku node in a secondary working thread (#1865)
* Refactoring to have a working waku_thread
2023-07-31 09:52:04 +02:00
LordGhostX d2b6075bdc
chore: update docs link (#1850) 2023-07-28 15:46:02 +10:00
Aaryamann Challani 76c73b62cd
feat(rln-relay): close db connection appropriately (#1858) 2023-07-27 17:21:21 +05:30
Vaclav Pavlin 32c1276f12
docs(changelog): release notes for v0.19.0 (#1861) 2023-07-27 10:31:11 +02:00
Aaryamann Challani bf8fa8b972
test(ci): rln-relay compilation in docker (#1853)
* test(ci): rln-relay compilation in docker

* fix(ci): make explicit digest in base image
2023-07-24 19:25:28 +02:00
Tanguy 08f3bba334
feat: enable TcpNoDelay (#1470) 2023-07-15 16:41:26 +02:00
Ivan Folgueira Bande 1d3410c7bd
fix(libp2p): Updating nim-libp2p to fix the `wss` connectivity issue (#1848)
* Updating nim-libp2p to fix the `wss` connectivity issue

* The `nim-libp2p` adds many changes although we are actually interested
in the latest commit:

> wstransport.nim: avoid re-raising 'TransportOsError' to avoid stopping
`switch.accept` (#929)

* The `nim-stew` bump is needed so that the `nim-libp2p` can compile.

* The changes in `waku_node.nim` are needed due to the changes in
`nim-stew`.

* waku_node.nim: returning a "completed" future within 'statusAndConfidenceHandler'

  This is aimed to avoid the next exception happening in the wakunode:

  ```
  Unhandled defect: Async procedure (service.nim(74)    callHandler)
  yielded `nil`, are you await'ing a `nil` Future? [AssertionDefect]
  ```

  * Adding 'async' to 'statusAndConfidenceHandler' so that it properly returns a Future[void]
2023-07-13 18:00:55 +02:00
Aaryamann Challani 3fe4522a7e
chore(rln-relay): verify proofs based on bandwidth usage (#1844)
* chore(rln-relay): Verify proofs based on bandwidth usage

* fix(rln-relay): make default threshold 0, for backwards compat

* fix(rln-relay): add unit test for bandwidth cutoff

* fix(rln-relay): rlnRelayBandwidthTreshold option
2023-07-07 17:28:37 +05:30
Ivan Folgueira Bande 29614e2e52
Refactoring of libwaku to export only C types (#1845)
* 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.
2023-07-07 10:53:00 +02:00
Aaryamann Challani 4f0bdf9a30
chore(rln-relay): bump zerokit (#1838) 2023-07-04 18:18:09 +05:30
Alvaro Revuelta 17b24cded6
feat: limit relay connections below max conns (#1813) 2023-07-04 13:31:18 +02:00
Ivan Folgueira Bande 661638daaa
chore: bump nim-libp2p to 224f92e 2023-06-30 15:18:07 -04:00
Ivan Folgueira Bande 97d3b9f79f
chore(refactor): Move record creation & fix libwaku compilation (#1833)
* Move record creation & fix libwaku

* app,external_config,internal_config,libwaku,sharding: refactorgin to make it compile

---------

Co-authored-by: SionoiS <simvivier@status.im>
2023-06-29 21:59:53 +02:00
Ivan Folgueira Bande 96aa59ba58
refactor of internal_config to avoid passing a 'WakuNodeConf' item (#1832)
This change is needed so that the `libwaku.nim` code gets simpler. The
`libwaku.nim` can't import the 'WakuNodeConf' type because this is
related to the wakunode2 app, and the library shouldn't know about it.
2023-06-29 11:01:14 +02:00
Ivan Folgueira Bande 88b7481f29
feat(postgres): integration of postgres in wakunode2 (#1808)
* Making the wakunode2 to support postgres driver

* driver/builder.nim: controling possible errors when creating the messages table

* postgres_driver.nim: adding protection in getInt and fixing typo
2023-06-28 18:47:28 +02:00
Simon-Pierre Vivier cf46fb7cf6
chore: discv5 re-org clean-up (#1823)
- Remove discv5 from node and it's builder
- Require a record to init a node (was previously using discv5 record).
- Fix various tests that assumed nodes with discv5.
- Fix ENR creation
- Fix wakubridge
- Fix networkmonitor
2023-06-28 08:57:10 -04:00
Aaryamann Challani e4d9ee1f7a
fix(rln-relay): chunk event fetching (#1830) 2023-06-28 18:00:45 +05:30
Alvaro Revuelta e12c979c4e
chore(networking): disconnect due to colocation ip in conn handler (#1821) 2023-06-28 09:14:11 +02:00
Aaryamann Challani add294a9b1
chore(rln-relay): bump zerokit for version fix (#1822) 2023-06-28 11:42:09 +05:30
Ivan Folgueira Bande 3aefade647
fix(discv5): Fixing issue that prevented the wakunode2 from starting (#1829)
* 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
2023-06-27 15:16:59 -04:00
Jakub Sokołowski ae05f0a848
fix: sanity-check the docker image start
To avoid basic runtime failures due to missing libraries:
```
 > docker run --rm statusteam/nim-waku:deploy-wakuv2-test --version
could not load: libpq.so(.5|)
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-27 19:32:40 +02:00
Ivan Folgueira Bande 3906a9315f
Dockerfile: Adding 'libpq-dev' to the resulting docker image (#1827) 2023-06-27 15:59:17 +02:00
Simon-Pierre Vivier 62d3653022
chore: move discv5 out of node. (#1818)
- Refactor discv5 start, stop & loop.
- Fix tests.
2023-06-27 09:50:11 -04:00
Ivan Folgueira Bande 52894a82d0
refactor(archive): Moving waku archive logic from app.nim to the archive module (#1817)
* Refactoring the Waku Archive. Simplifying the app.nim

This change is needed to accommodate the further PRs where we will integrate Postgres in `wakunode2`.
2023-06-27 13:24:31 +02:00
Alvaro Revuelta 71c4ac1641
chore: add peer manager config to builder (#1816) 2023-06-23 15:30:28 +02:00
Alvaro Revuelta 4573e8c592
fix(ci): fix broken test with wrong import (#1820) 2023-06-23 14:50:58 +02:00
Simon-Pierre Vivier 44f9d8dc0e
chore: discv5 re-org setup (#1815)
Key, netconfig, enr are created at App initialization and config files has been renamed.
2023-06-22 16:58:14 -04:00
Ivan Folgueira Bande a44d4bfbcd
refactor(databases): Creation of the databases folder to keep the logic for sqlite and postgres (#1811)
* Refactoring in sqlite and postgres. Creation of the databases folder.
2023-06-22 11:27:40 +02:00
Simon-Pierre Vivier a4da87bb8c
feat: discovery peer filtering for relay shard (#1804)
Add discv6 predicate that filter peer by static shard.

Co-authored-by: Hanno Cornelius <68783915+jm-clius@users.noreply.github.com>
2023-06-20 12:08:10 -04:00
Ivan Folgueira Bande 5d4fa3ce73
Deprecation of the 'topics' param (#1806) 2023-06-20 13:14:17 +02:00
Simon-Pierre Vivier 50412d1880
sharded topic validation & ENR update (#1795)
Add sharded topic validation and update the node ENR accordingly.
2023-06-19 18:16:25 -04:00
Hanno Cornelius e9028618fd
fix: temporary fix to disable default experimental builds on fleets (#1810) 2023-06-19 17:14:50 +02:00
Aaryamann Challani bbded9eea7
feat(rln-relay): resume onchain sync from persisted tree db (#1805)
* feat(rln-relay): resume onchain sync from persisted tree db

* chore(rln-relay): bump zerokit
2023-06-19 15:21:18 +05:30
Aaryamann Challani f8e270fbe3
fix(rln-relay): tree race condition upon initialization (#1807) 2023-06-19 13:46:05 +05:30