diff --git a/store/generated_key/memstore/memstore.go b/store/generated_key/memstore/memstore.go index 3707029d..dce04571 100644 --- a/store/generated_key/memstore/memstore.go +++ b/store/generated_key/memstore/memstore.go @@ -21,6 +21,7 @@ import ( const ( DefaultPruneInterval = 500 * time.Millisecond + BytesPerFieldElement = 32 ) type Config struct { @@ -168,7 +169,7 @@ func (e *MemStore) Put(_ context.Context, value []byte) ([]byte, error) { X: commitment.X.Marshal(), Y: commitment.Y.Marshal(), }, - DataLength: uint32(len(encodedVal)), // #nosec G115 + DataLength: uint32((len(encodedVal) + BytesPerFieldElement - 1) / BytesPerFieldElement), // #nosec G115 BlobQuorumParams: []*disperser.BlobQuorumParam{ { QuorumNumber: 1,