Skip to content

adapt event types and values to messaging-api spec#3839

Open
Ivansete-status wants to merge 2 commits into
masterfrom
align-events-with-messaging-api-spec
Open

adapt event types and values to messaging-api spec#3839
Ivansete-status wants to merge 2 commits into
masterfrom
align-events-with-messaging-api-spec

Conversation

@Ivansete-status
Copy link
Copy Markdown
Collaborator

@Ivansete-status Ivansete-status commented Apr 29, 2026

While revisiting the messaging-api.md I noticed that there are some minor discrepancies regarding some event types. This PR aims to perform such small adjustments.

Issue

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 29, 2026

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:3839

Built from 83bf249

Copy link
Copy Markdown
Contributor

@NagyZoltanPeter NagyZoltanPeter left a comment

Choose a reason for hiding this comment

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

Approve with reservations. We should not forget the follow up on delivery_module

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These are breaking changes for logos-delivery-module! Needs follow up and new release afterward.

proc(event: MessageSentEvent) {.async: (raises: []).} =
callEventCallback(ctx, "onMessageSent"):
$newJsonEvent("message_sent", event),
$newJsonEvent("message:sent", event),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why the : is better than _? just curious!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also looks like a breaking change 🤔

info "Message successfully propagated",
requestId = task.requestId, msgHash = task.msgHash.to0xHex()
MessagePropagatedEvent.emit(
MessageSendPropagatedEvent.emit(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think here the spec is wrong and the simpler form MessagePropagatedEvent is the better.
The wording of Send here misleading... compared to 'MessageSentEvent'.
WDYT?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is my fault; I should have renamed the events in the code when I cleaned up the spec before the LMAPI release.

I agree with Zoltan here. We should fix the spec, not the code.

MessageSendErrorEvent is technically correct, but MessageErrorEvent stuck and at the "simple send" LMAPI level, the only MessageErrorEvent is the send event, so the discrimination that I added there is doing zero actual work.

Also MessageSendPropagatedEvent -> MessagePropagatedEvent with even less loss of meaning or risk of symbol collision or rot.

What do you guys think? Should we submit a fix to the spec instead?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Okay fair enough. Thanks for the comments both!
Let's keep this opened and we can adapt the spec once we fully move to lips. logos-co/logos-lips#315

@Ivansete-status
Copy link
Copy Markdown
Collaborator Author

Let's carry on the discussion in the following PR: logos-co/logos-lips#333
( not closing this one yet as this is more visible for us .)

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.

4 participants