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

Event dispatcher does not filter attachments when event_keys is configured #5558

Open
cylewitruk opened this issue Dec 11, 2024 · 1 comment
Assignees

Comments

@cylewitruk
Copy link
Member

Describe the bug
Not sure if it could be a bug or if it's expected, but @Jiloc reported that while trying to do a genesis sync on testnet with an event-observer configured using specific event_keys, he's received unexpected calls to /attachments/new, which isn't included in his event observer config:

[[events_observer]]
endpoint = "sidecar:5000"
events_keys = [
    "SN2ZNBHMSQDZCAFWTX2KYDSXG0TGV1MAJNZV2HSHS.sbtc-registry::print",
]

Since these events aren't handled by his observer, they return 404 and thus block the node from progressing.

@obycode had a quick look and his analysis was:

It looks like the event dispatcher does not filter the list of registered observers at all for attachments. I don't know if that is intentional or not.

Steps To Reproduce
Performing a genesis sync with an event observer configured which does not handle the /attachments/* events should reproduce this.

Expected behavior
As a user, if I supply specific event_keys, I would not expect to receive other, non-related events.

Environment (please complete the following information):

  • OS: Ubuntu
  • 3.1.0.0.0 (docker release image)
@rdeioris
Copy link
Contributor

Confirmed:

[[events_observer]]
endpoint = "localhost:3700"
events_keys = ["memtx"]

will send any events.

Working on the fix right now.

@rdeioris rdeioris mentioned this issue Dec 13, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Status: 🆕 New
Development

No branches or pull requests

2 participants