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

Only write to listener's app relayers #449

Merged
merged 2 commits into from
Aug 20, 2024
Merged

Conversation

cam-schultz
Copy link
Collaborator

Why this should be merged

Currently, the message coordinator singleton dispatches to every block from every chain to every application relayer. If there are messages in the block, they will still be processed as expected by the appropriate application relayer, and the other application relayers are very likely to simply no-op. However, if there are no messages in the blocks, then all application relayers will instead stage the height to be committed to the database. The committed heights will be out of order since they don't pertain to the expected chain, so no heights will be written. This breaks block checkpointing, and can cause OOM as the queue of pending blocks grows unbounded.

How this works

The message coordinator only dispatches to application relayers whose source chain ID matches the block being processed.

How this was tested

CI. Created #448 to add unit tests for the message coordinator

How is this documented

N/A

Copy link
Contributor

@iansuvak iansuvak left a comment

Choose a reason for hiding this comment

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

LGTM and thanks for creating the unit test issue, we definitely need it

@cam-schultz cam-schultz merged commit f8e47c4 into main Aug 20, 2024
7 checks passed
@cam-schultz cam-schultz deleted the only-commit-listener-chains branch August 20, 2024 21:28
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.

3 participants