Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

event-id from component#88

Merged
dakom merged 7 commits intomainfrom
event-id
Nov 12, 2025
Merged

event-id from component#88
dakom merged 7 commits intomainfrom
event-id

Conversation

@dakom
Copy link
Collaborator

@dakom dakom commented Oct 29, 2025

WIT change for Lay3rLabs/WAVS#1063

@dakom dakom requested review from ismellike and ueco-jb October 29, 2025 06:23
@dakom dakom marked this pull request as draft October 29, 2025 07:05
@dakom dakom changed the title return optional event id [DRAFT/DNM] return optional event id Oct 29, 2025
@dakom dakom requested a review from ethanfrey October 29, 2025 07:06
@dakom dakom changed the title [DRAFT/DNM] return optional event id return optional event id Oct 31, 2025
@dakom dakom marked this pull request as ready for review October 31, 2025 05:30
@dakom dakom changed the title return optional event id event-id from component Oct 31, 2025
@dakom dakom changed the title event-id from component event-id(s) from component Oct 31, 2025
Copy link
Collaborator

@ismellike ismellike left a comment

Choose a reason for hiding this comment

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

nice lgtm thanks for the explanation

@dakom dakom changed the title event-id(s) from component event-id from component Oct 31, 2025
Copy link
Contributor

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

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

Minor comments
Making it optional and not making this a vec seems small enough

// currently unused
ordering: option<u64>,
// make sure this is unique for every response!
event-id: response-event-id
Copy link
Contributor

Choose a reason for hiding this comment

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

To make this more backwards compatible, you could make this option and None is the same as auto


// hash any arbitrary payload to generate the event id
// it's up to you to ensure uniqueness here
hash(list<u8>),
Copy link
Contributor

Choose a reason for hiding this comment

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

Examples would be good.
For TG example, you’d use hash(update_id.as_bytes()) or something like that?

@ethanfrey
Copy link
Contributor

I would suggest simplifying to:

  • auto (no args. Just what we do now)
  • raw (pass in some bytes that will be padded to the 8 or 12 bytes it should be

Hash could be added as well, but why not let the component hash if it wants rather than complicate wit

@dakom dakom merged commit 4286526 into main Nov 12, 2025
1 check passed
@dakom dakom deleted the event-id branch November 12, 2025 15:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants