Commit Graph

90 Commits

Author SHA1 Message Date
Ivan Folgueira Bande 11e7394e0d
Adding 'librln' to `libwaku` and cleaning waku_example.c (#2044)
* 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.
2023-09-19 17:01:32 +02:00
Aaryamann Challani 2e515a06ed
chore(rln-relay): logs, updated submodule, leaves_set metric (#2024)
* chore(rln-relay): logs, updated submodule, leaves_set metric

* chore(rln-relay): update build script, fix makefile
2023-09-18 10:56:58 +05:30
Ivan Folgueira Bande e8602021b6
chore(postgres): not loading the libpq library by default & better user feedback (#2028)
* removing implicit dependency with libpq if postgres is not being used.
* We only run the postgres tests when explicitly willing to, i.e. make
POSTGRES=1 test. The reason is that the postgres tests expect a
database instance to be running locally.
2023-09-13 12:45:55 +02:00
Aaryamann Challani 645b034367
feat(rln-relay): removed rln from experimental 🚀 (#2001)
* feat(rln-relay): removed rln from experimental 🚀

* fix(waku_node): if rln-relay is nil, return true

* chore(tests): mark rest health as skipped
2023-09-11 12:02:31 +05:30
Aaryamann Challani ec42e2c758
feat(rln_db_inspector): create rln_db_inspector tool (#1999)
* feat(rln_db_inspector): create rln_db_inspector tool

* Apply suggestions from code review

Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>

---------

Co-authored-by: Ivan Folgueira Bande <128452529+Ivansete-status@users.noreply.github.com>
2023-09-07 18:15:25 +05:30
Aaryamann Challani 1a318c2990
fix(Makefile): invalid path to crate build (#1981) 2023-09-01 16:50:55 +05:30
Aaryamann Challani 9b1d2904c1
fix(Makefile): rln was enabled by default (#1964) 2023-08-30 00:22:22 +05:30
Aaryamann Challani ac25855018
fix(Makefile): error out if rln-keystore-generator not compiled with rln flag (#1960)
* fix(Makefile): error out if rln-keystore-generator not compiled with rln flag

* fix(Makefile): make rln default to true for target
2023-08-29 15:36:22 +05:30
Aaryamann Challani c9b48ea1a0
feat(rln_keystore_generator): wired to onchain group manager (#1931)
* feat(rln_keystore_generator): wired to onchain group manager

* fix(Makefile): rename target to best practice
2023-08-23 18:20:40 +05:30
Aaryamann Challani 3d849541e2
feat(rln): init rln_keystore_generator (#1925)
* feat(rln): init rln_keystore_generator

* chore: mv to tools
2023-08-22 19:53:05 +05:30
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
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
Ivan Folgueira Bande be5dc8f379
Adding example on how to integrate a Waku node in NodeJs (#1751) 2023-08-02 10:45:15 +02:00
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
Vaclav Pavlin 44bcf0f2c4
chore(ci): properly set os and architecture for nightly and release (#1780) 2023-06-06 17:41:41 +02:00
Ivan Folgueira Bande fcd7f33d9b
Allow compile postgres tests only on Linux platforms (#1771)
This is needed because currently the GitHub Actions only supports
starting a docker container in a Linux runners.
2023-06-02 14:53:13 +02:00
Vaclav Pavlin 35520bd0a5
fix(ci): enforce basic CPU instruction set to prevent CI issues (#1759) 2023-05-25 13:38:30 +02:00
Vaclav Pavlin 39902dc2f2
chore(makefile): unify where chronicles_log_level is set (#1748) 2023-05-23 10:44:57 +02:00
Ivan Folgueira Bande d0aa388b39
Makefile, waku.nimble: allow the creation of dynamic library, libwaku.so (#1730) 2023-05-19 08:20:12 +02:00
Vaclav Pavlin ceb54b1821
feat: add release-notes target (#1734)
* feat: add release-notes target

* chore(makefile): add template and sv4git config
2023-05-18 14:45:45 +02:00
Ivan Folgueira Bande 2defbd2301
feat(cbindings): first commit - waku relay (#1632) (#1714)
* 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
2023-05-12 18:08:41 +02:00
Lorenzo Delgado 209579b0a7
chore: move networkmonitor and wakucanary to apps directory 2023-04-27 16:25:31 +02:00
Ivan Folgueira Bande 9b9172ab82
feat(mem-analysis): Adding Dockerfile_with_heaptrack (#1681)
* Adding Dockerfile_with_heaptrack

* build: merge heaptrack dockerfile with production dockerfile (#1682)

* Avoid blindly copy /usr/lib/ and install only the needed libraries

* Adding heaptracker options in the Makefile

* Dockerfile simplification. (apk add libunwind)

* Dockerfile, Makefile: ++heaptrack params to nim build & 'heaptrack_support' in Nim compiler

* Dockerfile, Makefile: more convenient name for 'NIM_COMMIT' Docker arg

* Making 'NIM_COMMIT' more explicit

---------

Co-authored-by: Lorenzo Delgado <lorenzo@status.im>
2023-04-25 17:54:28 +02:00
Lorenzo Delgado c8081c8859
refactor(wakunode2): split setup logic into app module 2023-04-25 15:34:57 +02:00
Lorenzo Delgado 91baa232fb
build: decouple test2 target from testcommon 2023-04-19 17:08:28 +02:00
Vaclav Pavlin d5979e94da
feat: Add tools maket target and build tools in CI (#1668) 2023-04-12 10:22:45 +02:00
Lorenzo Delgado 048ca45dc9
build: added testcommon target to makefile 2023-03-31 15:24:04 +02:00
Aaryamann Challani 179be681c4
feat(rln-relay): fetch release from zerokit ci, or build (#1603)
* feat(rln-relay): fetch release from zerokit ci, or build

* fix(build_rln): shellcheck, move to scripts dir
2023-03-21 13:07:10 +05:30
Jakub Sokołowski 24d6279177
docker: add dash between target and version (#1613)
Instead of ugly:
```
statusteam/nim-waku:wakunode2v0.16.0-1-gb495dd
```
Create better looking:
```
statusteam/nim-waku:wakunode2-v0.16.0-1-gb495dd
```
Annoys me every time I use it.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-03-17 15:04:26 +01:00
Hanno Cornelius 11c19a3751
chore: update submodules (#1601)
* chore: update submodules

* fix: fix peer store test

* fix: legacy build requires Nim binary deps
2023-03-13 16:33:24 +02:00
Aaryamann Challani 6584b58593
feat(rln-relay): use precompiled resources w/ rln (#1578)
* feat(rln-relay): use precompiled resources w/ rln

* chore: remove resource cp stage from Dockerfile

* chore(makefile): remove DOCKER_IMAGE_STAGE from makefile

* chore: bump submodule, rev branch
2023-03-13 12:03:21 +05:30
Aaryamann Challani 2915b19dbd
fix(ci): remove nim doc action temporarily (#1456)
* fix(ci): changes to nim doc input

* fix(ci): remove docs ci
2022-12-12 16:52:46 +05:30
Lorenzo Delgado ab7ee30e24
ci: don't build waku v2 simulation binaries 2022-12-07 15:09:59 +01:00
G 002316cceb
feat(rln): use zerokit as static lib (#1385) 2022-12-06 00:33:03 +01:00
Lorenzo Delgado 0f91f97a9a
ci(jenkins): split dockerfile into production and experimental stages 2022-12-01 12:45:06 +01:00
Lorenzo Delgado 3a4c4c660b
chore(build): simplify project makefile and update dockerfile 2022-11-30 21:02:39 +01:00
G 696bd6bd6b
fix(makefile): fix NIM_PARAMS flag update (#1431) 2022-11-28 20:57:46 +01:00
Aaryamann Challani 63fe1351f5
feat(ci): run experimental features in diff ci (#1410)
* feat(ci): run experimental features in diff ci

* chore(ci): add EXPERIMENTAL flag

* chore(makefile): make compilation cleaner

* fix(rln-relay): remove onchain_rln flag

* fix(makefile): remove experimental_rln flag

Co-authored-by: Lorenzo Delgado <lorenzo@status.im>
2022-11-25 16:03:19 +05:30
Alvaro Revuelta 7917e05d9d
chore(networkmonitor): tool to discover and provide metrics on peers (#1290)
* chore(networkmonitor): initial prototype

* chore(networkmonitor): add cli, metrics and PoC

* feat(utils): add supportsCapability function + tests

* feat(utils): add supportedCapabilites function

* chore(networkmonitor): add metrics with enr/ip/capabilities

* chore(networkmonitor): refactor + tests

* chore(networkmonitor): add discovered timestamp

* chore(networkmonitor): add metrics on connected nodes

* chore(networkmonitor): new flags + utils file + readme

* chore(networkmonitor): add user-agent metrics

* chore(networkmonitor): connect only to randomly discovered peers

* chore(networkmonitor): get location of peer using ip

* chore(networkmonitor): expose peer metrics with simple rest server

* chore(networkmonitor): update README

* chore(networkmonitor): fix wakunode2 to waku_node

* chore(networkmonitor): fix import order

* chore(networkmonitor): fix comments + refactor + pushraises

* chore(networkmonitor): refactor + handle exceptions

* chore(networkmonitor): fix makefile after rebase

* chore(networkmonitor): address review comments 1

* chore(networkmonitor): add nim.cfg
2022-11-10 10:29:34 +01:00
G 63137f3e2a
refactor(rln): remove kilic lib (#1365)
* refactor(rln): remove kilic lib

* chore(rln): address reviewerS
2022-11-09 19:45:04 +01:00
G 17d71faf67
chore(rln): update ganache (#1347)
* chore: build rln dependecies only when building v2

* chore(rln): deprecate ganache-cli; move installation from makefile to test + uninstall; gracefully terminate ganache

* chore: add package.json to gitignore

* fix(rln): move ganache package to build folder and remove package once uninstalled

* refactor(rln): (un)install/run/stop ganache with separate procs

Co-authored-by: Lorenzo Delgado <lorenzo@status.im>
Co-authored-by: Aaryamann Challani <43716372+rymnc@users.noreply.github.com>
2022-11-08 14:28:11 +01:00
Lorenzo Delgado 2c2ce20c4e
chore: build rln dependecies only when building v2 2022-11-07 09:14:21 +01:00
Alvaro Revuelta df6d215424
fix: log-level being ignored (#1272) 2022-10-18 18:03:43 -05:00
Alvaro Revuelta a36de4036b
chore(wakucanary): add canary tool (#1205)
* chore(wakucanary): create folder structure

* chore(wakucanary): spawn waku node

* chore(wakucanary): get supported protocols from lp2p

* chore(wakucanary): add timeout + refactor

* chore(wakucanary): fix comments v1

* chore(wakucanary): update readme

* chore(wakucanary): static->relay, abbr, logLevel, filter issue, colon

* chore(wakucanary): fix typos
2022-10-11 05:58:44 +02:00
Aaryamann Challani a0d8cadcbb
chore(Makefile): Make zerokit the default RLN implementation (#1190)
* chore(ci): add zerokit test

* fix(ci): typo

* fix(Makefile): RLN points to zerokit, RLNKILIC points to kilic impl

* fix(ci): remove zerokit test workflow now that zerokit is default

* fix(Makefile): zerokit in ci

* fix(Makefile): do not compile kilic by default

* test(nix): add llvm to nix shell

* test(nix): clang

* fix(nix): mkShell

* fix(nix): mkShell

* fix(nix): err

* fix(nix): add binutils to macos nix shell

* fix(nix): test with musl-tools

* fix(nix): remove musl-tools

* fix(nix): add Security module

* fix(nix): gcc for linux, clang for macos

* test(Makefile): set CC to env

* Revert "test(Makefile): set CC to env"

This reverts commit fdab95f2cd0bdef916744d793ebf7005dd1d4396.

* test(nimbus-build-system): bad gcc

* fix(nix): remove optional for linux

* Revert "test(nimbus-build-system): bad gcc"

This reverts commit c6b81f8132.

* fix(nix): semicolon

Co-authored-by: G <28568419+s1fr0@users.noreply.github.com>
2022-10-05 11:50:24 +05:30
Jakub Sokołowski c615636885
Makefile: allow overriding GIT_VERSION with env
This is necessary for Nix builds because the sandbox there
does not contain `.git` directory or `git` command.

Also the quotes are pointless.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-09-28 14:30:05 +02:00
G 8a14b5b243
Zerokit RLN integration in nwaku: alternative approach with inline compilation flag (#1060)
* refactor(rln): add inline compilation flags for RLN zerokit

* update submodule

update submodule

* fix(rln): fix wrong merge conflict resolution

* fix(rln): align hardcoded values in light of vacp2p/zerokit/issues/28
2022-08-05 22:58:19 +02:00
Daniel Kaiser 42f48a6892
chore(docker): use NIMFLAGS instead of NIM_PARAMS (#961)
NIM_PARAMS is and internal variable.
NIMFLAGS should be used outside of nimbus build system.

includes:

* fix(docker): copy RLN parameters.key into the container
* chore(makefile): NIMFLAGS in docker img rule
2022-05-17 21:11:07 +02:00
Daniel Kaiser 2f13aff663
feat(jsonrpc): add call returning git version (#919) 2022-03-30 17:17:21 +02:00
Daniel Kaiser 0131d1437e
chore(rln): add cleanrln make rule + docu (#910)
* chore(rln): add cleanrln to make rule

- add `cargo clean` to  `make clean`
- add new `cleanrln` make rule that `cargo clean`s the rln vendor repo

* docs(rln): add trouble shooting section

- list `make cleanrln` as a solution to force rebuilding the rln crate
2022-03-25 16:08:13 +01:00