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(peer-exchange): refactor/fix compliance test #1478

Merged
merged 4 commits into from
Aug 16, 2023

Conversation

danisharora099
Copy link
Collaborator

@danisharora099 danisharora099 commented Aug 14, 2023

Problem

The event for peer:update/peer:identify was being emitted BEFORE the peer-exchange discovery class was initialised for the scope of the compliance test.
#1477

Solution

Dial the node AFTER we initialise the peer-exchange discovery.

Notes

  • we have added a simple timeout to the dial which waits for the discovery class to have initialised; while this might work, there are theoretically still chances for race conditions

@danisharora099 danisharora099 requested a review from a team as a code owner August 14, 2023 11:48
@danisharora099 danisharora099 changed the title chore(peer-exchange): refactor compliance test chore(peer-exchange): refactor/fix compliance test Aug 14, 2023
@github-actions
Copy link

github-actions bot commented Aug 14, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku core 30.55 KB (0%) 612 ms (0%) 1.9 s (-16.05% 🔽) 2.5 s
Waku Simple Light Node 243.03 KB (0%) 4.9 s (0%) 5.3 s (-22.31% 🔽) 10.2 s
ECIES encryption 28.54 KB (0%) 571 ms (0%) 1.6 s (-5% 🔽) 2.2 s
Symmetric encryption 28.55 KB (0%) 571 ms (0%) 1.9 s (-2.47% 🔽) 2.5 s
DNS discovery 116.18 KB (0%) 2.4 s (0%) 4.4 s (-3.91% 🔽) 6.7 s
Privacy preserving protocols 124.78 KB (0%) 2.5 s (0%) 4.7 s (-3.5% 🔽) 7.2 s
Light protocols 27.76 KB (0%) 556 ms (0%) 1.7 s (-10.72% 🔽) 2.3 s
History retrieval protocols 27 KB (0%) 540 ms (0%) 1.8 s (+24.89% 🔺) 2.4 s
Deterministic Message Hashing 5.78 KB (0%) 116 ms (0%) 807 ms (-3.32% 🔽) 922 ms

@danisharora099 danisharora099 changed the base branch from chore/reset-test to master August 14, 2023 12:00
@danisharora099 danisharora099 merged commit 1548a4f into master Aug 16, 2023
10 checks passed
@danisharora099 danisharora099 deleted the chore/px-compliance-refactor branch August 16, 2023 05:44
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>
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>
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