|
|
@ -243,12 +243,12 @@ func (args *SendTxArgs) validateTxSidecar() error { |
|
|
|
commitments := make([]kzg4844.Commitment, n) |
|
|
|
commitments := make([]kzg4844.Commitment, n) |
|
|
|
proofs := make([]kzg4844.Proof, n) |
|
|
|
proofs := make([]kzg4844.Proof, n) |
|
|
|
for i, b := range args.Blobs { |
|
|
|
for i, b := range args.Blobs { |
|
|
|
c, err := kzg4844.BlobToCommitment(b) |
|
|
|
c, err := kzg4844.BlobToCommitment(&b) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return fmt.Errorf("blobs[%d]: error computing commitment: %v", i, err) |
|
|
|
return fmt.Errorf("blobs[%d]: error computing commitment: %v", i, err) |
|
|
|
} |
|
|
|
} |
|
|
|
commitments[i] = c |
|
|
|
commitments[i] = c |
|
|
|
p, err := kzg4844.ComputeBlobProof(b, c) |
|
|
|
p, err := kzg4844.ComputeBlobProof(&b, c) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return fmt.Errorf("blobs[%d]: error computing proof: %v", i, err) |
|
|
|
return fmt.Errorf("blobs[%d]: error computing proof: %v", i, err) |
|
|
|
} |
|
|
|
} |
|
|
@ -258,7 +258,7 @@ func (args *SendTxArgs) validateTxSidecar() error { |
|
|
|
args.Proofs = proofs |
|
|
|
args.Proofs = proofs |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
for i, b := range args.Blobs { |
|
|
|
for i, b := range args.Blobs { |
|
|
|
if err := kzg4844.VerifyBlobProof(b, args.Commitments[i], args.Proofs[i]); err != nil { |
|
|
|
if err := kzg4844.VerifyBlobProof(&b, args.Commitments[i], args.Proofs[i]); err != nil { |
|
|
|
return fmt.Errorf("failed to verify blob proof: %v", err) |
|
|
|
return fmt.Errorf("failed to verify blob proof: %v", err) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|