Commit Graph

1671 Commits

Author SHA1 Message Date
Hanno Cornelius 3545a7e1ab
Updated submodules (#303) 2020-11-26 10:29:10 +08:00
Dean Eigenmann 309bcb05a1
enhancement/remove-flood (#295)
* removes flood

* rm

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
2020-11-24 10:14:18 +01:00
Oskar Thorén 63b0e8af76
Accounting credit receiving node (#292)
* Accounting WIP: Swap access through Store

* Fix order bug and comment scenario + typo

* WIP

* Accounting: Account for receiving store node

- Turn accountFor function into credit and debit
- Misc formatting

* Accounting: Fix bugs related to mount and test

* Accounting: Simplify query signature

We already have a ref to wakuSwap through wakuStore now.

* Resolve rebase issues
2020-11-24 12:53:42 +08:00
Oskar Thorén 44e9d4d86b
Refactor types store (#291)
* Refactor: Move waku_store into its own folder

* Refactor: Move waku store types to new home (WIP)

* Refactor: Fix errors and recursive imports

* Fix rebase errors

* Refactor: More rebase import fixes
2020-11-24 12:34:32 +08:00
Hanno Cornelius 135eaae9fb
Waku v2 JSON-RPC REST API: Store protocol proof of concept (#263)
* Waku V2 history query POC

* Fix folder structure

* Improve test clarity

* Improve imports, returns and some naming

* Changed naming conventions. Refactor & improve.

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
2020-11-24 11:44:37 +08:00
Dean Eigenmann e875027be4
refactor/db-message-store-split (#280)
* fixes

* fic

* fix

* fix

* fix

* fixed

* fix

* fixes

* fixes, using sqlite lib fully

* fix

* Update sqlite.nim
2020-11-24 10:50:59 +08:00
Oskar Thorén 54ac399f5f
Refactor: waku_types separation of concern (trial with waku_swap) (#282)
* waku_types refactor: Accounting types to waku_swap

* waku_types refactor: Separate waku_swap_types file

* Fix import path for waku_swap
2020-11-23 10:27:45 +08:00
Oskar Thorén f8aff5756c
Accounting: Move flag to config and add basic test for accounting state (#284)
* Accounting: Add config flag (default to false)

Also fix bug where query function is called twice when flag is set.

* Accounting: test state update after store req
2020-11-21 13:31:48 +08:00
Dean Eigenmann 1193b69d6c
enhancement/cleanup-warnings (#290) 2020-11-20 14:59:29 +01:00
Oskar Thorén 010408aadb
Minimal accounting state PoC (#278)
* Add basic WakuSwap type and init

* Mount swap protocol and keep accounting state

* Flags off by default
2020-11-18 20:45:51 +08:00
Hanno Cornelius e68fe50bc1
Updated submodules (#279) 2020-11-18 13:58:46 +02:00
Oskar Thorén 9518322198
Folder restructure (#274)
* Change folder structure to {v1,v2,common}/...

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

* Update waku.nimble paths

* Flatten paths

* Fix import paths

* Pull out utils folder for nat

* Pull out waku_types to top level for v2

* Fix test import paths

* Remove old READMEs and replace with one liner

* Update README and split v1 and v2

* Skeleton READMEs

* Update README.md

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

* Update README.md

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

Co-authored-by: Kim De Mey <kim.demey@gmail.com>
2020-11-17 17:34:53 +08:00
Oskar Thorén d46f357495
Minimal accounting (#264)
* Minimal accounting

Start of accounting PoC and keeping track of balance with peer

- Untested
- Flag should be off by default
- should be put in a separaet module

* Move accountFor to right place

* Accounting Use length of messages

* Disable flag by default

* Move account update func sig
2020-11-16 17:55:49 +08:00
Dean Eigenmann 1568fa6e6f
feature/persistence-simple (#268)
* implements

* add

* fix

* eol

* rebase

* added tests

* minor cleanup

* errors

* Update store.md

* fix
2020-11-16 09:38:52 +01:00
Oskar Thorén a1bb2c4954
Accounting SWAP protocol basic data types and test (#262)
* Start of SWAP

* SWAP basic data types (untested)

* SWAP Add handshake test and fix imports

* SWAP Add cheque encode/decode test and fix bug
2020-11-13 14:02:17 +08:00
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