* SDS: export `MessageId`
* SDS: attach retrieval hints to incoming messages
* sds: ensure items are ordered by timestamp
* test: sds: avoid using "as any" as it bypasses type checks
* test: filter: avoid using "as any" as it bypasses type checks
* test: fix tests without introducing proxy
* feat: query on connect
Perform store time-range queries upon connecting to a store node.
Some heuristics are applied to ensure the store queries are not too frequent.
* make `maybeQuery` private
* query-on-connect: use index.ts only for re-export
* query-on-connect: update doc
* store connect evt: use enum instead of free strings for Waku event types
* store connect evt: more accurate enum name
* store connect evt: add store connect event on peer manager
* store connect evt: simplify logic statements
* store connect evt: test store connect
* store connect evt: export event types
* test: use enum
* Shorter name for waku events
* update local peer discovery, make it configurable for cache
* move to separate file
* up tests, remove local storage from tests
* pass local peer cache options
* add e2e tests
* add aditional e2e tests for local cache
* rename local-peer-cache into peer-cache
* update tests, ci
* prevent filterign ws addresses
* rename, mark stuff to remove
* rename type
* update exports from discovery package, improve PX implementation
* re-structure px discovery, comment tests
* implement UT, E2E Tests, clean code a bit, implement recurring PX discovery, move DNS E2E Tests to separate folder, remove not needed E2E tests
* fix discovery dialer e2e test
* mark as started
* fix dns tests
* attempt to fix e2e
* skip test
* update tests
* fix typo
* add catch all in stream manager, update tests
* update mock
* update test
* introduce `MessageId` type
# Conflicts:
# packages/sds/src/message_channel/message_channel.ts
* fix: own messages are not used for ack
* fix: own messages are not used for ack
* doc: long term solution is SDS protocol change
* SDS: renaming to match message function
* SDS: introduce `Message` class for easier encoding/decoding
# Conflicts:
# packages/sds/src/message_channel/events.ts
# packages/sds/src/message_channel/message_channel.ts
* SDS Message is a class now
* SDS: it's "possibly" not "partially" acknowledged.
* SDS: TODO
* SDS: fix tests
* SDS: make logs start with `waku`
* SDS: add bloom filter test
# Conflicts:
# packages/sds/src/message_channel/events.spec.ts
* SDS: improve naming
* SDS: improve naming
Messages are not "sent" or received, but pushed for processing in local queues.
* SDS: sync message should not be delivered
* SDS: renaming from earlier
* SDS: remove useless variable
* SDS: Fix comment
* SDS: sync messages do not get "delivered"
* SDS: acks
* SDS: simplify delivered event
* SDS: improve event naming
* SDS: fix comment
* SDS: make task error an official event
* SDS: Mark messages that are irretrievably lost
* SDS: remove default for irretrievable and simplify config
* SDS: typo on sync event
* SDS: add and user sender id
* SDS: resent message never get ack'd
* SDS: fix cylic dependencies
* SDS: helpful logs
* SDS: avoid duplicate history entries
* SDS: export options
* introduce `MessageId` type
* fix deprecated import
* test: own messages are not used for acks
* fix: own messages are not used for ack
* fix: own messages are not used for ack
* test: do not self-possible-ack
* doc: long term solution is SDS protocol change
Nodes returned by DNS Discovery are not guaranteed to be reachable.
Hence, setting an upfront limit based on sought capability does not provide
any guarantees that such capability should be reached.
The discovery's mechanism role is to find Waku 2 nodes. As many as possible.
It is then the role of the peer manager to decide:
- whether to attempt connecting to the node based on advertised capabilities
- retain connection to the node based on actual mounted protocols.
We still want to prevent infinite loops, hence the `maxGet` parameter.
Also, there was a dichotomy between code tested, and code actually used by libp2p peer discovery, now resolved.
# Conflicts:
# packages/discovery/src/dns/constants.ts
These are high level configuration values, that need to be consistent within a given execution. Setting them as default value at such a low level is a footgun risk.
Concepts are being mixed up between the global network config (static vs auto sharding), that needs to be the same of all nodes in the network, individual node configuration (eg relay node subscribing to a given shard), and the routing characteristic of a specific message (eg pubsub topic, shard).
This stops proper configuration of nwaku post 0.36.0 because we know need to be deliberate on whether nwaku nodes are running with auto or static sharding.
It also included various back and forth conversions between shards, pubsub topics, etc.
With this change, we tidy up the network configuration, and make it explicit whether it is static or auto sharded.
We also introduce the concept of routing info, which is specific to a message, and tied to the overall network configuration.
Routing info abstract pubsub topic, shard, and autosharding needs. Which should lead to easier tidy up of the pubsub concept at a later stage.
# Conflicts:
# packages/core/src/lib/connection_manager/connection_manager.ts
# packages/core/src/lib/metadata/metadata.ts
# packages/interfaces/src/metadata.ts
# packages/interfaces/src/sharding.ts
# packages/relay/src/create.ts
# packages/sdk/src/filter/filter.ts
# packages/sdk/src/filter/types.ts
# packages/sdk/src/light_push/light_push.spec.ts
# packages/tests/tests/sharding/auto_sharding.spec.ts
# packages/tests/tests/sharding/static_sharding.spec.ts
# Conflicts:
# packages/sdk/src/store/store.ts