Commit Graph

84 Commits

Author SHA1 Message Date
Anton Iakimov 9f2c0ed6b5
chore: switch wakuv2 fleet to waku (#1910)
* chore: switch from decomissioned wakuv2 fleet

* chore: minor fixes + CI

* chore: fix eslint

* fix: eslint

* chore: fix test

---------

Co-authored-by: danisharora099 <danisharora099@gmail.com>
2024-04-07 15:21:00 +03:00
Danish Arora 86058c59a1
chore: remove stale references to deprecated packages (#1936) 2024-04-07 14:19:47 +03:00
dependabot[bot] 0b54d2e3d7
chore(deps)(deps-dev): bump cspell from 8.6.0 to 8.6.1 (#1930)
Bumps [cspell](https://github.com/streetsidesoftware/cspell/tree/HEAD/packages/cspell) from 8.6.0 to 8.6.1.
- [Release notes](https://github.com/streetsidesoftware/cspell/releases)
- [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell/CHANGELOG.md)
- [Commits](https://github.com/streetsidesoftware/cspell/commits/v8.6.1/packages/cspell)

---
updated-dependencies:
- dependency-name: cspell
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-04 16:42:51 +03:00
Danish Arora bf42c8f53a
chore(store)!: move protocol implementation opinions to `@waku/sdk` (#1913)
* refactor the Store protocol into Core and SDK, simplify `queryGenerator()`

* update imports & types

* chore: `@noble/hashes` moves to `sdk`

* chore: update tests

* chore: update size-limit import path

* fix: cursor tests, use `Cursor` type from `proto.Index` instead of redefining

* export wakuStore from sdk

* fix: imports

* chore: use specific version for package

* chore: handle error for peer access

* use type instead of interface

* rm: comment

* add TODO

* chore!: remove deprecated function definition

* chore: improve logging
2024-04-01 16:47:47 +05:30
dependabot[bot] cb8921e4a2
chore(deps)(deps-dev): bump cspell from 8.3.2 to 8.6.0 (#1927)
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 8.3.2 to 8.6.0.
- [Release notes](https://github.com/streetsidesoftware/cspell/releases)
- [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md)
- [Commits](https://github.com/streetsidesoftware/cspell/compare/v8.3.2...v8.6.0)

---
updated-dependencies:
- dependency-name: cspell
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-22 23:50:36 +01:00
Václav Pavlín def8a259ca
bug: check if process is defined before accessing it 2024-03-15 22:02:12 +01:00
Danish Arora 1882023c58
feat(metadata): use error codes (#1904) 2024-03-12 16:40:08 +05:30
Danish Arora 1e86c3d63e
feat!: @waku/discovery (#1876)
* initialise the new package

* move dns-discovery

* move peer-exchange

* move local-peer-cache-discovery

* add polyfill for node - dynamic import

* update size-limit

* update release-please

* chore: update pacakge desc

* chore: cleanup

* add peer-exchange and local peer cache to size-limit
2024-03-12 15:56:49 +05:30
Sasha 8f867404e3
feat: add cross peer dependency for @waku packages (#1889)
* move core package

* move dns-discovery

* move enr

* move local discovery

* move message encryption

* move message encryption[2]

* move message-hash

* move peer exchange

* move relay

* move sdk

* move utils
2024-03-12 02:18:40 +01:00
Danish Arora 8deab11890
chore(lightpush)!: move protocol implementation opinions to `@waku/sdk` (#1887)
* chore: restructure @waku/sdk

* chore: introduce `BaseProtocolCore` and `BaseProtocolSDK`

* chore: introduce `LightPushCore` and `LightPushSDK`

* chore: update `relay` for new types

* chore(sdk): update structure

* chore(filter): add `numPeersToUse`

* chore: update tests

* update: size-limit

* chore: update more tests

* attach issue link to TODOs
2024-03-11 18:50:34 +05:30
dependabot[bot] fb41f4c723
chore(deps)(deps): bump @libp2p/ping from 1.0.11 to 1.0.12 (#1892)
Bumps [@libp2p/ping](https://github.com/libp2p/js-libp2p) from 1.0.11 to 1.0.12.
- [Release notes](https://github.com/libp2p/js-libp2p/releases)
- [Changelog](https://github.com/libp2p/js-libp2p/blob/main/.release-please.json)
- [Commits](https://github.com/libp2p/js-libp2p/compare/ping-v1.0.11...ping-v1.0.12)

---
updated-dependencies:
- dependency-name: "@libp2p/ping"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 23:10:37 +01:00
Sasha 8eb5703a27
chore: release master (#1881) 2024-03-05 00:11:44 +01:00
Sasha 9f198dd149
feat: add bootstrapPeers option and refactor sdk (#1871)
* move relay related code

* move libp2p to utils

* define CreateWakuNodeOptions

* improve options

* make libp2p use from create function

* add bootstrapPeers option

* fix lint

* fix types, imports

* fix exports

* use bootstrap along default bootstrap

* fix test as REST does not return peer though connection is made

* rollback condition change

* enable gossipSub back for every node
2024-03-04 10:56:20 +01:00
dependabot[bot] 4f2c0bcb9e
chore(deps)(deps-dev): bump rollup from 4.9.5 to 4.12.0 (#1870)
Bumps [rollup](https://github.com/rollup/rollup) from 4.9.5 to 4.12.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.9.5...v4.12.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-29 01:16:50 +01:00
Danish Arora f3cb10d484
chore!: rename local-discovery to local-peer-cache-discovery (#1867) 2024-02-29 01:05:54 +05:30
Arseniy Klempner ee2d4176f8
feat: create node and subscription by content topic 2024-02-27 15:37:57 -08:00
dependabot[bot] 6d3ed304a8
chore(deps)(deps): bump @chainsafe/libp2p-gossipsub (#1866)
Bumps [@chainsafe/libp2p-gossipsub](https://github.com/ChainSafe/js-libp2p-gossipsub) from 11.1.0 to 12.0.0.
- [Release notes](https://github.com/ChainSafe/js-libp2p-gossipsub/releases)
- [Changelog](https://github.com/ChainSafe/js-libp2p-gossipsub/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ChainSafe/js-libp2p-gossipsub/compare/v11.1.0...v12.0.0)

---
updated-dependencies:
- dependency-name: "@chainsafe/libp2p-gossipsub"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-27 22:01:02 +05:30
Danish Arora 199f6ab2ff
feat: local discovery (#1811)
* initialise the new package

* feat: implement LocalStorageDiscovery

* add: Startable to cspell

* add compliance test

* add: discovery tests

* rm: browser tests script

* address comments

* add type safety to getting peers from local

* only dispatch peer if it does not exist

* move ws ma extraction to utils

* chore: update package name to local-discovery

* fix: add compliance test with no external deps on service node

* use peer:identify instead of peer:update

* add: unit tests & remove sdk dependency

* move tests to self package

* update cspell + remove unrequired deps

* add types

* maintain in-memory peers for localstorage

* address comments

* chore: rename

* use name from options

* fix: saving peers

* rm: only
2024-02-16 20:06:27 +05:30
dependabot[bot] a787e306b9
chore(deps)(deps): bump @libp2p/ping from 1.0.9 to 1.0.11 (#1851)
Bumps [@libp2p/ping](https://github.com/libp2p/js-libp2p) from 1.0.9 to 1.0.11.
- [Release notes](https://github.com/libp2p/js-libp2p/releases)
- [Changelog](https://github.com/libp2p/js-libp2p/blob/main/.release-please.json)
- [Commits](https://github.com/libp2p/js-libp2p/compare/ping-v1.0.9...ping-v1.0.11)

---
updated-dependencies:
- dependency-name: "@libp2p/ping"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-15 19:35:23 +01:00
Arseniy Klempner e138b4f5c4
feat: decouple sharding params out of core 2024-02-08 08:42:47 -08:00
dependabot[bot] 749d84d5e4
chore(deps)(deps-dev): bump cspell from 7.3.6 to 8.3.2 (#1825)
Bumps [cspell](https://github.com/streetsidesoftware/cspell) from 7.3.6 to 8.3.2.
- [Release notes](https://github.com/streetsidesoftware/cspell/releases)
- [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/CHANGELOG.md)
- [Commits](https://github.com/streetsidesoftware/cspell/compare/v7.3.6...v8.3.2)

---
updated-dependencies:
- dependency-name: cspell
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-05 22:57:20 +01:00
Arseniy Klempner 68d3229644
feat: make ShardingParams optional in sdk, required internally 2024-01-24 07:36:00 -08:00
dependabot[bot] 09295c76a2
chore(deps)(deps): bump @libp2p/identify from 1.0.10 to 1.0.11 (#1804)
Bumps [@libp2p/identify](https://github.com/libp2p/js-libp2p) from 1.0.10 to 1.0.11.
- [Release notes](https://github.com/libp2p/js-libp2p/releases)
- [Changelog](https://github.com/libp2p/js-libp2p/blob/main/.release-please.json)
- [Commits](https://github.com/libp2p/js-libp2p/compare/ping-v1.0.10...libp2p-v1.0.11)

---
updated-dependencies:
- dependency-name: "@libp2p/identify"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-19 18:58:53 +01:00
dependabot[bot] bb680e49f7
chore(deps)(deps-dev): bump rollup from 4.6.0 to 4.9.5 (#1802)
Bumps [rollup](https://github.com/rollup/rollup) from 4.6.0 to 4.9.5.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.6.0...v4.9.5)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-19 13:12:18 +01:00
dependabot[bot] 191027de7e
chore(deps)(deps): bump @chainsafe/libp2p-gossipsub (#1798)
Bumps [@chainsafe/libp2p-gossipsub](https://github.com/ChainSafe/js-libp2p-gossipsub) from 10.1.1 to 11.1.0.
- [Release notes](https://github.com/ChainSafe/js-libp2p-gossipsub/releases)
- [Changelog](https://github.com/ChainSafe/js-libp2p-gossipsub/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ChainSafe/js-libp2p-gossipsub/compare/v10.1.1...v11.1.0)

---
updated-dependencies:
- dependency-name: "@chainsafe/libp2p-gossipsub"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-18 12:34:32 +01:00
dependabot[bot] 602ce16087
chore(deps)(deps): bump @libp2p/mplex from 9.0.10 to 10.0.12 (#1799)
Bumps [@libp2p/mplex](https://github.com/libp2p/js-libp2p) from 9.0.10 to 10.0.12.
- [Release notes](https://github.com/libp2p/js-libp2p/releases)
- [Changelog](https://github.com/libp2p/js-libp2p/blob/main/.release-please.json)
- [Commits](https://github.com/libp2p/js-libp2p/compare/tcp-v9.0.10...mdns-v10.0.12)

---
updated-dependencies:
- dependency-name: "@libp2p/mplex"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-18 12:23:47 +01:00
Arseniy Klempner ae7bc3eeec
chore: bump all libp2p packages to latest version 2024-01-17 11:59:08 -08:00
Sasha 7a8ef875dd
chore: supress websocket warning in tests (#1797) 2024-01-17 15:37:09 +01:00
dependabot[bot] 00bd51a42e
chore(deps)(deps-dev): bump interface-datastore from 8.2.5 to 8.2.10 (#1794)
Bumps [interface-datastore](https://github.com/ipfs/js-stores) from 8.2.5 to 8.2.10.
- [Release notes](https://github.com/ipfs/js-stores/releases)
- [Commits](https://github.com/ipfs/js-stores/compare/interface-datastore-v8.2.5...interface-datastore-v8.2.10)

---
updated-dependencies:
- dependency-name: interface-datastore
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-16 19:15:28 +01:00
Danish Arora 906c93329e
chore!: discourage the use of relay in browsers (#1778)
* add a comment discouraging relay

* move createRelayNode under an explicit export

* fix: build
2024-01-11 19:08:21 +05:30
fryorcraken aaa16f3ece
chore: release master (#1721) 2024-01-10 23:27:39 +01:00
Arseniy Klempner 69406bf1f0
reintroduce and deprecate named sharding (#1751)
Co-authored-by: danisharora099 <danisharora099@gmail.com>
2024-01-10 13:04:30 +05:30
Danish Arora c81872ae0e
supress info log for tests (#1763) 2024-01-02 16:30:18 +05:30
danisharora099 2bc3735e4d
feat: add support for autosharded pubsub topics
tests: use a generator for sharded pubsub topics
set pubsub topic in encoder/decoder based on sharding type
add function for grouping content topics by pubsub topic
add autosharding config to create options
add autoshard rpc endpoints to nwaku and use in tests
set autoshard pubsub topics in all protocols
fix rebase with static sharding
removes unused function
remove console logs
remove autosharding from ShardInfo, add to EncoderOptions
fix enr and encoder/decoder options
test that same application/version hashes to same shard index
update comment on shard field
fix spelling of autosharding
fix content topic protocol in tests
add sharding type alias and function to determine topic in encoders/decoders
move DefaultPubsubTopic from core to interfaces
2023-12-21 10:03:22 -08:00
Danish Arora 9ac2a3f363
feat: metadata protocol (#1732)
* add proto

* add rpc and interfaces

* add protocol implementation

* update faulty proto def

* add rpc and interfaces

* refactor implementation & write test

* setup the metadata protocol as a service

* fix cases where metadata service needs to be undefined

* remove redundant catch block

* remove addressed TODO

* update import path

* log errors

* remove redundant code from handling incoming metadata request

* update tests

* add test to check for active connections

* change expects

* save remote peer's shard info after successful connection
2023-12-05 19:26:52 +05:30
dependabot[bot] 66440ae383
chore(deps)(deps-dev): bump rollup from 3.29.2 to 4.6.0 (#1745)
Bumps [rollup](https://github.com/rollup/rollup) from 3.29.2 to 4.6.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v3.29.2...v4.6.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-30 18:29:12 +05:30
dependabot[bot] e40e084429
chore(deps)(deps): bump @chainsafe/libp2p-gossipsub (#1744)
Bumps [@chainsafe/libp2p-gossipsub](https://github.com/ChainSafe/js-libp2p-gossipsub) from 10.1.0 to 10.1.1.
- [Release notes](https://github.com/ChainSafe/js-libp2p-gossipsub/releases)
- [Changelog](https://github.com/ChainSafe/js-libp2p-gossipsub/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ChainSafe/js-libp2p-gossipsub/compare/v10.1.0...v10.1.1)

---
updated-dependencies:
- dependency-name: "@chainsafe/libp2p-gossipsub"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-30 00:38:21 +01:00
Danish Arora 4cf2ffefa7
feat!: add support for sharded pubsub topics & remove support for named pubsub topics (#1697)
* merge branches

* tests: use a generator for sharded pubsub topics

* fix namespace edge case

* move shardInfo to pubsubTopic logic in waku.ts

* simplify encoder/decoder creation logic + update tests

* sharding utils: add error handling

* remove redundant test util

* baseprotocol: create abstraction for initialising pubsub topics

* fix: `createDecoder` interface

* filter: createSubscription takes shardInfo instead of pubsubTopicStr

* fix: sharding utils for error handling

* SingleShardInfo: use a new interface instead of omitting and rename namespace

* change redundant namespaces
2023-11-28 15:57:18 +05:30
Sasha 7df21b7756
chore: add info message with expected WebSocket connection failures (#1733)
* audit deps

* add info message

* add option to hide message

* add test

* remove only
2023-11-28 00:40:59 +01:00
dependabot[bot] 681095dbd0
chore(deps)(deps): bump @chainsafe/libp2p-noise from 13.0.1 to 13.0.4 (#1736)
Bumps [@chainsafe/libp2p-noise](https://github.com/ChainSafe/js-libp2p-noise) from 13.0.1 to 13.0.4.
- [Release notes](https://github.com/ChainSafe/js-libp2p-noise/releases)
- [Changelog](https://github.com/ChainSafe/js-libp2p-noise/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ChainSafe/js-libp2p-noise/compare/v13.0.1...v13.0.4)

---
updated-dependencies:
- dependency-name: "@chainsafe/libp2p-noise"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-27 16:38:35 +01:00
dependabot[bot] 9744417d69
chore(deps)(deps-dev): bump @rollup/plugin-commonjs (#1730)
Bumps [@rollup/plugin-commonjs](https://github.com/rollup/plugins/tree/HEAD/packages/commonjs) from 25.0.4 to 25.0.7.
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/commonjs/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/commonjs-v25.0.7/packages/commonjs)

---
updated-dependencies:
- dependency-name: "@rollup/plugin-commonjs"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-27 12:11:15 +01:00
Danish Arora 3166a5135e
chore!: change all instances of `PubSubTopic` to `PubsubTopic` (#1703)
* rename all PubSub patterns

* feat: forbid identifiers with camelcase pubSub (#1709)

---------

Co-authored-by: Arseniy Klempner <adklempner@gmail.com>
2023-11-14 18:52:52 +03:00
dependabot[bot] 678635ec9f
chore(deps)(deps): bump @libp2p/mplex from 9.0.6 to 9.0.10 (#1701)
Bumps [@libp2p/mplex](https://github.com/libp2p/js-libp2p) from 9.0.6 to 9.0.10.
- [Release notes](https://github.com/libp2p/js-libp2p/releases)
- [Changelog](https://github.com/libp2p/js-libp2p/blob/master/.release-please.json)
- [Commits](https://github.com/libp2p/js-libp2p/compare/mdns-v9.0.6...mdns-v9.0.10)

---
updated-dependencies:
- dependency-name: "@libp2p/mplex"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-04 00:27:32 +01:00
fryorcraken 34a25c2f40
chore: release master (#1669) 2023-11-02 23:32:59 +01:00
dependabot[bot] f82add16ab
chore(deps)(deps-dev): bump @rollup/plugin-node-resolve (#1641)
Bumps [@rollup/plugin-node-resolve](https://github.com/rollup/plugins/tree/HEAD/packages/node-resolve) from 15.2.1 to 15.2.3.
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/node-resolve/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/node-resolve-v15.2.3/packages/node-resolve)

---
updated-dependencies:
- dependency-name: "@rollup/plugin-node-resolve"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Danish Arora <35004822+danisharora099@users.noreply.github.com>
2023-10-23 13:20:20 +05:30
dependabot[bot] 6aade791cc
chore(deps)(deps): bump libp2p from 0.46.12 to 0.46.14 (#1670)
Bumps [libp2p](https://github.com/libp2p/js-libp2p) from 0.46.12 to 0.46.14.
- [Release notes](https://github.com/libp2p/js-libp2p/releases)
- [Changelog](https://github.com/libp2p/js-libp2p/blob/master/.release-please.json)
- [Commits](https://github.com/libp2p/js-libp2p/compare/libp2p-v0.46.12...libp2p-v0.46.14)

---
updated-dependencies:
- dependency-name: libp2p
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-18 11:49:20 +05:30
fryorcraken 0e4ceb6ac9
chore: release master (#1568) 2023-10-16 16:18:34 +02:00
Danish Arora 9fe04d85f3
chore: use `pubsubTopic`/`pubsubTopics` across the codebase (#1653)
* chore: change all references of pubSubTopic to pubsubTopic

* change references of pubSubTopics to pubsubTopics

* flag words in cspell
2023-10-16 12:52:32 +05:30
Danish Arora 124a29ebba
feat(static-sharding): filter peer connections per shards (#1626)
* add interface for `ShardInfo`

* enr: add deserialization logic & setup getters

* add sharding related utils

* utils: add shard<-> bytes conversion helpers

* pass `pubSubTopics` to `Waku`

* add `rs`/`rsv` details during discovery

* connection-manager: discard irrelevant peers

* add tests for static sharding - peer exchange

* update `ConnectionManager` tests to account for topic validity

* add js suffix to import

* address some comments

* move shardInfo encoding to ENR

* test: update for new API

* enr: add tests for serialisation & deserialisation

* address comment

* update test

* move getPeershardInfo to ConnectionManager and return ShardInfo instead of bytes

* update encoding and decoding relay shards to also factor for shards>64

* relay shard encoding decoding: use DataView and verbose spec tests

* improve tests for relay shard encoding decoding

* rm: only

* improve log message for unconfigured pubsub topic

* minor improvement

* fix: buffer <> Uint8array problems with shard decoding

* fix: test

* rm: only
2023-10-10 20:18:02 +05:30
dependabot[bot] 64f38651bf
chore(deps)(deps): bump libp2p from 0.46.11 to 0.46.12 (#1630)
Bumps [libp2p](https://github.com/libp2p/js-libp2p) from 0.46.11 to 0.46.12.
- [Release notes](https://github.com/libp2p/js-libp2p/releases)
- [Changelog](https://github.com/libp2p/js-libp2p/blob/master/.release-please.json)
- [Commits](https://github.com/libp2p/js-libp2p/compare/libp2p-v0.46.11...libp2p-v0.46.12)

---
updated-dependencies:
- dependency-name: libp2p
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 22:11:49 +05:30