Skip to content

test: guard relayer event id allocations#2231

Open
ming1523 wants to merge 1 commit intozama-ai:mainfrom
ming1523:test/guard-relayer-event-id-space
Open

test: guard relayer event id allocations#2231
ming1523 wants to merge 1 commit intozama-ai:mainfrom
ming1523:test/guard-relayer-event-id-space

Conversation

@ming1523
Copy link
Copy Markdown

@ming1523 ming1523 commented Apr 1, 2026

Summary

This PR adds regression tests for relayer event ID allocation in relayer/src/core/event.rs.

Why

The file already contains a TODO to add coverage for event ID conflicts.

These tests make two invariants explicit:

  • non-delegated event categories should not accidentally reuse each other's event IDs
  • delegated user decrypt events should remain intentionally aligned with the user decrypt event ID space

This helps protect the routing contract encoded in event_id() without changing runtime behavior.

Changes

  • add a test that checks the non-delegated event ID spaces are disjoint
  • add a test that checks delegated user decrypt events stay mapped to the corresponding user decrypt IDs

Validation

  • verified the change is limited to test code in relayer/src/core/event.rs
  • cargo test was not run in this environment because the current machine does not have a usable Rust toolchain (cargo not found in PATH)

@ming1523 ming1523 requested a review from a team as a code owner April 1, 2026 07:44
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 1, 2026

Thank you for your pull request. We require contributors to sign our Contributor License Agreement / Terms and Conditions, and we don't seem to have the users @ming1523 on file. In order for us to review and merge your code, please sign:

  • For individual contribution: our CLA
  • for Bounty submission, if you are an individual: our T&C
  • for Bounty submission, if you are a company: our T&C
    to get yourself added.

If you already signed one of this document, just wait to be added to the bot config.

@ming1523
Copy link
Copy Markdown
Author

ming1523 commented Apr 1, 2026

I have already signed the individual CLA on April 1, 2026. This PR is part of the same small cleanup series as #2226, so I am waiting for the CLA bot/config to be refreshed on this branch as well.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 4, 2026

This PR is unverified and has been open for 2 days, it will now be closed. If you want to contribute please sign the CLA as indicated by the bot.

@github-actions github-actions Bot added the Stale label Apr 4, 2026
@github-actions github-actions Bot closed this Apr 4, 2026
@aquint-zama
Copy link
Copy Markdown
Contributor

@cla-bot check

@aquint-zama aquint-zama reopened this Apr 15, 2026
@cla-bot cla-bot Bot added the cla-signed label Apr 15, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 15, 2026

The cla-bot has been summoned, and re-checked this pull request!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants