You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #5828, we modified the definition of Service Events to allow emission outside the context of the system chunk. This was done to simplify the smart contract code associated with emitting service events.
Bug Description
Verification Nodes make assumptions about service events during verification which no longer hold. In particular, they assume that all service events attached to an ExecutionResult were emitted during the system chunk.
A service event S was emitted outside the system chunk, and is included in the ExecutionResult
The Verification node executes the system chunk and observes no service event
The Verification node, while verifying its execution, expects S to have been emitted during the system chunk, and fails verification
Proposed Solution
VNs only process a subset of chunks. Because of that, we need to both:
update the Execution Node to explicitly state which service events were emitted in which chunk
update the Verification Node to:
read which service events were emitted in the chunk it is verifying (for all chunks)
verify service events for all chunk (not only system chunk)
For (1), where should we put the mapping from service event to chunk? Some options:
ExecutionResult.Chunks - We can put a ServiceEventIndices here referencing the outer ExecutionResult.ServiceEvents
ExecutionResult.ServiceEvents - Or, we can put a ChunkIndex here referencing where the event was emitted
ChunkDataPack - This is nice because only ENs and VNs use it, so there is limited surface area. However, guaranteeing that all service events are verified would be challenging, because no one verifier in general sees the full picture
Note: All of the above (except ChunkDataPack) would require changes to ExecutionResult, which in turn is a change to the block model.
The text was updated successfully, but these errors were encountered:
Context
In #5828, we modified the definition of Service Events to allow emission outside the context of the system chunk. This was done to simplify the smart contract code associated with emitting service events.
Bug Description
Verification Nodes make assumptions about service events during verification which no longer hold. In particular, they assume that all service events attached to an
ExecutionResult
were emitted during the system chunk.flow-go/module/chunks/chunkVerifier.go
Lines 294 to 302 in c632c51
This results in verification failing when verifying the system chunk:
ExecutionResult
Proposed Solution
VNs only process a subset of chunks. Because of that, we need to both:
For (1), where should we put the mapping from service event to chunk? Some options:
ExecutionResult.Chunks
- We can put aServiceEventIndices
here referencing the outerExecutionResult.ServiceEvents
ExecutionResult.ServiceEvents
- Or, we can put aChunkIndex
here referencing where the event was emittedChunkDataPack
- This is nice because only ENs and VNs use it, so there is limited surface area. However, guaranteeing that all service events are verified would be challenging, because no one verifier in general sees the full pictureNote: All of the above (except
ChunkDataPack
) would require changes toExecutionResult
, which in turn is a change to the block model.The text was updated successfully, but these errors were encountered: