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

fix(jsonrpc): encode waku messages payload in base64 (#1139) #1555

Merged
merged 1 commit into from
Feb 14, 2023

Conversation

LNSD
Copy link
Contributor

@LNSD LNSD commented Feb 13, 2023

This PR matches the recently merged RFC update (vacp2p/rfc#572) of the wakunode2 JSON-RPC API.

  • Moved base64 and hexstrings to waku/common module.
  • Added the WakuMessageRPC type matching the one specified in the RFC (here). As it is common to different APIs, added it in the jsonrpc module root.
  • Updated the message payload type to Base64String to comply with the spec.
  • Updated the Waku Store and Waku Relay JSON-RPC APIs to use the new WakuMessageRPC type instead.
  • Reorganized the JSON marshalling code under the types module.
  • Reworked the Waku Relay test suite for the public and the private APIs.

This PR resolves #1139.

@LNSD LNSD self-assigned this Feb 13, 2023
@LNSD LNSD force-pushed the fix-jsonrpc-relay branch 2 times, most recently from 642052e to 38bf400 Compare February 13, 2023 16:40
@LNSD LNSD marked this pull request as ready for review February 13, 2023 17:08
@LNSD LNSD mentioned this pull request Feb 13, 2023
Copy link
Contributor

@jm-clius jm-clius left a comment

Choose a reason for hiding this comment

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

Thanks! Went through everything and seems to now match the (new) RFC.

Copy link
Contributor

@rymnc rymnc left a comment

Choose a reason for hiding this comment

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

LGTM

@LNSD LNSD merged commit 9258914 into master Feb 14, 2023
@LNSD LNSD deleted the fix-jsonrpc-relay branch February 14, 2023 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

bug: get_waku_v2_relay_v1_messages return an array has payload instead of expected hex string
4 participants