* 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>