Commit Graph

256 Commits

Author SHA1 Message Date
Hanno Cornelius 24f4a087de
Feature/unsubscribe from content filter (#255)
Unsubscribe from a content topic

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
2020-11-10 09:13:16 +02:00
Sanaz Taheri Boshrooyeh ea5f9993a7
Pagination feature/indexing waku messages (#233)
* changes the digest type to MDigest[256] and modifies the computeIndex

* fixes formatting issue

* adds the pagination with its tests

stores and retrieves IndexedWakuMessage


adds the paginate proc


adds the paginate function


fixes some formatting issues


minor


edits indentation and fixes a bug


removes unused imports


minor


fixes indentations and adds a new testcase


adds indexedWakuMessageComparison


adds `==` proc for IndexedWakuMessage


separates the comparison of index and indexed waku messages


adds testcases for the Index comparison and IndexedWakuMessage comparison


WIP


WIP: adds an decoder for Index


removes an unnecessary imports


WIP


adds findIndex() proc


removes the equality check '==' for IndexedWakuMessages


edits the code format and adds the pagination test


edits paginate() proc to work on a copy of the input list


deletes unnecessary echo


adds the boundary calculations for forward and backward pagination


adds test cases for the page boundaries


tests corner cases for the queried cursor and pagesize


minor


adds some comments


adds a proc to extract WakuMessages from a list of IndexedWakuMessages


integrates pagination into the findMessages proc


adds some comments


changes paginate to paginateWithIndex


removes some echos


modifies paginateWithIndex to handle invalid cursors


adds test case for an invalid cursor


WIP: adds a `$` proc for IndexedWakuMessages


adds some debugging message prints 


adds an integration test for handling query with pagination

* fixes a type mismatch issue in the min proc

* replaces boolean direction with their enums and updates contentTopics

* adds the unit test for the sorting of the indexed waku messages

* fixes a flaky test

* fixes a flaky test

* removes index equality check proc

* handles an initial query with an empty cursor

* adds test for the initial query

* adds integration test for pagination

* adds a test for empty message list

* adds comments and fixes an issue

* adds comments

* code cleanup

* removes the content topic validation check

* resolves the errors related to the windows CI tests

* Update waku/protocol/v2/waku_store.nim

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

* Update waku/protocol/v2/waku_store.nim

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

* Update tests/v2/test_waku_pagination.nim

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

* Update waku/protocol/v2/waku_store.nim

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

* Update waku/protocol/v2/waku_store.nim

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

* Update waku/protocol/v2/waku_store.nim

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

* changes the output type of findIndex to Option

* Update tests/v2/test_waku_pagination.nim

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

* Update tests/v2/test_waku_pagination.nim

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

* Update tests/v2/test_waku_pagination.nim

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

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* adds some comments

* fixes an indentation issue

* some code modification for array initialization

* Apply suggestions from code review

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com>

* does some code reorganizations and clean up

* CreateSampleList to createSampleList

* replaces a byte array literal initialization with a for loop

* relocates indexedWakuMessageComparison and indexComparison

* minor

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
Co-authored-by: Dean Eigenmann <7621705+decanus@users.noreply.github.com>
2020-11-09 12:48:09 +08:00
Dean Eigenmann 9df31621c4
Update Dockerfile 2020-11-04 16:21:17 +01:00
Kim De Mey 0b70fe61a4
Add encoding/decoding of payload for Waku v2 (#251)
* Add encoding/decoding of payload for Waku v2

* Allow for Waku v1 payload in chat through compile time flag
2020-11-03 21:20:40 +01:00
Dean Eigenmann 57c3cd44a9
changed to int (#253) 2020-11-03 11:14:29 +08:00
Dean Eigenmann 8c5fed85a6
fix/remove-ds (#249)
* fix

* update
2020-11-02 12:11:31 +08:00
Sanaz Taheri Boshrooyeh 7de91599d4
fixes a bug related to contentTopic type mismatch (#252)
* fixes a bug related to contentTopic type mismatch

* adds used pragma to get rid of unused imports warning
2020-10-30 20:00:14 +01:00
Dean Eigenmann 6262f01c7c
Add WakuMessage version as per spec (#250) 2020-10-30 16:46:07 +01:00
Sanaz Taheri Boshrooyeh 0cb2e125b6
adds protobuf methods for pagination (#248) 2020-10-30 09:55:31 +08:00
Oskar Thoren 4b21bb6b9b
Default topic: waku -> /waku/2/default-waku/proto 2020-10-28 13:19:43 +08:00
Dean Eigenmann 45d57efaea
feature/add-filter (#244)
* started working on adding filter

* fix

* fix

* fix

* not subscribing

* fix

* filter

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
2020-10-27 11:40:29 +01:00
Hanno Cornelius 16c4e65762
Add functionality to unsubscribe from pubsub topic (#241) 2020-10-27 09:13:56 +08:00
Kim De Mey aab93912ef
Cleanup the wakunode2 config (#242) 2020-10-22 17:04:17 +02:00
Dean Eigenmann bfb29338a1
fixes/wait-for-start (#228)
* fixes subscribe to wait for start

* moved around

* added test

* fix

* eol

* rm

* removed as waku is default

* updated docs

* fix

* Update node.md

* Update node.md

* Update wakunode2.nim

* Update wakunode2.nim

* fix test

* rm

* fix

* fixes

* fixes

* fix

* fix

* using connect

* fix

* fix

* Update wakubridge.nim

* Update wakunode2.nim
2020-10-22 13:12:00 +02: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
Dean Eigenmann 5ddd8701c9
fix/content-type-int (#235)
* fixes

* fixes

* using a better topic

* fix

* fixed
2020-10-21 16:55:06 +08:00
Dean Eigenmann b2edfe8dda
feature/start-protocol-command (#209)
* started working

* fixes

* rename start -> mount

* started logging

* mounting relay

* Update wakunode2.nim

* start of fixe

* fix

* fix

* fixes

* Update waku/node/v2/wakunode2.nim

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

* removed comment

* fix

* update

* changed the default

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
2020-10-20 10:36:27 +08:00
Sanaz Taheri Boshrooyeh d6c48da071
Pagination: Pagination feature/compute index (#225)
* adds the index object

* adds the indexedWakuMessage

* adds the PagingInfo

* Adds PagingInfo to HistoryResponse and HistoryQuery

* adds the computeIndex procedure

* Update waku/node/v2/waku_types.nim

Fixes spacing issues

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

* Changes timestamp to receivedTime and checks for the  empty contentTopic

* adds a test file for pagination with test scenarios for computeIndex

* changes receivedTimestamp to the unix timestamp

* updates a test case

* replaces std/sha1 with  nimcrypto/sha2

* changes the tests titles

* minor comments

* Some clean up

* fixes some formatting issue

* edits a test-case

* adds comments

* changes the digest type to MDigest[256] and modifies the computeIndex

* fixes formatting issue

* edits indentations and fixes a bug

* minor edits

* changes suite to procSuite and adds a new text case

* fixes all the indentations

* cleanup of the imports

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
2020-10-20 10:20:44 +08:00
Dean Eigenmann 5c25ed131a
enhancement/integrate-store-chat (#230)
* added store protocol

* setting peer

* fix

* line

* Update dingpu.md

* Update chat2.nim

* Update dingpu.md

* Update dingpu.md

* playing around

* fix

* fix

* fixes

* tested

* tested and finalized

* fix

* Update docs/tutorial/dingpu.md

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

* Update chat2.nim

* fix

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
2020-10-15 13:56:53 +02:00
Oskar Thorén e67301f1f6
Update dingpu.md 2020-10-15 17:30:56 +08:00
Oskar Thoren e3099f1ab3
Revert "enhancement/integrate-store-chat (#208)"
This reverts commit 5c338ba731.

Breaks chat2
2020-10-15 13:06:09 +08:00
Dean Eigenmann 5c338ba731
enhancement/integrate-store-chat (#208)
* added store protocol

* setting peer

* fix

* line

* Update dingpu.md

* Update chat2.nim

* Update dingpu.md

* Update dingpu.md

* playing around

* fix

* fix
2020-10-14 14:33:21 +02:00
Oskar Thorén d6fdecafd8
Fix timing issue with subscribe in chat2 (#226)
- Support static node
- Ensure nodes are connected before subscribing
- Sleep to allow settling down before subscribing
- Default chat2 log to DEBUG
2020-10-14 18:34:29 +08:00
Kim De Mey f31ab81546
Pass ReuseAddr flag for wakunode2 (#223) 2020-10-14 11:32:37 +08:00
Dean Eigenmann c2024344cf
fix/protocol-strings (#222)
Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
2020-10-13 13:10:31 +02:00
Oskar Thorén fce6d6c658
Add FAQ docs for cluster logs etc (#217) 2020-10-13 18:24:24 +08:00
Oskar Thorén 7920fab5fd
Bump submodules (#220) 2020-10-13 18:24:01 +08:00
Dean Eigenmann 9ac41b2eda
feature/filter-rpc-script (#200)
* started working

* fixes

* added tutorial

* added

* rm from description
2020-10-09 15:58:50 +02:00
Kim De Mey 7a3e18d4b0
And update example readme with correct make target 2020-10-09 09:32:05 +02:00
Kim De Mey d2a9ca57f5
Update make targets in readme [skip ci]
And other corrections.
2020-10-09 09:30:15 +02: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
Dean Eigenmann a599141666
Update dingpu.md 2020-10-07 17:13:27 +02:00
Kim De Mey 3182d1558e
Update setup-msys2 to v2 and increase max windows CI time to 90 mins 2020-10-07 15:57:01 +02:00
Kim De Mey 093efbf736
Begin of waku v2 rpc tests (#210) 2020-10-06 20:36:44 +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
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