diff --git a/access/grpc/convert/convert.go b/access/grpc/convert/convert.go index 205c1cb9a..683108b1d 100644 --- a/access/grpc/convert/convert.go +++ b/access/grpc/convert/convert.go @@ -381,7 +381,10 @@ func MessageToFullCollection(m []*entities.Transaction) (flow.FullCollection, er func CollectionGuaranteeToMessage(g flow.CollectionGuarantee) *entities.CollectionGuarantee { return &entities.CollectionGuarantee{ - CollectionId: g.CollectionID.Bytes(), + CollectionId: g.CollectionID.Bytes(), + ReferenceBlockId: g.ReferenceBlockID.Bytes(), + Signature: g.Signature, + SignerIndices: g.SignerIndices, } } @@ -453,7 +456,10 @@ func MessageToCollectionGuarantee(m *entities.CollectionGuarantee) (flow.Collect } return flow.CollectionGuarantee{ - CollectionID: flow.HashToID(m.CollectionId), + CollectionID: flow.HashToID(m.CollectionId), + ReferenceBlockID: flow.HashToID(m.ReferenceBlockId), + Signature: m.Signature, + SignerIndices: m.SignerIndices, }, nil } diff --git a/access/http/convert/convert.go b/access/http/convert/convert.go index 2f36bf11f..df8640327 100644 --- a/access/http/convert/convert.go +++ b/access/http/convert/convert.go @@ -102,7 +102,7 @@ func ToCollectionGuarantees(guarantees []models.CollectionGuarantee) []*flow.Col for i, guarantee := range guarantees { flowGuarantees[i] = &flow.CollectionGuarantee{ - flow.HexToID(guarantee.CollectionId), + CollectionID: flow.HexToID(guarantee.CollectionId), } } diff --git a/collection.go b/collection.go index 3de5fff16..14a5dfdc9 100644 --- a/collection.go +++ b/collection.go @@ -45,7 +45,10 @@ func (c Collection) Encode() []byte { // A CollectionGuarantee is an attestation signed by the nodes that have guaranteed a collection. type CollectionGuarantee struct { - CollectionID Identifier + CollectionID Identifier + ReferenceBlockID Identifier + Signature []byte + SignerIndices []byte } type FullCollection struct { diff --git a/test/entities.go b/test/entities.go index ea8300b96..c784de16b 100644 --- a/test/entities.go +++ b/test/entities.go @@ -225,7 +225,9 @@ func (c *FullCollection) New() *flow.FullCollection { } type CollectionGuarantees struct { - ids *Identifiers + ids *Identifiers + bytes *Bytes + sigs *Signatures } type BlockSeals struct { @@ -236,13 +238,18 @@ type BlockSeals struct { func CollectionGuaranteeGenerator() *CollectionGuarantees { return &CollectionGuarantees{ - ids: IdentifierGenerator(), + ids: IdentifierGenerator(), + bytes: BytesGenerator(), + sigs: SignaturesGenerator(), } } func (g *CollectionGuarantees) New() *flow.CollectionGuarantee { return &flow.CollectionGuarantee{ - CollectionID: g.ids.New(), + CollectionID: g.ids.New(), + ReferenceBlockID: g.ids.New(), + Signature: g.sigs.New()[0], + SignerIndices: g.bytes.New(), } }