Commit Graph

59 Commits

Author SHA1 Message Date
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
Jakub Sokołowski 0d2a8b6ddf ci: rename bridge to wakubridge
This makes the current `Dockerfile` usable with `wakubridge`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-03-10 10:06:53 +01:00
Daniel Kaiser dbe76d29ce
discv5 stage1 beta test (#862)
* update vendor/nim-eth submodule

point to the selectable `protocol-id` feature branch

* use d5waku as protocol-id

Use compiletime flag to change the discv5 protocol-id to "d5waku" allowing
nim-waku to span a separate discv5 network

* waku discv5 first beta stage

  - start discv5 during node start
  - added config options for discv5

* fix: pass to tcp port also when specifying ext ip

* bump nim-eth

Co-authored-by: ksr <kaiserd@users.noreply.github.com>
2022-03-01 15:11:56 +01:00
Sanaz Taheri Boshrooyeh a5f8b90c23
Enables RLN compilation under CI env var (#786)
* compiles RLN if CI is defined

* minor ineffective change

* minor

* removes excess space

* resolves namespace conflicts

* moves pubsub import under compiler flag

* disables rln on-chain tests

* brings back the on-chain tests and fixes a name mismatch

* adds a debug log message

* minor formating

* kills ganache-cli procces on windows

* wip: adds a line to kill ganache-cli on windows

* disables rln-relay tests that depend on ganache-cli

* disables ganache-cli installation

* introduces onchain rln flag

* fixes a flaky test

* enables onchain test in non-windows CIs

* moves variables around

it seems detected_os is undefined, hence the compiler flag onchain_rln, which is conditioned to the os, does not get added

* limits onchain rln to macOS
2022-01-28 13:57:17 -08:00
Hanno Cornelius cf4a1e1c70
Update submodules with bugfixes (#826) 2022-01-24 12:48:06 +01:00
oskarth 108599a1ed
Whisper tests (#678)
* Remove leftover comment

* Import Whisper tests

* Update copyright to 2018-2021

* Fix whisper import paths

* Whisper tests and Makefile target
2021-07-19 17:54:36 +08:00
Jakub Sokołowski 8f7a800b41 ci: improve GitHub actions build times
Splitting builds and tests into more stages for clarity.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-06-29 17:36:52 +02:00
Kim De Mey e2ea94dc71
Remove the need for pcre (#623) 2021-06-15 09:51:09 +02:00
Oskar Thorén be717ce5f3
Improve libwaku and C wrappers (#613)
- Move stuff to Makefile
- Move libwaku to root
- Make examples compile for C and Go
- Update README
2021-06-13 20:50:10 +08:00
Sanaz Taheri Boshrooyeh 2fe53c334c
Make rln optional (dependencies and compilation) (#602)
* makes rlnlib target optional

* makes the rln-related targets conditioned to the RLN command line flag

* adds the rln compiler flag condition

* adds the rln compiler flag condition to the rln module

* wakunode2 rln conditional compilation

* updates wakunode2 test

* updates waku rln relay tests

* removing the rln test from the default imports of the v2 tests

* imports rln module conditionally

* removes the rln flag condition from the rln module

* separates rln data types from its procs

* adds the import statement

* brings back the contract def to the rln utils

* adds rln module import to the rln unit tests

* clean up and reorganization

* adds a todo

* minor edits on a comment
2021-06-08 11:56:32 -07:00
Hanno Cornelius c5e7580149
Add chat2-matterbridge (#532)
* Add chat2-matterbridge

* Update waku/common/README.md

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
2021-05-06 15:43:43 +02:00
Sanaz Taheri Boshrooyeh 168f8d1e1d
Adds rln as a submodule (#402)
* adds rln as submodule

* removes the duplicate rln submodule

* adds rln

* Delete waku.nims
2021-03-02 12:57:48 -08:00
Sanaz Taheri Boshrooyeh e152ed349f
Integrate registration into wakunode and Enable signed registration transactions (#385)
* cleans up imported modules

* adds uploadContract proc and consolidates rln-relay test files

* deletes test_rln_relay_wrappers

* deletes wrappers tests

* adds waku_rln_relay_utils

* adds the unit test for the membership key generation

* adds the key generation procedure

* adds unit test of key gen proc

* adds RLNRelayPeer data type

* adds the register proc

* adds the register proc unit test

* minor

* edits registration test

* adds comments to the registration unit test and relocates some constants

* defines constants variables for membership contract inputs and adds todos

* fixes a typo

* enables signed transaction

* adds registration into waku rln relay

* adds a TODO

* adds debug notes

* WIP add registration test

* integrates rln relay inputs into the mountRelay proc

* minor

* adds mountRelay

* renames RlnRelayPeer to WakuRlnRelay

* adds debugging notes

* changes the test title

* adds rln to gitignore

* cleans up tests, fixes a bug

* exposes mountRlnrelay, adds some comments

* fixes a bug

* deletes async pragma from mountRelay

* exposes the wakuRlnRelay field

* adds bash command to delete any existing rln directory before cloning the rln repo

* removes -v verbose flag from rln removal

* replaces await with WaitFor

* embed mountRlnRelay inside mountRelay
2021-02-22 09:40:02 -08:00
Sanaz Taheri Boshrooyeh f64c701821
rlnlib dependency (#376)
* adds rlnlib dependency

* clones the full-node branch of rln repository

* moves rlnlib dependency to the deps target

* changes rlnlib path

* adds test_rln_relay_wrappers to the v2 tests

* loads rlnlib with different extensions based on the OS

* deletes unnecessary imports

* changes rlnlib extension to .exe for windows

* minor

* list files in rln/target/debug

* edits rln lib name for windows

* removes unnecessary commands

* edits some comments

* fetches specific commit of rln library
2021-02-12 12:12:10 -08:00
Sanaz Taheri Boshrooyeh 4f9a838668
Rln-relay/contract dependencies (#349)
* adds the script to detect os

* comments out the os detection code

* detects os

* adds ganache installation and termination

* updates the contract test

* adds rln-relay test to the waku v2 tests

* updates test_web3 comment
2021-02-04 11:30:00 -08:00
Dean Eigenmann 125530c46b
Update Makefile 2020-12-21 12:50:15 +01:00
Dean Eigenmann f15054b1e0
fix/docs (#328) 2020-12-21 12:32:02 +01:00
Kim De Mey dcbefbf4d6
Wakuv1v2 process (#238)
* Add start of wakubridge with only waku v1 node for now

* Add waku v2 node to wakubridge

* Add bridge target to makefile

* Keep waku v1 PoW configurable

* Fix for latest WakuNode API

* Fix Makefile target all

* Rename to config_bridge and at brief docs on bridge

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
2020-10-21 17:54:29 +08:00
Kim De Mey daeb736335
Cleanup warnings in v1 and split test target in Makefile (#211)
* Cleanup warnings in v1 and split test target in Makefile

* Remove protocol2 target and get chat2 build in CI
2020-10-08 11:10:45 +02:00
Oskar Thorén a6e94bf171
Node Info API call. (#202)
RPC node info

fix Makefile error

fix rpc query error

add rpc_node_info to scripts target

hm

node info -> info

consistent query node ref

Add info to node api

update node api docs

update node api doc for consistency and accuracy

minor
2020-10-06 11:33:28 +08:00
Dean Eigenmann 065016393a
fix/makefile (#194)
* rename make targets

* rename

* fixes

* fix

* fix

* added example 2

* fix

* fix

* silly me
2020-10-03 13:26:49 +08:00
Oskar Thorén 75be455272
Basic end to end chat for Dingpu (#195)
* End to end chat example for Dingpu

Partially based on directchat example and previous example code.

Also adds existing cluster node to Nangang README.

* Update waku.nimble

* Update Makefile

Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com>

* Update Makefile

Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com>
2020-10-01 19:38:32 +08:00
Jakub Sokołowski 34353cc96e parametrize Dockerfile to make wakunode2
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-09-11 08:23:38 +02:00
Oskar Thorén e5f0f36f01
Add basic rpc scripts to publish and subscribe (#140)
* Add basic rpc scripts to publish and subscribe

* Fix publish topic and payload script

Also change parameter name in waku relay due to weird shadowing of log
topic:

DBG 2020-09-09 12:07:54+08:00 waku_publish                               tid=8795 file=wakurpc.nim:30 topic=waku payload=@[]
DBG 2020-09-09 12:07:54+08:00 publish                                    tid=8795 file=waku_relay.nim:65 topic=WakuRelay

Above should show topic=waku but it gets topic=WakuRelay from log scope
for some reason.

* Scripts take arguments

* Add basic nangang tutorial

* Update docs/tutorial/nangang.md

Co-authored-by: Kim De Mey <kim.demey@gmail.com>

* Update docs/tutorial/nangang.md

Co-authored-by: Kim De Mey <kim.demey@gmail.com>

* meh

* ENsure subscribe call succeeds

Co-authored-by: Kim De Mey <kim.demey@gmail.com>
2020-09-10 12:18:35 +08:00
Oskar Thorén e8d3156571
Make basic Waku v2 examples run again (#123)
* Make basic Waku v2 examples run again

Regression introduced in https://github.com/status-im/nim-waku/pull/117

Happened due to example not being run on CI.

- Add wakuexample to all target
- Fix example2 to run
- Basic formatting

* Update examples/v2/basic2.nim

Co-authored-by: Kim De Mey <kim.demey@gmail.com>

* Update examples/v2/basic2.nim

* Update examples/v2/basic2.nim

* Update examples/v2/basic2.nim

Co-authored-by: Kim De Mey <kim.demey@gmail.com>
2020-09-01 16:32:19 +08:00
Kim De Mey 4314dcf6e9
Add Waku v1 usage example, fix #54 (#106)
* Add Waku v1 usage example, fix #54

* Add readme for example and fix typos
2020-08-26 14:20:04 +02:00
Oskar Thorén 28f21f0920
Refactor Makefile and remove old task (#107) 2020-08-26 11:02:56 +02:00
Oskar Thorén e493c84b2a
Add basic example usage for Waku v2 (#52)
* Make Waku node async and gcsafe, hacky

...but the nimbus people are doing it!

* Add skeleton example usage

* Rename example to basic2 and add to Makefile

* Sketch out basic example and qualify imports etc

Loading config to start with.

Quite messy with imports/ambiguous identifiers/qualified names. Probably a
better way with exports (hide implementation details) and fully qualified names
by default?

* Example usage run, public run function

* Sketch out API usage

* Example basic RPC client usage

* waitFor run to compile

* Remove run and gsync markers; adjust example
2020-07-20 12:40:35 +08:00
Kim De Mey 95438b9389
Bump vendor, fix builds and add v2 to CI (#45)
* Fix v2 builds, break v1 builds

* Fix build after nim-eth bump

* Add waku v2 build and tests to CI

* Fix parallel build issues by renaming
2020-07-13 12:08:03 +02:00
Ștefan Talpalaru f38bdf2900
bump vendor/nimbus-build-system (#36) 2020-07-01 09:43:23 +02:00
Jakub Sokołowski 89ced4253c use -d:chronicles_colors:none when creating docker image
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-04 15:02:56 +02:00
Jakub Sokołowski 8a648a44aa add a Dockerfile for creating nim-waku images
Also I remove old Dockerfile at waku/node/v1/docker.

Images are uploaded to our Docker Hub account:
https://hub.docker.com/r/statusteam/nim-waku

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-27 12:51:20 +02:00