github.com/koko1123/flow-go-1@v0.29.6/model/messages/execution.go (about) 1 package messages 2 3 import ( 4 "github.com/koko1123/flow-go-1/engine/execution/state/delta" 5 "github.com/koko1123/flow-go-1/model/flow" 6 "github.com/koko1123/flow-go-1/module/mempool/entity" 7 ) 8 9 // ChunkDataRequest represents a request for the a chunk data pack 10 // which is specified by a chunk ID. 11 type ChunkDataRequest struct { 12 ChunkID flow.Identifier 13 Nonce uint64 // so that we aren't deduplicated by the network layer 14 } 15 16 // ChunkDataResponse is the response to a chunk data pack request. 17 // It contains the chunk data pack of the interest. 18 type ChunkDataResponse struct { 19 ChunkDataPack flow.ChunkDataPack 20 Nonce uint64 // so that we aren't deduplicated by the network layer 21 } 22 23 // ExecutionStateSyncRequest represents a request for state deltas between 24 // the block at the `FromHeight` and the block at the `ToHeight` 25 // since the state sync request only requests for sealed blocks, heights 26 // should be enough to specify the block deterministically. 27 type ExecutionStateSyncRequest struct { 28 FromHeight uint64 29 ToHeight uint64 30 } 31 32 type ExecutionStateDelta struct { 33 entity.ExecutableBlock 34 StateInteractions []*delta.Snapshot 35 EndState flow.StateCommitment 36 Events []flow.Event 37 ServiceEvents []flow.Event 38 TransactionResults []flow.TransactionResult 39 } 40 41 func (b *ExecutionStateDelta) ID() flow.Identifier { 42 return b.Block.ID() 43 } 44 45 func (b *ExecutionStateDelta) Checksum() flow.Identifier { 46 return b.Block.Checksum() 47 } 48 49 func (b *ExecutionStateDelta) Height() uint64 { 50 return b.Block.Header.Height 51 } 52 53 func (b *ExecutionStateDelta) ParentID() flow.Identifier { 54 return b.Block.Header.ParentID 55 }