Skip to content

Commit 55f30db

Browse files
core/vm, crypt/bls12381: fixed comments in bls (#21182)
* core/vm: crypto/bls12381: minor code comments * crypto/bls12381: fix comment
1 parent 9d93535 commit 55f30db

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

core/vm/contracts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ func (c *bls12381MapG1) Run(input []byte) ([]byte, error) {
904904
return nil, err
905905
}
906906

907-
// Encode the G1 point to 256 bytes
907+
// Encode the G1 point to 128 bytes
908908
return g.EncodePoint(r), nil
909909
}
910910

crypto/bls12381/fp2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func newFp2() *fp2 {
4444

4545
func (e *fp2) fromBytes(in []byte) (*fe2, error) {
4646
if len(in) != 96 {
47-
return nil, errors.New("input string should be larger than 96 bytes")
47+
return nil, errors.New("length of input string should be 96 bytes")
4848
}
4949
c1, err := fromBytes(in[:48])
5050
if err != nil {

crypto/bls12381/g2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func (g *G2) ToBytes(p *PointG2) []byte {
165165
return out
166166
}
167167

168-
// EncodePoint encodes a point into 128 bytes.
168+
// EncodePoint encodes a point into 256 bytes.
169169
func (g *G2) EncodePoint(p *PointG2) []byte {
170170
// outRaw is 96 bytes
171171
outRaw := g.ToBytes(p)

0 commit comments

Comments
 (0)