* 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
* 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: 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
* 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>
* 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
* 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>
* 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>
* 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>
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
* 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
* 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>
* 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>
* 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>
* 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>
* 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>
* 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
- 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
* 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>
* 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
* Waku v2 Node API: Split into implemented and NYI
- Init is now separated into Create and Start node
* Simplify Node API
* Node API: proc->method and add WakuNode as first argument
* Fix indent to make compile
* Stub out all API methods
* 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
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>
* Upgrade nim-libp2p to latest
* Upgrade nim-chronos to latest (needed for nim-libp2p)
* Fix conn.readLp varint
* Fix standard switch API change
* WIP: Crypto resultification on v2
* Fix Result usage for SkPrivateKey
* Result fixes
Co-authored-by: kdeme <kim.demey@gmail.com>