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

Refactor Event Handling with Explicit Event Streams #1310

Open
karlem opened this issue Mar 11, 2025 · 1 comment
Open

Refactor Event Handling with Explicit Event Streams #1310

karlem opened this issue Mar 11, 2025 · 1 comment

Comments

@karlem
Copy link
Contributor

karlem commented Mar 11, 2025

Per the comment in the code, we should move away from implicit event serialization. Instead, let's implement an explicit event stream mechanism that batches events during block processing and dispatches them in one go at the end of each block. This change will improve clarity and control over our event handling.

Currently we have a function call (paraphrased) begin and add_tx and end working on memeber Option<X> using take -> modify -> set approach with .except as runtime asserts for correct handling. This is far from perfect and should either be externalized state, an internal envent queue with a tight loop running these operations, or a event stream where the sequence of events can be validated and events be discarded without asserting.

Copy link

linear bot commented Mar 11, 2025

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

No branches or pull requests

1 participant