The ingestion engine and block computer have many responsibilities, which also results in pretty loaded structures between them.
Proposed Solution
Following the discussion on moving to an event-driven architecture on the execution node and better clarity of responsibility of each module, I propose the following steps to detangle this complexity and move toward dedicated event-driven modules.
Definition of Done
[x] remove dead codes
[x] move script execution code to a package outside of block computer (query engine)
[ ] define a set of pub-sub interfaces
[x] split ComputationResult into multiple parts (PR: #4078)
[ ] split computation.resultCollector into 3 components
1st one is responsible for collecting results of transactions and triggering collectionExecution events
2nd one is responsible for post-processing collectionExecution events and forms attestations and data structures needed for protocol
3rd one is responsible for handling block-level postprocessing needed (e.g. Receipt construction etc.)
[ ] move the collector components to the engine levels instead of being part of block computer
[ ] reduce storage interfaces to satisfy each engine and not using a shared giant state storage (e.g. adjust dependence of query engine to the storage)
[ ] update protocol level structures (e.g. update chunks to include commitment over state deltas), this also requires updating proto files and notifying the community in case any 3rd party tool is dependent on this (mostly addition of feilds so should not be a problem)
[ ] update the query engine to be a consumer of chunks's state deltas
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Problem Definition
The ingestion engine and block computer have many responsibilities, which also results in pretty loaded structures between them.
Proposed Solution
Following the discussion on moving to an event-driven architecture on the execution node and better clarity of responsibility of each module, I propose the following steps to detangle this complexity and move toward dedicated event-driven modules.
Definition of Done
computation.resultCollector
into 3 components