Commit Graph

196 Commits

Author SHA1 Message Date
Lorenzo Delgado 2c975597e1
fix(store): fix waku store resume tests 2022-10-05 17:58:24 +02:00
G f9c05aae52
chore(rln): Update zerokit submodule and RLN APIs (#1209)
* chore(rln): update zerokit submodule and APIs

* feat(rln): add new_circuit_from_data zerokit API

* chore(rln): update zerokit module
2022-10-05 00:06:33 +02:00
Sanaz Taheri Boshrooyeh fe3a3136a3
feat(rln-relay): adds rln identifier to the RateLimitProof (#1219)
* adds rln identifier to the RateLimitProof

* enables rln-relay compilation for wakunode2

* unifies the two RateLimitProof types

* a minor update

Co-authored-by: G <28568419+s1fr0@users.noreply.github.com>
2022-10-04 13:20:44 -07:00
Aaryamann Challani 787464487b
chore(rln-relay): namespaced flags (#1204)
* chore(rln-relay): namespaced flags

* chore(rln-relay): shorten flag size

* fix(rln-relay): consistent config naming

* chore(rln-relay): consistency with address configs

* fix(rln-relay): config
2022-10-03 13:25:56 -07:00
Lorenzo Delgado fa6a44eb3c
fix(store): Move page info logic to waku store protocol 2022-10-03 17:36:17 +02:00
Richard Ramos 8af3438814
fix: add lastEpoch when using zerokit, and missing return (#1210) 2022-10-03 11:48:01 +02:00
Aaryamann Challani d614e4504b
feat(rln-relay): metrics (#1185)
* feat(rln-relay): metrics

* fix(rln-relay): invalid token

* fix(rln-relay): return outside time

* style(rln-relay): multiline proc def

* fix(rln-relay): oserror

* fix(rln-relay): Exception should not be raised

* Revert "fix(rln-relay): oserror"

This reverts commit edcf39c0088ca526ca50256d856eee20d87a3c37.

* Revert "fix(rln-relay): Exception should not be raised"

This reverts commit c8d09b055314a83bb4a94900a47e899773cb47df.

* fix(rln-relay): revert exception removal

* feat(rln-relay): granular tracking

* fix(rln-relay): observe only on histogram, convert mount to hist

* chore(rln-relay): add additional metrics

* fix(rln-relay): missing import

* fix(rln-relay): template should expand only when times is defined

* fix(rln-relay): follow prometheus naming style

* fix(rln-relay): explicitly assert that the root window size should be less than 10

* fix(rln-relay): outstanding issues with infinite labels, minor refactor

* fix(rln-relay): typo

* fix(rln-relay): screaming case to pascal case

* fix(rln-relay): typos

* fix(rln-relay): imports

* fix(rln-relay): remove dependence on times, make durations as gauges

* fix(rln-relay): import order
2022-09-30 18:13:42 +05:30
Lorenzo Delgado 612023fab0
chore(store): collocate pagination and message store types 2022-09-28 13:36:05 +02:00
Lorenzo Delgado 5ee4a00765
refactor(store): decouple message store queue from pagination index type (#1187) 2022-09-27 21:10:11 +02:00
Lorenzo Delgado d7d51dc4c1
fix(store): rename store timestamp sqlite column 2022-09-27 11:47:25 +02:00
Aaryamann Challani 37cd8b593b
feat(rln-relay): multiple acceptable roots (#1177)
* feat(rln-relay): multiple acceptable roots

* fix(rln-relay): make sure onchain handler uses correct proc

* fix(rln-relay): typo

* style(rln-relay): convert const to pascalcase

* chore(rln-relay): address pr review

* fix(rln-relay): add require to test

* fix(rln-relay): add proc desc

* fix(rln-relay): ensure that group id commitments were added correctly

* fix(rln-relay): potential mem leak

* style(rln-relay): comments

* fix(rln-relay): magic number ambiguity

* chore(rln-relay): comment

Co-authored-by: Sanaz Taheri Boshrooyeh <35961250+staheri14@users.noreply.github.com>

Co-authored-by: Sanaz Taheri Boshrooyeh <35961250+staheri14@users.noreply.github.com>
2022-09-27 10:10:04 +05:30
Lorenzo Delgado 1b4a9e5dfd
fix(store): move insert criteria logic to waku store protocol module 2022-09-26 11:50:15 +02:00
Lorenzo Delgado aebda46a53
chore(store): move constants to retention policies modules 2022-09-22 11:17:38 +02:00
Lorenzo Delgado 5e3a75c56e
refactor(wakunode): remove deprecated non-async methods 2022-09-21 18:27:40 +02:00
Lorenzo Delgado 11832411a0
feat(store): execute retention policies periodically (#1155) 2022-09-21 11:32:59 +02:00
Aaryamann Challani e8d77306c8
feat(rln-relay): validate the merkle root in the RateLimitProof (#1158)
* feat(rln-relay): validate the merkle root in the RateLimitProof

* style|chore: replace snake case usage, convert proofVerify to Result[bool,string]

* chore(rln-relay): remove unhandled usage of result returned

* fix(rln-relay): typos

* chore(rln-relay): validate root before proof verification

* fix(rln-relay): cmp

* fix(rln-relay): generic rln relay result

* style(rln-relay): readability

* fix(rln-relay): use patterns for testing, requires instead of checks

* fix(rln-relay): move root validation to message validation

* fix(rln-relay): typo

* fix(rln-relay): typo

* chore(rln-relay): address pr review
2022-09-20 18:38:05 +05:30
kaiserd 371016b04f
feat: waku peer exchange (RFC34) (#1152) 2022-09-20 13:03:34 +02:00
Lorenzo Delgado 4a9f6f3c5e
refactor(store): protocol code refactoring and api reorganization 2022-09-20 11:39:52 +02:00
Lorenzo Delgado f73477be6e
refactor(store): invert retention policies dependency on message store interface 2022-09-16 12:55:22 +02:00
Lorenzo Delgado 70fdd85066
refactor(store): don't cache the message count in sqlite message store 2022-09-15 18:13:30 +02:00
Lorenzo Delgado 89069aa34f
fix(store): follow good practices in store insert and query metrics (#1150) 2022-09-14 13:40:11 +01:00
Lorenzo Delgado f7b4e8f57d refactor(wakunode): remove waku rln relay export from wakunode 2022-09-14 12:25:05 +02:00
Lorenzo Delgado a4860d92a0 feat(store): add query and insertion time metrics 2022-09-13 19:36:11 +02:00
Lorenzo Delgado 728e298dd7 fix(store): support stored messages metric for persistent store 2022-09-13 19:36:11 +02:00
Lorenzo Delgado 83cffd50ed refactor(store): reorganise waku store protocol is sqqlite-only logic 2022-09-13 19:36:11 +02:00
Lorenzo Delgado d49cd1348d
refactor(store): remove deprecated waku message store type 2022-09-13 13:36:04 +02:00
Aaryamann Challani fdcc9824a2
feat(store): Allow messages to be marked as "don't store" (#1119)
* feat(store): init allow messages to be marked as ephemeral

* feat(store): replace ephemeral with ttl model

* Revert "feat(store): replace ephemeral with ttl model"

This reverts commit 4398c61c919dda8f014b4fcc0679c573c74854e4.

* fix(store): flags and test

* chore(store): remove storeTTL

* chore(store): remove unused utils

* fix: conflict

* fix(store): make test more brief
2022-09-13 16:07:06 +05:30
Aaryamann Challani 4745c7872c
fix(ci): macos builds (#1145)
* chore: revert json rpc

* chore(ci): cleanup

* chore(ci): remove windows from build matrix

* Revert "chore(ci): remove windows from build matrix"

This reverts commit 1f1d33b5f4.
2022-09-13 15:13:56 +05:30
G 01cd201f58
PoC implementation of Waku Pairing and Secure Transfer (#1117)
* feat(noise): add PoC implementation for WakuPairing and Secure Transfer
2022-09-12 02:23:14 +02:00
Lorenzo Delgado 30f0e19d79
fix(store): add a table index to improve message insertion time 2022-09-09 15:04:48 +02:00
Hanno Cornelius 7f23bdf29f
chore: update nwaku submodules (#1123)
* chore: update submodules

* fix: SIGTERM ambiguity

* fix: ambiguous RNGs

* fix: ContentType is no longer a string

* fix: more fixes related to ambiguous RNGs

* fix: start all protocols

* chore: also update nim-eth

* chore: important new fixes in nim-libp2p

* fix: more changes related to RNG. Some reversion to reflect nim-eth update

* fix: breaking changes in nim-eth submodule

* fix: start protocols in tests

* fix: chat2bridge protocols async mounting

* fix: v1 test compilation

* fix: rln test compilation

* fix: remove confusing keys qualifier for the same HmacDrbgContext
2022-09-07 16:31:27 +01:00
Lorenzo Delgado 21e9f25276
refactor(wakunode2): deprecate non-async protocol api methods 2022-09-02 10:17:14 +02:00
Lorenzo Delgado 4f3a3da084
chore(waku-store): improve logging and query traceability 2022-09-02 10:14:58 +02:00
Aaryamann Challani ea62e2b7ce
chore(noise): minor refactor of default checks of keypairs (#1104)
* chore(noise): readable default checks for keypairs

* chore(noise): fix naming of arg in exists proc

* chore(noise): fix naming to make it clearer

* chore(noise): inline and remove result usage

* chore(noise): move the isDefault function up, replace defaultyVar with value

* chore(noise): inline style

* chore(noise): static the default check, remove inline pragma
2022-09-01 14:31:48 +05:30
Aaryamann Challani ad7f9ed5bf
chore(lightpush): fix minor typo (#1100) 2022-08-31 17:00:10 +05:30
Sanaz Taheri Boshrooyeh 0deedf0d7a
fix|feat(rln-relay|rln-chat2): Handling on-chain transactions errors and informing chat2 users (#1093)
If any error occurs during the on-chain registration, it will be handled; the chat2 users will get informed about the cause and the installation of rln-relay gets discarded and the chat program continues with no crashing.
2022-08-30 10:59:02 -07:00
Lorenzo Delgado c964aea885 refactor(waku-filter): waku filter protocol code reorganisation 2022-08-26 22:17:56 +02:00
Sanaz Taheri Boshrooyeh bc29619679
feat(Rln relay): Improves rln-chat2 interface, displays links to the registration tx, warns about spam messages (#1082)
* warns  about publishing spam messages, display tx hash on Goerli

* passes registration handler
2022-08-24 15:47:06 -07:00
Sanaz Taheri Boshrooyeh 8a6b1cfba6
feat(Rln-Relay): Consolidates the input paths of rln credential, chat2 reads rln credential from file only (#1080)
* Consolidates the input paths of rln credential, accepts credential file only

* fixes a typo
2022-08-18 10:35:02 -07:00
Sanaz Taheri Boshrooyeh f373f8bc56
chore(RLN-Relay): onchain rln-relay chat2 testnet editorial feadbacks
Signed-off-by: sanaz <staheri14@ku.edu.tr>

adds a newline


fixe a minor spacing issue
2022-08-17 16:55:49 -07:00
Lorenzo Delgado 7a30e485ec refactor(waku-store): deprecate waku store callback methods 2022-08-17 17:22:56 +02:00
G 2c4730c850
fix(rln): add zerokit rln to chat2 + fix static group members (#1077) 2022-08-17 12:11:46 +02:00
Lorenzo Delgado 2cb7123df8 fix(waku-store): integrate the predicate into the WHERE clause instead of calling it on each result line (#1026) 2022-08-12 12:48:45 +02:00
Lorenzo Delgado 4f93510fc9 refactor(waku-store): inherit from message_store in store_queue 2022-08-11 10:15:20 +02:00
Lorenzo Delgado d201a37330 refactor(waku-lightpush): waku lightpush protocol code reorganization 2022-08-10 12:30:34 +02:00
G 2aeaba48e4
feat(noise): add padding to transport messages (#1056)
* feat(noise): add padding to transport messages (handshakes+write+read)

* fix(noise): address reviewers' comments

* fix(noise): update padding block size const name
2022-08-07 16:20:34 +02:00
G 8a14b5b243
Zerokit RLN integration in nwaku: alternative approach with inline compilation flag (#1060)
* refactor(rln): add inline compilation flags for RLN zerokit

* update submodule

update submodule

* fix(rln): fix wrong merge conflict resolution

* fix(rln): align hardcoded values in light of vacp2p/zerokit/issues/28
2022-08-05 22:58:19 +02:00
Keshav Gupta 115982f5c3
Persisting rln credentials (#1037)
* Persisting Credentials implemented by writing json of keypair and rlnindex to files

* Removing testing files and ignores

* Update waku/v2/protocol/waku_rln_relay/waku_rln_relay_utils.nim

Co-authored-by: Daniel Kaiser <git@kais3r.de>

* Update waku/v2/protocol/waku_rln_relay/waku_rln_relay_utils.nim

Co-authored-by: Daniel Kaiser <git@kais3r.de>

* Comments

* Comments

* Security warning in comments

* Redundant echos. Omitting unused variables.

* Update waku/v2/protocol/waku_rln_relay/waku_rln_relay_utils.nim

Co-authored-by: Hanno Cornelius <68783915+jm-clius@users.noreply.github.com>

* Limit line lengths using line breaks and indents

* Membership file paths declared as const

* Const fix

* Rln Credentials Merged.
Reading credentials from file abstracted away.

* Spaces

* Spaces

* Dangling constants removed. Comments position.

* Import sequence.

* Path as argument to readPersistentKeys.
Spaces in comments

* readPersistentKeys test

* Debug and info

* Index check in test

* Update tests/v2/test_waku_rln_relay.nim

Co-authored-by: G. <28568419+s1fr0@users.noreply.github.com>

* Abstracted writeRlnCredentials.
Fix var name in test.

* Usage of writeRlnCredentials in test

* Dnsclient?

* Test reverted to direct call to writeFile.
Abstrated writePersistentRlnCredentials usage causing error,
with readPersistentRlnCredentials

* Indentation

* Revert "Dnsclient?"

This reverts commit 3f4dba1a0b.

* Reverting abstraction of writing..
..persiting credential

Co-authored-by: Daniel Kaiser <git@kais3r.de>
Co-authored-by: Keshav Gupta <keshav.pg@hotmail.com>
Co-authored-by: Hanno Cornelius <68783915+jm-clius@users.noreply.github.com>
Co-authored-by: G. <28568419+s1fr0@users.noreply.github.com>
2022-08-05 12:48:01 +02:00
G 32f91cb26b
Noise: split Noise submodule in smaller submodules (#979)
* refactor(noise): split Noise submodule in smaller submodules
2022-08-04 10:47:00 +02:00
Lorenzo Delgado 888f7cb312 refactor(waku-store): major code reorganization, move StoreQueue to message_store folder 2022-08-01 13:02:40 +02:00