Commit Graph

288 Commits

Author SHA1 Message Date
Richard Ramos f486236d0d fix: don't use goroutines for processing logs 2022-08-15 14:40:10 -04:00
Richard Ramos 893f9f396c feat: chat2 dynamic RLN (#283) 2022-08-15 14:40:10 -04:00
Richard Ramos 132ac128e5 feat: RLN (dynamic) 2022-08-15 14:40:10 -04:00
Richard Ramos 587fd148ca chore: use static rln lib and fix lint 2022-08-15 14:40:10 -04:00
Richard Ramos 6481e72885 feat: chat2 + RLN(static) 2022-08-15 14:40:10 -04:00
Richard Ramos 67a43b8ba7 feat: test unit for RLN (static) 2022-08-15 14:40:10 -04:00
Richard Ramos 1636a33835 feat: RLN (static) 2022-08-15 14:40:10 -04:00
Richard Ramos e7bc6799ed refactor: decouple rpc and rest http servers 2022-08-09 11:59:47 -04:00
Elise Alix 924acf67d9
fix: verify matching `requestId` before removing subscription (#280)
* Check we are removing content topics for the correct request
* Verify request id matches before removing peer as well
2022-08-03 09:35:25 -04:00
Richard Ramos 546416a9d5
refactor: remove WakuStoreWithRetentionPolicy and add build tag to migrations (#281) 2022-08-03 09:32:52 -04:00
Richard Ramos a549337a42
fix: quit channel on store 2022-07-28 15:33:56 -04:00
Richard Ramos 4041f5a67a
fix: store recorded messages metric 2022-07-28 15:17:12 -04:00
Nicholas Molnar 2bfdcb6fd1
fix: handle case of unsubscribe from non-existent topic (#276) 2022-07-26 15:20:56 -04:00
Richard Ramos 6043f6db2e
chore: add docs to filter protocol 2022-07-25 13:28:50 -04:00
Richard Ramos e2b04570c1
chore: improve docs 2022-07-25 11:28:17 -04:00
Richard Ramos 27b5ab9c51 chore: test store being decoupled from relay and fix empty contenttopics on filter 2022-06-14 15:53:48 -04:00
Martin Kobetic 2c2725308f
fix: filter deadlock (#262) 2022-06-14 11:53:56 -04:00
Richard Ramos 3c0c3c4eeb
fix: js-waku / nwaku interop (#252) 2022-06-13 14:30:35 -04:00
Martin Kobetic 73af2002ce
fix: races in filter protocol and tests (#260)
* Fix races in filter protocol and tests
* only RLock needed
2022-06-10 08:18:34 -04:00
Richard Ramos fddffed78b fix: restore time variance verification 2022-06-01 15:51:28 -04:00
Richard Ramos 7c0206684f
refactor: use db for serving history queries (#243) 2022-05-30 14:48:22 -04:00
Martin Kobetic 7c44369def
feat: structured logging followup (#248) 2022-05-30 11:55:30 -04:00
Martin Kobetic 0c989d3d8c
feat: structured logging (#242) 2022-05-27 09:25:06 -04:00
Richard Ramos b4697210b0
chore: adding some log messages to store 2022-05-19 16:30:41 -04:00
Nicholas Molnar 5353ae48f2 Use new errgroup 2022-05-17 13:49:40 -04:00
Nicholas Molnar 38fc9ee8bb Push subscriptions in parallel 2022-05-17 13:49:40 -04:00
Richard Ramos 7b3c853c15
refactor: use diff logger for waku 2022-05-06 15:29:31 -04:00
Richard Ramos 3a0fc81889
chore: add docs. pt - 1 (#230) 2022-05-04 17:08:24 -04:00
Richard Ramos bbab0f1714
fix: add topic to broadcast and some comments to functions (#229) 2022-04-25 23:31:26 +04:00
Richard Ramos 15f3abec3a
fix: envelope hash should match messageIdFn hash (#220) 2022-03-23 09:16:11 -04:00
Richard Ramos 290b7663d1
feat: secure websockets (#201) 2022-03-22 09:12:58 -04:00
Richard Ramos e85d112828
feat: store timestamp validity checks (#215) 2022-03-22 08:34:45 -04:00
Nicholas Molnar 21b2e1d97c
Create pluggable store (#210)
* Add store factory
* Add to test
2022-03-18 15:56:34 -04:00
Richard Ramos 61cda61c3d
fix: flag conn error as failure (#209) 2022-03-09 19:15:04 -04:00
Richard Ramos f4f307db87
fix: connect before opening a stream 2022-03-03 12:04:03 -04:00
Richard Ramos b820d797c8
feat: add pubsub topic to Index pb (#200)
* feat: add pubsub topic to Index pb
* fix: flaky test
2022-03-02 12:02:13 -04:00
Richard Ramos df66ef5bb5
fix: race condition in unsubscribe (#197) 2022-02-23 11:08:27 -04:00
Richard Ramos 8d155fb51e
fix: protocol name 2022-02-23 11:06:47 -04:00
Richard Ramos 58f739765e
refactor: use int64 timestamps (#189)
* refactor: use int64 timestamps
* fix: changed PB Timestamp index to 10
2022-02-23 11:01:53 -04:00
Richard Ramos 11d1f8fb0d
feat: result aggregation in resume and enforce max page size (#183)
* feat: result aggregation in resume and enforce max page size
* feat: add WithLogger option to wakunode (#184)
* fix: rebase issues
2022-01-18 14:17:06 -04:00
Richard Ramos 0de19253da
refactor: maintenaibility fixes (#167) 2021-12-08 10:21:30 -04:00
Richard Ramos c45e8a3c31
fix: handle stale clients in filter protocol (#174) 2021-12-08 09:00:20 -04:00
Anthony Laibe 2b225e90e7 feat: Implement logic for publish from node 2021-12-07 14:32:02 +01:00
Anthony Laibe 9bb957afeb feat: build swap and attach it to the store 2021-12-07 14:31:36 +01:00
Richard Ramos 23cbb24a94
fix: use max Int32 instead of 64 due to compile issue on android (#170) 2021-11-25 10:18:33 -04:00
Richard Ramos a3125c7b61
fix: increase response read limit (#169) 2021-11-25 09:46:04 -04:00
Anthony Laibe 3571f0bab9 feat: init swap protocol
* Add proto files
* Add options
* Add credit/debit for soft mode
2021-11-24 13:58:35 +01:00
Richard Ramos ce417a6486
refactor: use WaitGroup for graceful shutdown of worker goroutines (#166) 2021-11-23 11:03:12 -04:00
Anthony Laibe 2afffd9dd9 feat: Add rpc method for filter#getmessages 2021-11-22 13:43:41 +01:00
Richard Ramos e8c08ac18b fix: invalid ticker usage 2021-11-21 10:04:23 -04:00
Richard Ramos 78a0d4d74d fix: replace WIthTopic to ToTopic 2021-11-19 20:04:38 -04:00
Richard Ramos 00ee0b7511 refactor: create separate functions for subscriptions and publishing 2021-11-19 20:04:38 -04:00
Richard Ramos 56ef99e11f refactor: remove topic type 2021-11-19 20:04:38 -04:00
Anthony Laibe 2ae370ca41 test: Add test/refactor filter option 2021-11-18 13:35:46 +01:00
Richard Ramos 6d04308716
feat: 23/WAKU2-TOPICS (#146) 2021-11-10 10:28:45 -04:00
Anthony Laibe 9f504b1150 test: extend coverage with missing test 2021-11-10 14:55:23 +01:00
Richard Ramos 0c873e3c2d
feat: select peer with lowest ping time and test peer functions (#143)
* feat: select peer with lowest ping time and test peer functions
* fix: do not self-ping
2021-11-09 19:34:04 -04:00
Richard Ramos 9426cd133a
fix: store protocol should have a host regardless if acts as store node or not (#142) 2021-11-09 12:18:57 -04:00
Anthony Laibe 7ff5fcf838 feat: Add relay rpc methods 2021-11-09 13:54:45 +01:00
Richard Ramos 49737780ea refactor: concurrent map and slices for filter 2021-11-08 08:58:14 -04:00
Richard Ramos fcfe3568ab feat: clean up older records in message queue
Fixes #133
2021-11-07 11:16:04 -04:00
Anthony Laibe a1cb371d5a refactor: lightpush options and be more explicit about
the relay node being present or not
2021-11-07 16:15:07 +01:00
Richard Ramos a46881fc27 fix: rebase issues 2021-11-06 12:57:01 -04:00
Richard Ramos a7c76d2af1 fix: typo 2021-11-06 12:57:01 -04:00
Richard Ramos 6db2f258d8 feat: message retention policy for wakustore
Fixes#69
2021-11-06 12:57:01 -04:00
Richard Ramos 793e7f572f refactor: filter
Moves the filter logic from wakunode2 to waku_filter
2021-11-06 12:45:14 -04:00
Richard Ramos 99248e9931 test: unsubscribe to filter 2021-11-06 12:25:45 -04:00
Richard Ramos c98769b7f2 refactor: use envelopes in the store
Also do some linting and add documentation for some functions
2021-11-06 09:06:53 -04:00
Richard Ramos 2336252efc add size to store message channel 2021-11-05 10:29:40 -04:00
Anthony Laibe 189724dd1e test: add filter test 2021-11-01 16:38:24 +01:00
Richard Ramos b789d9900e
refactor: relay (#119) 2021-11-01 10:42:55 -04:00
Richard Ramos c0ba800af7
refactor: store and lightpush (#118) 2021-11-01 08:38:03 -04:00
Richard Ramos 98255060f3
refactor: add Next() and create Query and Result structs (#117) 2021-10-31 15:00:38 -04:00
Richard Ramos d150123f21
fix: store and lightpush metrics (#114) 2021-10-30 19:19:03 -04:00
Richard Ramos d94802f739
chose node type when starting filter and make relay optional (#113) 2021-10-30 10:29:34 -04:00
Richard Ramos 8ba64affba
test: resume and time based queries (#108) 2021-10-28 09:03:23 -04:00
Anthony Laibe 9030907960
test: add test for lightpush (#106)
* test: add test for lightpush


Co-authored-by: Richard Ramos <info@richardramos.me>
2021-10-28 14:41:17 +02:00
Richard Ramos 8253e381df
test: store 2021-10-25 15:41:08 -04:00
Anthony Laibe ce49f29c08 test: add test for relay protocol 2021-10-25 21:24:42 +02:00
Anthony Laibe 3bf00b2f37 test: add test for generating requestid 2021-10-25 20:27:01 +02:00
Richard Ramos b1284d367d
test: utils (#95) 2021-10-20 14:43:59 -04:00
Richard Ramos e482075fa9
refactor: peer selection and filter API (#87) 2021-10-18 08:25:55 -04:00
Richard Ramos 654bebdb93
fix: peer metrics 2021-10-16 18:02:48 -04:00
Anthony Laibe 54a93a60c5
feat: add ability to regenerate proto files (#76) 2021-10-14 11:03:25 +02:00
Richard Ramos c1bdead94d
revert: utils.GetUnixEpoch() 2021-10-12 09:45:22 -04:00
Richard Ramos dc52ba182a refactor: filter
- Create a channel when a subscription is created
- Add stop function for protocols
2021-10-11 19:02:25 -04:00
Richard Ramos 13aee0b1e0 refactor: change filter function parameters to not use protobuffers 2021-10-10 18:53:25 -04:00
Richard Ramos 8a28978f83
fix: wait until peer is connected to resume history 2021-10-10 11:46:31 -04:00
Richard Ramos 8f87009466
fix: docs 2021-10-10 11:46:23 -04:00
Richard Ramos 4a7779dda1 refactor: remove go-wakurelay-pubsub and update dependencies 2021-10-08 10:46:46 -04:00
Richard Ramos dbd7a1c2d7 WIP: replace go-wakurelay-pubsub by go-libp2p-pubsub 2021-10-08 10:46:46 -04:00
Richard Ramos 761ae88bbd
fix: remove channel for disconnections
Since a subscriber might not be connected always it makes no sense to automatically unsubscribe on disconnet
2021-10-06 15:25:41 -04:00
Richard Ramos 1991a54d64 refactor: connectedness
Uses libp2p network notifier to determine when a peer connects or disconnects, as well as using the host network peerstore instead of managing out own separate peer map
2021-10-06 14:07:46 -04:00
Richard Ramos 034656b2c0 refactor: rename protocol variables 2021-10-01 14:45:25 -04:00
RichΛrd 6c4a74fb9c
fix: check for messages first on filter in case a non null request is being sent (#50)
* fix: check for messages first on filter in case a non null request is being sent
* fix: clean up logs
* fix: peer lock
2021-09-27 08:47:18 -04:00
Andrea Maria Piana b387da9ab4
Add tests and lint code 2021-08-13 13:56:09 +02:00
Richard Ramos c9d3334f2d
fix: matcher function 2021-07-29 12:35:08 -04:00
Richard Ramos fd49e33a45
fix: timestamp format and bump go-wakurelay-pubsub 2021-07-29 11:03:30 -04:00
RichΛrd 654f3f8cd4
fix: order of fields of History Response protobuf (#35) 2021-07-29 08:43:29 -04:00
RichΛrd c3ac5ef9c5
feat: Add support for multiple protocol IDs (#34) 2021-07-29 08:41:37 -04:00
RichΛrd 748e738d9a
adding lint target and fixing lint issues (#38) 2021-07-29 08:40:54 -04:00
Richard Ramos a2ff7f3df9
Use sender timestamp for retrieving messages from store 2021-07-11 14:11:38 -04:00
Vitaliy Vlasov 690841d042 Add peer connectivity notifications 2021-06-29 16:35:01 +03:00
RichΛrd 367459f4d7
filter and lightpush showcase (#28) 2021-06-28 10:14:28 -04:00
RichΛrd 48d5a6996b
feat: configure metrics using opencensus (#32)
* feat: configure metrics using opencensus
* add runtime metrics
2021-06-28 09:20:23 -04:00
Vitaliy Vlasov 0c3f109d9e Add UnsubscribeFilter 2021-06-16 11:39:15 +03:00
RichΛrd ceacac10c3
feat: resume message history (#24) 2021-06-10 09:00:06 -04:00
Vitaliy Vlasov b9f3f562eb
waku2-filter (#23)
* waku2-filter
2021-06-10 08:59:51 -04:00
Richard Ramos 9138d58152
Add option to enable lightpush protocol 2021-04-28 16:23:03 -04:00
Richard Ramos 3d8aae5b81
Lightpush protocol
- Partially implements #20. Requires some tests
- Extracts wakurelay code to separate file
- Extracts request id gen to separate file
- Initial implementation of lightpush protocol
- Adds utils functions to obtain a message hash
- Publish receives a context to send a message
2021-04-28 16:10:44 -04:00
Richard Ramos aee86211d1
Enabling pubsub topic filter in history queries
Fixes #19
2021-04-28 11:11:32 -04:00
Richard Ramos 997bc4f2d8
refactor: organize code 2021-04-21 20:09:37 -04:00
Richard Ramos 287a54aca7
add history content filter 2021-04-20 17:46:35 -04:00
Richard Ramos ef67ff356f
support memory only waku store 2021-04-18 20:03:16 -04:00
Richard Ramos 57e36021bb
Use options pattern for starting a waku node 2021-04-18 19:41:42 -04:00
Richard Ramos 7ba8c51bca
use peer.ID instead of string 2021-04-15 13:55:40 -04:00
Richard Ramos e1f10d2099
Add options and start/end time to waku_store 2021-04-14 22:17:53 -04:00
Richard Ramos 1b746cdec8
Persistent peer store 2021-04-13 14:52:57 -04:00
Richard Ramos ad9abe601c
fix: numeric identifiers and index out of bounds issue on store 2021-04-12 13:59:09 -04:00
Richard Ramos ff8d4ef8a4
change ContentTopic from uint32 to string 2021-04-08 18:07:31 -04:00
Richard Ramos a84b81b400
fix: error handling and proof numeric id 2021-04-08 14:49:03 -04:00
Richard Ramos 9c224c1849
fix: nim-waku interop for store 2021-04-07 17:16:29 -04:00
Richard Ramos e8f7a4d38c
revert: making waku message fields optional 2021-04-06 19:17:52 -04:00
Richard Ramos be168ebe3f
fix: indirect access to content topic 2021-04-06 19:13:17 -04:00
Richard Ramos 0a0542324c
update waku_store protobuffer definition 2021-04-06 19:11:53 -04:00
Richard Ramos 65fc98f450
Update waku_message protobuffer definition 2021-04-06 19:07:20 -04:00
Richard Ramos 38b9ec5448
basic2 example 2021-04-04 15:33:21 -04:00
Richard Ramos 3294103e06
fix: index out of bounds when querying stored messages 2021-04-04 14:42:08 -04:00
Richard Ramos 56346c6b1a
fix: mark subscriptions as closed 2021-04-04 13:08:45 -04:00
Richard Ramos c44b40319e
create envelope struct with hash and size of message 2021-04-04 13:08:34 -04:00
Richard Ramos fa7169bbbc
use go-wakurelay-pubsub instead of go-libp2p-pubsub 2021-04-04 13:08:22 -04:00
Richard Ramos c1bcba756c
add logs 2021-04-04 13:07:55 -04:00
Richard Ramos 1345809aba
example node used to emit/listen/retrieve messages 2021-04-04 13:07:50 -04:00
Richard Ramos c4ed58c188
Waku store - initial implementation 2021-04-04 13:07:41 -04:00
Richard Ramos cac9aa7b37
Handle unsubscriptions and encoding of messages 2021-03-15 17:17:36 -04:00
Richard Ramos 09fe21baa5
Adding subscribe/unsubscribe methods 2021-03-15 12:07:23 -04:00
Richard Ramos 241733e6a4
WakuRelay 2021-03-12 15:06:20 -04:00
Richard Ramos ccff3dc8f8
Initial commit 2021-03-11 16:27:12 -04:00