Commit Graph

32 Commits

Author SHA1 Message Date
Hanno Cornelius dd256e3bd2
Add support for RFC31 ENR (#789) 2021-12-06 20:51:37 +01:00
Hanno Cornelius f85434e072
Discv5 POC integration (#748) 2021-11-01 19:02:39 +01:00
Hanno Cornelius 36b9176569
Waku v2 Node Discovery via DNS: Integration (#690) 2021-08-12 10:51:38 +02:00
Hanno Cornelius 2f53c2c60b
Feat/bridge topic mapping (#633)
* Use namespaced content topics for bridge
2021-06-18 12:30:24 +02:00
Sanaz Taheri Boshrooyeh ddf93814fe
Persisting Waku message timestamp & implementing DB migration & convert receiver timestamp data type to float64 (#607)
* adds timestamp to waku message store impl

* stores timestamp as int64

* adds untitest

* stores timestamp as seq of bytes

* minor

* re-orders unittest

* changes receiver timestamp to float64

* unit test for receiver timestamps

* adds comments

* reorder a few lines

* updates changelog

* more updates on changelog

* WIP

* WIP

* adds migration

* more debug messages

* passes the path to the migration scripts from message store module

* adds migration result type

* replaces migrationScripts with migrationScriptsResult

* adds path calculation to the message store

* removes some tests binary file

* removes redundant imports

* comments out user_version assignment in sqlite  init

* more descriptive err messages

* clean up test file

* more info logs

* minor code format

* removes a todo

* minor updates

* remove a binary file

* unit tests for migration utils

* adds split script

* integrates split query to handle scripts with multiple commands

* updates migration script for v1

* updates the v1 migration script

* update user version

* updates script

* fixes a few bugs on the splitScript

* more debug logs

* adds float64 parameter support to sqlite3

* change in timestamp type in the script

* deletes float64 toBytes utils

* enables storage of timestamp as a real number in the sqlite db

* bump up script index

* comment edits

* removes migrate unit test

* adds todo and docstring

* updates changelog

* removes an unused item in .gitignore

* minor

* updates changelog

* organizes imports

* cleans up imports

* WIP

* updates script


fixes a few bugs on the splitScript


more debug logs


adds float64 parameter support to sqlite3


change in timestamp type in the script


deletes float64 toBytes utils

* edits migration util test

* remove an empty test file

* includes migration utils tests in

* deletes unused codes

* tides up imports

* adds range based filter to the filterMigrationScripts

* renames procs: removes Migration

* tides up imports

* edits docstring

* edits docstring

* edits docstring

* removes unused imports

* more clean up

* groups std imports

* updates changelog

* adds docstring for setUserVersion

* adds unittest for the migrate

* Update waku/v2/node/storage/message/waku_message_store.nim

Co-authored-by: RichΛrd <info@richardramos.me>

* Update waku/v2/node/storage/sqlite.nim

Co-authored-by: RichΛrd <info@richardramos.me>

* Update waku/v2/node/storage/sqlite.nim

Co-authored-by: RichΛrd <info@richardramos.me>

* removes split scripts

* fixes a naming issue

* fixes a bug

* fixes a typo

* adds a log re updated user_version

* fixes a proc naming mismatch

* fixes naming mismatch

* more descriptive var names

* adds migration script of the first user version

* moves migration to after persistMessages flag is checked

* deletes unused comment

* fixes a bug

* brings back split script

* adds unit tests for split scripts

* runs scripts one command at a time

* deletes a commented line

* relocates the migrate proc to sqlite.nim

* adds unit test for filter scripts

* adds filterScripts unittest testing varying zero-prefixed user versions

* minor

Co-authored-by: RichΛrd <info@richardramos.me>
2021-06-16 13:23:55 -07: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 2b571e205b
Fix keepalive for connected peers (#588)
* Fix keepalive for connected peers

* Remove comment
2021-06-02 09:53:34 +02:00
Hanno Cornelius 5102576234
Integrate persistent peer storage (#437)
* Integrate persistent peer storage
2021-03-26 10:49:51 +02:00
Hanno Cornelius 62b824c387
Add WakuBridge and test (#426)
* Add WakuBridge and test

* Fix test
2021-03-22 11:44:45 +02:00
Oskar Thorén f85597a7cb
Better error handling with Results from interactions with swap-contracts-module (#393)
* Fix balance JSON resp

* Resultify swap contract calls for error handling

* More resultify and fixup tests

* More results

* resultify waku swap handling

* re-enable waku swap test

should not crash now, even if it fails to settle (tested separately)
2021-02-25 10:47:48 +08:00
Oskar Thorén b730d79438
Waku Swap: sign and send cheque (#386)
* fix balance test

* move waku swap contracts into own module

* Move more to separate waku swap contracts

* move erc20address

* Improve cmd/task util

* fix redeem part too

* sign cheque hardcode

* add signature field, send cheque

* echo->debug

* disable waku swap test

it calls contracts, which isnt integrated
2021-02-23 13:15:06 +08:00
Sanaz Taheri Boshrooyeh 211e891262
Rln-relay tests utils and reorganization (#381)
* cleans up imported modules

* adds uploadContract proc and consolidates rln-relay test files

* deletes test_rln_relay_wrappers

* deletes wrappers tests

* replaces echo with debug

* minor
2021-02-17 13:54:49 -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
Oskar Thorén d05692587d
Swap contract module test - initial step (#369)
* Basic pwd shelling out script

* Get balance string from running node

* Add comment re manual test

* Add TODOs
2021-02-08 22:19:34 +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
Hanno Cornelius 080d82dd9a
Added basic peer manager (#364)
* Added basic peer manager
2021-02-04 12:32:58 +02:00
Hanno Cornelius 9faff49e5b
Remove stale rpc code & repair scripts (#365)
* Remove stale rpc code & repair scripts
2021-02-04 10:39:55 +02:00
Sanaz Taheri Boshrooyeh 96f95ed0b6
Test for the Rln relay/membership management contract deployment (#312)
* enhancement/cleanup-warnings (#290)


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
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
adds the test file for waku rln relay


WIP: adds some initial code


commented out the rln-relay test code


refactor/db-message-store-split (#280)

* fixes

* fic

* fix

* fix

* fix

* fixed

* fix

* fixes

* fixes, using sqlite lib fully

* fix

* Update sqlite.nim
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>
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
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
enhancement/remove-flood (#295)

* removes flood

* rm

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
Updated submodules (#303)


add Jenkinsfile and some Makefile targets for CI (#302)

Signed-off-by: Jakub Sokołowski <jakub@status.im>

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
Accounting: End to end with Cheque PoC (#304)


Added some basic debug and relay json-rpc calls (#305)


Uncomment and call empty rln test

adds the membership contract to the test file


adds a test utils for contract deployment


increases the gas limit for group management contract

* removes some files

* WIP: adds the interface of membership contract

* uncomments the interface of getNumber contract

* adds tests for interaction with the membership contract

* send is replaced with call

* replaces call with send

* enhancement/cleanup-warnings (#290)


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
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
adds the test file for waku rln relay


WIP: adds some initial code


commented out the rln-relay test code


refactor/db-message-store-split (#280)

* fixes

* fic

* fix

* fix

* fix

* fixed

* fix

* fixes

* fixes, using sqlite lib fully

* fix

* Update sqlite.nim
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>
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
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
enhancement/remove-flood (#295)

* removes flood

* rm

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
Updated submodules (#303)


add Jenkinsfile and some Makefile targets for CI (#302)

Signed-off-by: Jakub Sokołowski <jakub@status.im>

Co-authored-by: Oskar Thorén <ot@oskarthoren.com>
Accounting: End to end with Cheque PoC (#304)


Added some basic debug and relay json-rpc calls (#305)


Uncomment and call empty rln test

adds the membership contract to the test file


adds a test utils for contract deployment


increases the gas limit for group management contract

* removes some files

* WIP: adds the interface of membership contract

* uncomments the interface of getNumber contract

* adds tests for interaction with the membership contract

* send is replaced with call

* replaces call with send

* adds a todo

* removes empty lines

* adds some comments

* adds a todo

* adds the solidity code of the NumberContract

* fixes a bug: replaces call with send

* removes store test comments

* removes excess spaces
2021-01-07 12:34:24 -08:00
Sanaz Taheri Boshrooyeh a1ba0e5176
Adds web3 (#316)
* adds web3

* adds comment

* Revert "adds comment"

This reverts commit dbe59e7e49.

* adds comments
2020-12-04 12:41:28 +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 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
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
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
Kim De Mey 093efbf736
Begin of waku v2 rpc tests (#210) 2020-10-06 20:36:44 +02: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
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
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
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
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
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
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