Skip to content

Conversation

@adklempner
Copy link
Member

@adklempner adklempner commented Nov 20, 2025

Problem / Description

The browser-tests package was using an older version of @waku/sdk that wasn't using LightPush v3. This broke expected behavior in testing environment.

Solution

Update browser-tests to use latest versions of other js-waku packages

Also adds nwaku-style log upon successfully sending light push message

Notes


Checklist

  • Code changes are covered by unit tests.
  • Code changes are covered by e2e tests, if applicable.
  • Dogfooding has been performed, if feasible.
  • A test version has been published, if required.
  • All CI checks pass successfully.

@github-actions
Copy link

github-actions bot commented Nov 20, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku node 96.24 KB (0%) 2 s (0%) 763 ms (+54.65% 🔺) 2.7 s
Waku Simple Light Node 147.6 KB (0%) 3 s (0%) 917 ms (+33.86% 🔺) 3.9 s
ECIES encryption 22.62 KB (0%) 453 ms (0%) 537 ms (+171.55% 🔺) 990 ms
Symmetric encryption 22 KB (0%) 440 ms (0%) 401 ms (+253.53% 🔺) 841 ms
DNS discovery 52.17 KB (0%) 1.1 s (0%) 541 ms (+21.49% 🔺) 1.6 s
Peer Exchange discovery 52.91 KB (0%) 1.1 s (0%) 547 ms (+26.71% 🔺) 1.7 s
Peer Cache Discovery 46.64 KB (0%) 933 ms (0%) 535 ms (+85.14% 🔺) 1.5 s
Privacy preserving protocols 77.31 KB (0%) 1.6 s (0%) 530 ms (+23.24% 🔺) 2.1 s
Waku Filter 79.82 KB (0%) 1.6 s (0%) 592 ms (+17.81% 🔺) 2.2 s
Waku LightPush 77.97 KB (0%) 1.6 s (0%) 650 ms (-0.8% 🔽) 2.3 s
History retrieval protocols 83.74 KB (0%) 1.7 s (0%) 537 ms (+29.49% 🔺) 2.3 s
Deterministic Message Hashing 28.98 KB (0%) 580 ms (0%) 315 ms (+7.78% 🔺) 894 ms

@adklempner adklempner force-pushed the feat/bump-deps-browser-image branch from 8b0c1e0 to 89f4a6d Compare December 2, 2025 02:32
@adklempner adklempner changed the title feat: update waku dependencies in browser tests feat(browser-tests): update waku dependencies, add nwaku-style log for light push Dec 2, 2025
@adklempner adklempner marked this pull request as ready for review December 2, 2025 02:33
@adklempner adklempner requested a review from weboko December 2, 2025 03:41
@weboko
Copy link
Collaborator

weboko commented Dec 9, 2025

@adklempner is this PR reviewable?

@adklempner
Copy link
Member Author

@adklempner is this PR reviewable?

Yes

}

function makeSerializable(result: SDKProtocolResult): SerializableSDKProtocolResult {
function makeSerializable(result: { successes: PeerId[], failures: Array<{ error: any, peerId?: PeerId }> }): SerializableSDKProtocolResult {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: create local type

@weboko weboko requested a review from Copilot December 9, 2025 23:38
@adklempner adklempner marked this pull request as draft December 9, 2025 23:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the @waku/browser-tests package to use the latest Waku SDK dependencies (v0.0.36) to support LightPush v3, and adds nwaku-style logging for successfully sent light push messages. The changes enable compatibility with the updated protocol version and provide better observability through standardized logging.

Key Changes:

  • Updated @waku/sdk from v0.0.34 to v0.0.36, @waku/discovery from v0.0.11 to v0.0.13, and @waku/interfaces from v0.0.33 to v0.0.34
  • Refactored message sending to use IMessage interface with proto object conversion
  • Added message hash calculation and nwaku-compatible logging format for successful light push operations

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/browser-tests/package.json Updated Waku dependency versions to latest releases
packages/browser-tests/web/index.ts Refactored to use IMessage interface, added messageHashStr import from @waku/core, enhanced SerializableSDKProtocolResult with messageHash field, and implemented message hash calculation
packages/browser-tests/src/routes/waku.ts Added nwaku-style logging with message hash and peer information for successful light push operations
package-lock.json Updated dependency lock file to reflect new package versions and transitive dependencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

return {
success: false,
error: "Could not publish message: no suitable peers",
error: lightPushResult.failures[0].error,
Copy link

Copilot AI Dec 9, 2025

Choose a reason for hiding this comment

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

Potential runtime error: accessing lightPushResult.failures[0] without checking if the failures array exists or has elements. This could throw an error if failures is undefined or empty. Consider adding a check like lightPushResult.failures?.length > 0 ? lightPushResult.failures[0].error : "Unknown error" or similar.

Suggested change
error: lightPushResult.failures[0].error,
error: (lightPushResult.failures && lightPushResult.failures.length > 0 && lightPushResult.failures[0].error) ? lightPushResult.failures[0].error : "Unknown error",

Copilot uses AI. Check for mistakes.
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.

3 participants