Skip to content

Commit c91cee5

Browse files
authored
Merge pull request #36 from z3n-chada/comment-and-cast-fixes
Comment and cast fixes
2 parents 5a63dd2 + d5b4ad6 commit c91cee5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

eth/eth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func VerifyKZGProof(polynomialKZG KZGCommitment, z, y [32]byte, kzgProof KZGProo
137137
func KZGToVersionedHash(kzg KZGCommitment) VersionedHash {
138138
h := sha256.Sum256(kzg[:])
139139
h[0] = BlobCommitmentVersionKZG
140-
return VersionedHash([32]byte(h))
140+
return VersionedHash(h)
141141
}
142142

143143
// BlobToKZGCommitment implements blob_to_kzg_commitment from the EIP-4844 consensus spec:

eth/helpers.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func bitReversalPermutation(l []bls.G1Point) []bls.G1Point {
5050
return out
5151
}
5252

53-
// VerifyKZGProof implements verify_kzg_proof from the EIP-4844 consensus spec,
53+
// VerifyKZGProofFromPoints implements verify_kzg_proof from the EIP-4844 consensus spec,
5454
// only with the byte inputs already parsed into points & field elements.
5555
func VerifyKZGProofFromPoints(polynomialKZG *bls.G1Point, z *bls.Fr, y *bls.Fr, kzgProof *bls.G1Point) bool {
5656
var zG2 bls.G2Point
@@ -66,7 +66,7 @@ func VerifyKZGProofFromPoints(polynomialKZG *bls.G1Point, z *bls.Fr, y *bls.Fr,
6666
return bls.PairingsVerify(&pMinusY, &bls.GenG2, kzgProof, &xMinusZ)
6767
}
6868

69-
// VerifyAggregateKZGProof implements verify_aggregate_kzg_proof from the EIP-4844 consensus spec,
69+
// VerifyAggregateKZGProofFromPolynomials implements verify_aggregate_kzg_proof from the EIP-4844 consensus spec,
7070
// only operating on blobs that have already been converted into polynomials.
7171
func VerifyAggregateKZGProofFromPolynomials(blobs Polynomials, expectedKZGCommitments KZGCommitmentSequence, kzgAggregatedProof KZGProof) (bool, error) {
7272
aggregatedPoly, aggregatedPolyCommitment, evaluationChallenge, err :=
@@ -132,7 +132,7 @@ func hashToBLSField(input []byte) *bls.Fr {
132132
return out
133133
}
134134

135-
// ComputeAggregatedPolyAndcommitment implements compute_aggregated_poly_and_commitment from the EIP-4844 consensus spec:
135+
// ComputeAggregatedPolyAndCommitment implements compute_aggregated_poly_and_commitment from the EIP-4844 consensus spec:
136136
// https://github.com/ethereum/consensus-specs/blob/dev/specs/eip4844/polynomial-commitments.md#compute_aggregated_poly_and_commitment
137137
func ComputeAggregatedPolyAndCommitment(blobs Polynomials, commitments KZGCommitmentSequence) ([]bls.Fr, *bls.G1Point, *bls.Fr, error) {
138138
// create challenges
@@ -174,7 +174,7 @@ func ComputeAggregateKZGProofFromPolynomials(blobs Polynomials) (KZGProof, error
174174
return ComputeKZGProof(aggregatedPoly, evaluationChallenge)
175175
}
176176

177-
// ComputeAggregateKZGProof implements compute_kzg_proof from the EIP-4844 consensus spec:
177+
// ComputeKZGProof implements compute_kzg_proof from the EIP-4844 consensus spec:
178178
// https://github.com/ethereum/consensus-specs/blob/dev/specs/eip4844/polynomial-commitments.md#compute_kzg_proof
179179
func ComputeKZGProof(polynomial []bls.Fr, z *bls.Fr) (KZGProof, error) {
180180
y := EvaluatePolynomialInEvaluationForm(polynomial, z)

0 commit comments

Comments
 (0)