Commit Graph

270 Commits

Author SHA1 Message Date
Dean Eigenmann a975bf6d70
feature/mount-filter-node-api (#181)
* started working on filter mount

* fixes

* fix indentation

* fixes

* save

* change

* rm

* Update waku_types.nim

* Update waku_filter.nim

* fixes

* fix

* using new filter

* did some testing stuff

* rm

* fix

* updated

* update doc

* fix

* fix

* unasynced

* fix

* w -> node

* rename

* move to content filter

* fix

* method

* rename

* renamed contentFilter -> contentFilters

* readded

* moved

* first test fix

* readded

* no more need

* fixes

* fix

* fix

* fixes

* todo

* removes mother fuck

* Update waku_types.nim
2020-10-02 14:48:56 +02: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
Dean Eigenmann 3eb015ee7b
feature/use-crypto-rng (#190)
* fixes

* fix

* Update waku_types.nim

* fixes

* fix

* Improve the generateRequestId call

Co-authored-by: kdeme <kim.demey@gmail.com>
2020-09-28 23:44:14 +02:00
Dean Eigenmann 25b48bb99e
enhancement/store-message-handler (#185)
* started working on wrapper

* fixes

* changes

* fixes

* Update waku_store.nim
2020-09-25 16:02:13 +02:00
Dean Eigenmann bcc931baf5
feature/rpc-query (#186)
* started working on rpc query

* rpc

* fixes

* setup

* made it work

* update

* Create store.md

* Update nangang.md
2020-09-25 13:35:32 +02:00
Dean Eigenmann 29706734a8
sync/filter-spec-alpha6 (#184) 2020-09-24 14:06:41 +02:00
Dean Eigenmann 1f68e63185
feature/store-query-node-api (#174)
* changes

* fix

* changes

* made the query function work

* added rpc

* whoops

* Update wakurpc.nim

* minor

* fixes

* update docs

* fix

* error handling

* end-to-end waku node test

* Update test_wakunode.nim

* Update waku/node/v2/rpc/wakurpc.nim

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

* Update test_wakunode.nim

* Update wakunode2.nim

* fix

* fix

* shorter

* rm echo

* fix

* added history peer

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
2020-09-24 10:16:25 +08:00
Dean Eigenmann e1414ac922
fix/make-filter-work (#182)
* starts to actually get the filter protocol working

* made it work

* Update all_tests_v2.nim

* Update test_waku_filter.nim
2020-09-23 06:19:37 +02:00
Jakub Sokołowski fabccdeca8 fix Dockerfile by symlinking the wakunode binary
This is necessary becasue `COPY` creates a directory for some reason.

Resolves: #166

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-09-22 23:26:24 +02:00
Dean Eigenmann 1157b6e7c5
bump/dependencies-yet-again (#180) 2020-09-22 15:11:42 +02:00
Oskar Thorén 21283d291c
Don't crash on non WakuMessage in rpc subscribe (#175)
Instead, log stringified version. (This is used for other PoC right now.)
2020-09-22 10:14:39 +08:00
Dean Eigenmann 255e762536
fix/libp2p-protocol-inheritance (#173) 2020-09-18 15:28:19 +02:00
Dean Eigenmann b25c1e10f2
fix/move-protocols-to-node (#172) 2020-09-18 12:14:52 +02:00
Dean Eigenmann 24e2f7dcdc
removed (#171)
Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
2020-09-18 11:48:18 +08:00
Dean Eigenmann 6b866490ad
fix/message-notifier-async (#169)
* made async

* fixes

* unused

* eol
2020-09-17 22:10:41 +02:00
Oskar Thorén 69e4ff8991
Bump relay protocol to beta1 (#164)
As of https://github.com/vacp2p/specs/pull/185
2020-09-17 19:24:27 +08:00
Dean Eigenmann c55635e93e
feature/subscriptions-in-node (#141)
* test

* Update wakunode2.nim

* input from @kdeme

* Update wakunode2.nim

* moved

* Update waku_message.nim

* fixed

* fix

* fix

* fix

* fix

* fix
2020-09-17 10:17:52 +08:00
Oskar Thorén a8dbf8a7b6
Bump submodules (#157)
* Upgrade all submodules

* Use stock standard_setup and remove our version

Switch no longer relies on Pubsub argument

* Fix peerId

* Add reference to WakuRelay in WakuNode

* Use WakuRelay ref directly instead of via switch

* Tweak standard switch sig

* Fix start_network peerid

* Import nim-libp2p utils test

* Use WakuRelay in test utils

* Fix utils imports

* Tweak

* Fix trigger self test

* Disable broken filter test

* Fix and amend logscope topics

* Make subscribe calls async to use await

* Add debug stuff to nimble file

* Await for subscribe content

* Sleeping in tests

* Local checkout fixes

* XXX: Try to use .PubSub on WakuRelay

* Revert "XXX: Try to use .PubSub on WakuRelay"

This reverts commit 3a3139e4cf.

* Only using gossip seems to work

Subscribe for floodsub broken

* Fix await in examples

* Get rid of double publish, still need sleep
2020-09-16 12:23:10 +08:00
Dean Eigenmann dfee0359af
fix/message-notifier-message-to-waku-message (#159)
* update message type

* cleanup
2020-09-16 10:59:10 +08:00
Jakub Sokołowski 8ba3db1a7e
dockerfile: parametrizing entrypoint doesn't work
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-09-11 14:02:13 +02:00
Dean Eigenmann 03895ffaf5
feature/subscribe-to-waku (#152)
* sub by default

* added

* fmt

* fix

* moved

* removed

* fix
2020-09-11 13:28:27 +02:00
Oskar Thorén 4447a93884
JSON RPC: Use WakuNode instead of WakuRelay (#154)
* Using Node publish for JSON RPC

Compiles, untested

* Subscribe and print waku message

* Readable string

* Use actual input
2020-09-11 15:49:45 +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
Kim De Mey 1f3fe21bb9
Minimal changes of splitting API and CLI code to make import in wakurpc work (#153) 2020-09-11 12:16:45 +08:00
Dean Eigenmann 4a5acd224a
spec/alpha-v4 (#151) 2020-09-10 13:16:31 +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
Dean Eigenmann 76e0b49e2b
feature/mount-filter-protocol (#125) 2020-09-07 14:22:46 +02:00
Dean Eigenmann a4c6caa62f
refactor/rename-filter-subscription (#138)
* fixes

* added

* added comment
2020-09-07 13:26:32 +02:00
Dean Eigenmann 5b4e429a19
enhancement/push-based-filter (#136)
* updated protobuf

* updated test
2020-09-07 11:12:27 +02:00
Dean Eigenmann 196c54d6ab
enhancement/filter-rpc-tests (#130)
* added a test for rpc filter

* rm

* fix
2020-09-03 16:42:56 +08:00
Kim De Mey ea079cf7bd
Remove filter parts from relay as this is obsolete (moved to WakuNode) (#132) 2020-09-02 16:52:00 +02:00
Kim De Mey 2717209f05
Move filter.notify to WakuRelay handler and add test (#128) 2020-09-02 11:15:25 +08:00
Dean Eigenmann 7a2bbdff11
feature/mount-store (#111)
* mounts the store protocol

* todo

* Update waku/node/v2/wakunode2.nim

Co-authored-by: Oskar Thorén <me@oskarth.com>

* fix

* Update waku/node/v2/wakunode2.nim

Co-authored-by: Oskar Thorén <me@oskarth.com>

* eol

Co-authored-by: Oskar Thorén <me@oskarth.com>
Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
2020-09-02 11:08:48 +08:00
Kim De Mey 792e71bb60
Add CI job timeout of 60 minutes (#127) 2020-09-01 19:47:16 +02:00
Oskar Thorén f828736e1c
Add support for WakuMessage and merge publish function (#122)
* Add WakuMessage type

* Add WakuMessage encoding and decoding

Also clean up waku_types module and imports

* Clean up waku_relay module

Imports, remove old text test, make fields and functions public, format.

* Publish WakuMessage

Also fix type mismatch in RPC

* Make publish work in examples, node and protocol

* Parse protobuf content in examples

* Update docs

* Update waku/node/v2/waku_types.nim

* Fix compilation error and disable out of date waku test

Co-authored-by: Kim De Mey <kim.demey@gmail.com>
2020-09-01 17:20:38 +02:00
Kim De Mey fd2bb36b15
Fix compile failure + CI endless example run (#126) 2020-09-01 15:43:06 +02: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
Oskar Thorén 67a964be28
Partial filter (#120)
* start work on filter protocol

* init functions for protobufs

* comment

* added init

* playing around with subscribers

* Update waku_filter.nim

* added test for protobuf

* fixes

* fix

* Update test_waku_filter.nim

* Update waku_filter.nim

* Add note on status

Co-authored-by: decanus <7621705+decanus@users.noreply.github.com>
2020-09-01 11:03:17 +08:00
Kim De Mey ea0d62993d
WakuNode init without WakuNodeConf (#117)
* WakuNode init without WakuNodeConf

* WakuNode start without WakuNodeConf

* setupNat adjustments for making common version

* Move setupNat to common.nim to be used for v1 and v2
2020-09-01 10:09:54 +08:00
Kim De Mey ddcfc3fdd6
V2cleanup (#115)
* Cleanup of warnings + imports, etc.

* Remove connected_peers metric as there is already libp2p_pubsub_peers
2020-08-31 11:32:41 +08:00
Dean Eigenmann 1924bcc96c
enhancement/request-id-to-uuid (#113) 2020-08-28 13:07:52 +02:00
Oskar Thorén 705b4b32a1
Waku v2: Simplify Waku Relay references (#112)
- Remove wakuRelayProto as this is initiated as part of switch PubSub
- Move WakuNode type into waku_types to avoid circular references
- Make necessary adjustments to get tests and sim to work
2020-08-28 17:08:28 +08:00
Oskar Thorén bab0e12d68
Waku v2: Update docs and API with current state (#110)
* Waku v2: Update docs and API with current state

- Publish and subscribe implemented
- Three protocol split

* Update docs/api/v2/node.md

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

* Update waku/node/v2/wakunode2.nim

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

Co-authored-by: Kim De Mey <kim.demey@gmail.com>
2020-08-27 18:15:46 +08:00
Kim De Mey e875dfd1d7
Properly exit when address is already in use, fix #15 (#108) 2020-08-27 10:44:52 +08:00
Dean Eigenmann 0e62e8ffa4
feature/store-protocol (#102)
* started working on store protocol

* eol

* update

* fix

* encoding

* started

* started working on decoding

* fixes

* started fleshing out tests

* testing

* encode / decode test

* eol

* fix test

* fmt

* errors

* testing entire rpc now

* fix

* format

* added comment

* removed StoreRPC

* added comment

* readded the store rpc

* updated

* fix tests
2020-08-27 10:44:09 +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 893134b536
Refactor: Waku protocol -> Waku relay protocol (#104)
* Refactor: Waku protocol -> Waku relay protocol

Including updating protocol string.

Addresses https://github.com/status-im/nim-waku/issues/101

* Refactor: WakuSub -> WakuRelay
2020-08-26 19:28:24 +08:00
Oskar Thorén 28f21f0920
Refactor Makefile and remove old task (#107) 2020-08-26 11:02:56 +02:00
Dean Eigenmann c3f57c79f5
feature/historic-api (#95)
* started working on historic api

* very rough code

* moved

* also publishing

* todos

* added tests

* added

* fix
2020-07-29 15:24:01 +02:00
Dean Eigenmann c018be8977
Delete .appveyor.yml (#96) 2020-07-29 12:38:09 +08:00