Skip to content

Commit

Permalink
Prefix PoP methods and message with Sign
Browse files Browse the repository at this point in the history
  • Loading branch information
richardpringle committed Feb 6, 2025
1 parent 3990460 commit 1ccd0ce
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 32 deletions.
29 changes: 15 additions & 14 deletions proto/pb/signer/signer.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions proto/pb/signer/signer_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion proto/signer/signer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ option go_package = "github.com/ava-labs/avalanchego/proto/pb/signer";
service Signer {
rpc PublicKey(PublicKeyRequest) returns (PublicKeyResponse) {}
rpc Sign(SignatureRequest) returns (SignatureResponse) {}
rpc ProofOfPossession(ProofOfPossessionSignatureRequest) returns (ProofOfPossessionSignatureResponse) {}
rpc SignProofOfPossession(ProofOfPossessionSignatureRequest) returns (ProofOfPossessionSignatureResponse) {}
}

message PublicKeyRequest {}
Expand Down
2 changes: 1 addition & 1 deletion utils/crypto/bls/signer/rpcsigner/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (c *Client) Sign(message []byte) (*bls.Signature, error) {
}

func (c *Client) SignProofOfPossession(message []byte) (*bls.Signature, error) {
resp, err := c.client.ProofOfPossession(context.Background(), &pb.ProofOfPossessionSignatureRequest{Message: message})
resp, err := c.client.SignProofOfPossession(context.Background(), &pb.ProofOfPossessionSignatureRequest{Message: message})
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion utils/crypto/bls/signer/rpcsigner/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (s *server) Sign(_ context.Context, in *signer.SignatureRequest) (*signer.S
}, nil
}

func (s *server) ProofOfPossession(_ context.Context, in *signer.ProofOfPossessionSignatureRequest) (*signer.ProofOfPossessionSignatureResponse, error) {
func (s *server) SignProofOfPossession(_ context.Context, in *signer.ProofOfPossessionSignatureRequest) (*signer.ProofOfPossessionSignatureResponse, error) {
signature, err := s.localSigner.SignProofOfPossession(in.Message)
if err != nil {
return nil, err
Expand Down

0 comments on commit 1ccd0ce

Please sign in to comment.