Commit Graph

156 Commits

Author SHA1 Message Date
Igor Sirotin 44c39d345e
chore: testWakuV2Config (#4704)
* chore: testWakuV2Config

* renamed to `NewTestWakuV2`
2024-02-12 12:53:15 +00:00
Igor Sirotin 8fa31df498
chore: better lib-p2p logging (#4706)
* fix: libp2p debug level follows main logger level
* chore: implement pubsub tracer
2024-02-12 12:10:29 +00:00
Andrea Maria Piana 605fe40e32 Fix encryption metadata issues #4613
This commit fixes a few issues with communities encryption:

Key distribution was disconnected from the community description, this created a case where the key would arrive after the community description and that would result in the client thinking that it was kicked.
To overcome this, we added a message that signals the user that is kicked. Also, we distribute the key with the community description so that there's no more issues with timing.
This is a bit expensive for large communities, and it will require some further optimizations.

Key distribution is now also connected to the request to join response, so there are no timing issues.

Fixes an issue with key distribution (race condition) where the community would be modified before being compared, resulting in a comparison of two identical communities, which would result in no key being distributed. This commit only partially address the issue.
2024-02-07 10:25:41 +00:00
richΛrd f31808d938
fix: full nodes should run filter and lightpush (#4655) 2024-01-31 14:45:24 -04:00
Igor Sirotin 0c2a935578
fix: fetch history when back online (#4651) 2024-01-30 18:13:18 +00:00
richΛrd 98c1ebec05
fix: handle community shard unassignment and update (#4627) 2024-01-30 13:56:59 -04:00
richΛrd e2341248b3
feat: add peer count to logs (#4648) 2024-01-30 12:42:26 -04:00
Igor Sirotin 1f0fc2935c
fix: clear waku envelopes cache when deleting a chat (#4621)
* chore: extract `ErrPermissionToJoinNotSatisfied`
* chore: disable resending messages in communities tests
* chore: move newTestMessenger extraOptions to testMessengerConfig
* chore: `WithTestStoreNode` messenger option
* feat: waku `ClearEnvelopesCache` method
* fix: call `ClearEnvelopesCache` when deleting chat
* chore: `TestBecomeMemberPermissions` checks messages after rejoin
2024-01-30 13:43:34 +00:00
frank 69948a7024
fix: endless logout (#4563) 2024-01-30 19:45:08 +08:00
frank 9050ed7aaf
fix: waku udp port conflict (#4610) 2024-01-24 09:09:43 +08:00
Igor Sirotin 2a91fba1fa
chore: added and fixed some logs (#4577)
* chore: logs for successful storenode request
2024-01-23 18:20:01 +00:00
Andrea Maria Piana e65760ca85 Add basic peersyncing
This commit adds basic syncing capabilities with peers if they are both
online.

It updates the work done on MVDS, but I decided to create the code in
status-go instead, since it's very tight to the application (similarly
the code that was the inspiration for mvds, bramble, is all tight
together at the database level).

I reused parts of the protobufs.

The flow is:

1) An OFFER message is sent periodically with a bunch of message-ids and
   group-ids.
2) Anyone can REQUEST some of those messages if not present in their
   database.

3) The peer will then send over those messages.

It's disabled by default, but I am planning to add a way to set up the
flags.
2024-01-23 12:46:17 +00:00
Siddarth Kumar 926f6a3c72 Revert "test: bump go-libp2p"
This reverts commit d0ca4447c6.
2024-01-18 20:29:33 +00:00
Richard Ramos d0ca4447c6
test: bump go-libp2p 2024-01-18 14:28:06 +00:00
Igor Sirotin a5acffc001
fix: TestFetchRealCommunity with shards fleet (#4553)
* fix: TestFetchRealCommunity with shards fleet
* fix: DefaultShardPubsubTopic
* chore: print waku query request id
2024-01-16 13:38:41 +03:00
kaichao 0c474bb42c
feat: use automatic peer selection for filter. (#4531)
* feat: use automatic peer selection for filter.

* fix: remove sucess peers too.

* chore: remove filter manager state of peer candidates
2024-01-12 15:09:35 +08:00
richΛrd 1ac99c2dcb
chore: bump go-waku (#4505) 2024-01-05 16:43:05 -04:00
Igor Sirotin 195982c950
fix_(StoreNodeRequestManager): various fixes and improvements (#4509) 2023-12-27 13:53:19 +00:00
richΛrd b6f2aced08
chore: add dns discovery URL to the list of default nodes and add extra logging for store queries (#4490)
* chore: add dns discovery url to list of default discv5 nodes

* chore: add logs for store queries
2023-12-20 10:04:00 -04:00
Igor Sirotin 92f0479a0c
chore: fetch contact with `StoreNodeRequestManager` (#4484) 2023-12-20 12:49:12 +00:00
richΛrd e5ce11f067
fix: panic in broadcast when logout (#4475) 2023-12-19 11:42:50 -04:00
Igor Sirotin e3ef8c649a
chore: store node requests manager (#4446) 2023-12-15 19:50:12 +00:00
richΛrd 93aeefcb89
refactor(waku2): publish messages on a goroutine (#4466) 2023-12-15 08:02:04 -04:00
kaichao 9be202be50
chore: fix peer exchange and unit testing (#4381)
* chore: peer exchange local test

* chore: use local enr resolver

* remove light client close peer.

* fix: peer exchange not start when enabled

* chore: remove ws config

* uncomment light client

* use resolver option

* chore: use option param for dns resolver

* chore: fix vendor changes.

* chore: lint
2023-12-07 08:28:08 +08:00
kaichao e28eca1c54
Bump waku version (#4407)
* chore: make vendor

* chore: fix data types

* Update wakuv2/common/message.go

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

* Update wakuv2/common/message.go

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

* Update wakuv2/persistence/dbstore.go

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

* chore: use safe method to get timestamp.

* chore: use proto.Uint64 to convert reference

* chore: manual fix lint issue when import dependency

---------

Co-authored-by: richΛrd <info@richardramos.me>
2023-12-05 12:29:27 +08:00
Vitaly Vlasov 384543d3a6 Re-send messages with ResendAutomatically=true 2023-11-30 10:46:38 +02:00
Igor Sirotin e32c5546e1
test: request community from storenode (#4364)
* feat: request community info from storenode test

* shutdownWaitGroup

* fix requestCommunityInfoFromMailserver timestamp roundin
2023-11-25 23:24:20 +00:00
Pablo Lopez e9c9bbb7b1
Adding store wakuv2 test (#4340)
* chore: wip tests

* chore: wakuv2 store test

* chore: cleanup

* chore: cleanup

* chore: avoid using sleep in test

* cleanup
2023-11-24 10:13:26 +00:00
Prem Chaitanya Prathi f622265679 chore: fix linter error 2023-11-23 11:16:50 -04:00
Prem Chaitanya Prathi 9510ad0f5d fix: specify clusterid as 16 when using sharding fleet so that metadata proto negotiation doesn't fail 2023-11-23 11:16:50 -04:00
Richard Ramos 40c9ba82a5 fix(wakuv2): store query pubsubTopic 2023-11-22 14:02:50 -04:00
Vitaly Vlasov 1794b93c16 Always set PubsubTopic in filters 2023-11-18 02:26:34 +02:00
Richard Ramos d2578bf0cb fix: reset context on stop 2023-11-17 13:37:41 -04:00
Richard Ramos 573a97791e fix: start idService and add wg.Done to fnApply 2023-11-17 13:37:41 -04:00
Richard Ramos 89385cfcaf fix(waku2): use a cancelable context for initial bootnode discovery 2023-11-17 13:37:41 -04:00
Pablo Lopez f1d31d6339
add message hash to login (#4315) 2023-11-15 16:33:23 +02:00
richΛrd de12ca885c
fix(wakuv2): don't wait for connections to login (#4293)
- Identify will not block logout
- Use `peer.AddrInfo` instead of multiaddresses
- Modifies some logs to reduce noise
2023-11-10 11:31:59 -04:00
richΛrd 2c954d42cf
feat: replace DefaultPubsubTopic by Shard 32 (#4161) 2023-11-09 20:29:15 -04:00
Michal Iskierko 02e4cc6e1f feat: Send envelopes to telemetry service
Issue #12430
2023-11-08 11:34:10 +01:00
Igor Sirotin 9f69c32593
fix(wakuv2): post envelopes previously cached but not processed (#4246) 2023-11-02 14:16:59 +00:00
Andrea Maria Piana d3558d8e09
Disable waku test 2023-11-01 19:27:53 +00:00
Andrea Maria Piana a89a386c82
Increase timeout on waku tests 2023-11-01 15:47:41 +00:00
Patryk Osmaczko 2a5d3e5490 fix: mitigate flakiness of TestBasicWakuV2
fixes: #4105
2023-10-20 20:41:23 +02:00
Vitaliy Vlasov abac55c778 fix waku2 FilterManager.pingPeers() range variable issue; modify logs 2023-10-17 17:24:33 +03:00
richΛrd ba5ed725ce
waku2: static shards (#3944)
- use protected topics for communities
- associate chats to pubsub topics and populate these depending if the chat belongs to a community or not
- mailserver functions should be aware of pubsub topics
- generate private key for pubsub topic protection when creating a community
- add shard cluster and index to communities
- setup shards for existing communities
- distribute pubsubtopic password
- fix: do not send the requests to join and cancel in the protected topic
- fix: undefined shard values for backward compatibility
- refactor: use shard message in protobuffers
2023-10-12 15:21:49 -04:00
Andrea Maria Piana 9034f0a984 Update waku nodes 2023-10-05 18:20:44 +01:00
Vitaliy Vlasov 356b2f5ca3 Refactor filter health checks; add debugging logs 2023-10-04 00:39:33 +03:00
Richard Ramos 7d03ae8272 feat: enable filter full node via node config 2023-09-28 21:31:20 -04:00
Andrea Maria Piana 6f4f57b7a8
Handle nil error on request to join 2023-08-29 13:04:00 +01:00
Prem Chaitanya Prathi b3a93fff12
chore: bumped go-waku to recent commit which contains changes for improved peer management 2023-08-29 13:02:19 +01:00