Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade libp2p & related deps #1471

Merged
merged 22 commits into from
Aug 16, 2023

Conversation

danisharora099
Copy link
Collaborator

@danisharora099 danisharora099 commented Aug 11, 2023

Problems

New versions for deps like

Solutions

This PR:

  • upgrades libp2p to latest (0.46.3)
  • upgrades chainsafe deps to latest
  • removes deprecated one-off interface packages from libp2p and replaces them with new exports

Notes

Part of the maintenance milestone.

if we use the former package it works (because it installed aegir as a dependency instead of a dev) but we should move out to the new package because the former has not been updated in months/maintained anymore

@github-actions
Copy link

github-actions bot commented Aug 11, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku core 30.76 KB (0%) 616 ms (0%) 341 ms (+10.97% 🔺) 956 ms
Waku Simple Light Node 292.88 KB (0%) 5.9 s (0%) 1.6 s (+14.06% 🔺) 7.5 s
ECIES encryption 28.68 KB (0%) 574 ms (0%) 337 ms (+15.37% 🔺) 911 ms
Symmetric encryption 28.69 KB (0%) 574 ms (0%) 357 ms (-0.24% 🔽) 931 ms
DNS discovery 113 KB (0%) 2.3 s (0%) 689 ms (-11.35% 🔽) 3 s
Privacy preserving protocols 125.33 KB (0%) 2.6 s (0%) 762 ms (-9.53% 🔽) 3.3 s
Light protocols 30.49 KB (0%) 610 ms (0%) 320 ms (-16.43% 🔽) 930 ms
History retrieval protocols 29.69 KB (0%) 594 ms (0%) 424 ms (+1.24% 🔺) 1.1 s
Deterministic Message Hashing 5.79 KB (0%) 116 ms (0%) 142 ms (-1.54% 🔽) 257 ms

@danisharora099 danisharora099 changed the base branch from master to chore/prettier August 12, 2023 12:19
@danisharora099
Copy link
Collaborator Author

Failing CI check to be solved by #1476

@danisharora099 danisharora099 mentioned this pull request Aug 13, 2023
24 tasks
…0.0 (#1479)

Bumps [eslint-plugin-functional](https://github.com/eslint-functional/eslint-plugin-functional) from 5.0.8 to 6.0.0.
- [Release notes](https://github.com/eslint-functional/eslint-plugin-functional/releases)
- [Changelog](https://github.com/eslint-functional/eslint-plugin-functional/blob/main/CHANGELOG.md)
- [Commits](eslint-functional/eslint-plugin-functional@v5.0.8...v6.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-functional
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Copy link
Collaborator

@fryorcraken fryorcraken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe upgrade @libp2p/websockets while you're here.

packages/enr/src/creator.ts Outdated Show resolved Hide resolved
@@ -84,12 +84,10 @@ export function selectConnection(
let latestConnection: Connection | undefined;

connections.forEach((connection) => {
if (connection.stat.status === "OPEN") {
if (connection.status === "open") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do they export an enum we could use here?

Copy link
Collaborator Author

@danisharora099 danisharora099 Aug 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ConnectionStatus is a type but no enum unfortunately

export type ConnectionStatus = 'open' | 'closing' | 'closed'

danisharora099 and others added 4 commits August 16, 2023 11:14
* use `peer:identify` instead of `peer:update`

* dial the peer after initialising peer-exchange
Bumps [@libp2p/websockets](https://github.com/libp2p/js-libp2p) from 6.0.3 to 7.0.3.
- [Release notes](https://github.com/libp2p/js-libp2p/releases)
- [Changelog](https://github.com/libp2p/js-libp2p/blob/master/.release-please.json)
- [Commits](libp2p/js-libp2p@peer-record-v6.0.3...websockets-v7.0.3)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@danisharora099
Copy link
Collaborator Author

Maybe upgrade @libp2p/websockets while you're here.

already upgraded with 5ad0210

@danisharora099 danisharora099 force-pushed the chore/upgrade-libp2p-and-related branch from 6ff8414 to e8770c9 Compare August 16, 2023 14:07
@danisharora099 danisharora099 force-pushed the chore/upgrade-libp2p-and-related branch 2 times, most recently from 2fa9729 to 1fcd6ac Compare August 16, 2023 14:16
@danisharora099 danisharora099 merged commit bb6608e into chore/prettier Aug 16, 2023
12 of 18 checks passed
@danisharora099 danisharora099 deleted the chore/upgrade-libp2p-and-related branch August 16, 2023 14:17
@danisharora099 danisharora099 restored the chore/upgrade-libp2p-and-related branch August 16, 2023 14:17
@danisharora099 danisharora099 deleted the chore/upgrade-libp2p-and-related branch August 16, 2023 14:18
@danisharora099 danisharora099 restored the chore/upgrade-libp2p-and-related branch August 16, 2023 14:18
danisharora099 added a commit that referenced this pull request Aug 16, 2023
danisharora099 added a commit that referenced this pull request Aug 16, 2023
* chore: update noise

* update: package.lock

* update: @chainsafe/libp2p-gossipsub

* rm unwanted libp2p interface deps & bump up libp2p

* refactor code for new deps

* update: new package.lock

* update package.lock

* fix build

* chore(deps)(deps-dev): bump eslint-plugin-functional from 5.0.8 to 6.0.0 (#1479)

Bumps [eslint-plugin-functional](https://github.com/eslint-functional/eslint-plugin-functional) from 5.0.8 to 6.0.0.
- [Release notes](https://github.com/eslint-functional/eslint-plugin-functional/releases)
- [Changelog](https://github.com/eslint-functional/eslint-plugin-functional/blob/main/CHANGELOG.md)
- [Commits](eslint-functional/eslint-plugin-functional@v5.0.8...v6.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-functional
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(peer-exchange): refactor/fix compliance test (#1478)

* use `peer:identify` instead of `peer:update`

* dial the peer after initialising peer-exchange

* re-enable @waku/tests (#1472)

* chore(deps)(deps): bump @libp2p/websockets from 6.0.3 to 7.0.3 (#1481)

Bumps [@libp2p/websockets](https://github.com/libp2p/js-libp2p) from 6.0.3 to 7.0.3.
- [Release notes](https://github.com/libp2p/js-libp2p/releases)
- [Changelog](https://github.com/libp2p/js-libp2p/blob/master/.release-please.json)
- [Commits](libp2p/js-libp2p@peer-record-v6.0.3...websockets-v7.0.3)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* import type for interface

* update: tsdoc (#1476)

* fix imports for merge

* update typedoc exports

* add: CustomEvent import

* use new libp2p interface

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@fryorcraken
Copy link
Collaborator

how is this PR so massive? -45,000 lines???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants