Skip to content

Commit

Permalink
use bls instead of blst to fix opbnb bls cgo issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Welkin committed Jul 3, 2024
1 parent f491ebb commit 98fea05
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ require (
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/herumi/bls-eth-go-binary v0.0.0-20210917013441-d37c07cfda4e // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@ github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0m
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/herumi/bls-eth-go-binary v0.0.0-20210130185500-57372fb27371/go.mod h1:luAnRm3OsMQeokhGzpYmc0ZKwawY7o87PUEP11Z7r7U=
github.com/herumi/bls-eth-go-binary v0.0.0-20210917013441-d37c07cfda4e h1:wCMygKUQhmcQAjlk2Gquzq6dLmyMv2kF+llRspoRgrk=
github.com/herumi/bls-eth-go-binary v0.0.0-20210917013441-d37c07cfda4e/go.mod h1:luAnRm3OsMQeokhGzpYmc0ZKwawY7o87PUEP11Z7r7U=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
Expand Down
6 changes: 3 additions & 3 deletions votepool/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package votepool
import (
"errors"

"github.com/prysmaticlabs/prysm/crypto/bls/blst"
"github.com/prysmaticlabs/prysm/crypto/bls"

"github.com/cometbft/cometbft/libs/sync"
"github.com/cometbft/cometbft/types"
Expand Down Expand Up @@ -86,11 +86,11 @@ func (b *BlsSignatureVerifier) Validate(vote *Vote) error {
}

func verifySignature(msg []byte, pubKey, sig []byte) bool {
blsPubKey, err := blst.PublicKeyFromBytes(pubKey)
blsPubKey, err := bls.PublicKeyFromBytes(pubKey)
if err != nil {
return false
}
signature, err := blst.SignatureFromBytes(sig)
signature, err := bls.SignatureFromBytes(sig)
if err != nil {
return false
}
Expand Down

0 comments on commit 98fea05

Please sign in to comment.