File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
engine/execution/computation/computer Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -501,8 +501,12 @@ func (e *blockComputer) executeSystemTransactions(
501501 var callbackTxs []* flow.TransactionBody
502502
503503 if e .vmCtx .ScheduleCallbacksEnabled {
504- // We pass in the systemCollectionInfo here. However, the underlying flow.Collection object
505- // must not be used, because it cannot represent the final state of the system collection.
504+ // We pass in the `systemCollectionInfo` here. However, note that at this point, the composition of the system chunk
505+ // is not yet known. Specifically, the `entity.CompleteCollection` represents the *final* output of a process and is
506+ // immutable by protocol mandate. If we had a bug in our software that accidentally illegally mutated such stucts,
507+ // likely the node encountering that bug would misbehave and get slashed, or in the worst case the flow protocol might
508+ // be compromised. Therefore, we have the rigorous convention in our code base that the `CompleteCollection` is only
509+ // constructed once the final composition of the system chunk has been determined.
506510 // To that end, the CompleteCollection is nil here, such that any attempt to access the Collection will panic.
507511 callbacks , updatedTxnIndex , err := e .executeProcessCallback (
508512 callbackCtx ,
You can’t perform that action at this time.
0 commit comments