mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
protect the integrity of proofs
This commit is contained in:
parent
f17df6db91
commit
fd07013f98
1 changed files with 3 additions and 2 deletions
|
|
@ -117,15 +117,16 @@ func (sc *BlobTxSidecar) ToV1() error {
|
|||
return nil
|
||||
}
|
||||
if sc.Version == BlobSidecarVersion0 {
|
||||
sc.Proofs = make([]kzg4844.Proof, 0, len(sc.Blobs)*kzg4844.CellProofsPerBlob)
|
||||
proofs := make([]kzg4844.Proof, 0, len(sc.Blobs)*kzg4844.CellProofsPerBlob)
|
||||
for _, blob := range sc.Blobs {
|
||||
cellProofs, err := kzg4844.ComputeCellProofs(&blob)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sc.Proofs = append(sc.Proofs, cellProofs...)
|
||||
proofs = append(proofs, cellProofs...)
|
||||
}
|
||||
sc.Version = BlobSidecarVersion1
|
||||
sc.Proofs = proofs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue