8000 refactor!: Rename `skip_sign_extension` to `skip_extension_signing` by mzabaluev · Pull Request #2522 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor!: Rename skip_sign_extension to skip_extension_signing #2522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- `[privval]` DO NOT require extension signature from privval if vote
extensions are disabled. Remote signers can skip signing the extension if
`skip_sign_extension` flag in `SignVoteRequest` is true.
`skip_extension_signing` flag in `SignVoteRequest` is true.
[\#2496](https://github.com/cometbft/cometbft/pull/2496)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[proto]` Add `skip_extension_signing` field to the `SignVoteRequest` message
in privval ([\#2522](https://github.com/cometbft/cometbft/pull/2522))
110 changes: 55 additions & 55 deletions api/cometbft/privval/v1/types.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 privval/signer_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (sc *SignerClient) GetPubKey() (crypto.PubKey, error) {

// SignVote requests a remote signer to sign a vote.
func (sc *SignerClient) SignVote(chainID string, vote *cmtproto.Vote, signExtension bool) error {
response, err := sc.endpoint.SendRequest(mustWrapMsg(&pvproto.SignVoteRequest{Vote: vote, ChainId: chainID, SkipSignExtension: !signExtension}))
response, err := sc.endpoint.SendRequest(mustWrapMsg(&pvproto.SignVoteRequest{Vote: vote, ChainId: chainID, SkipExtensionSigning: !signExtension}))
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion privval/signer_requestHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func DefaultValidationRequestHandler(

vote := r.SignVoteRequest.Vote

err = privVal.SignVote(chainID, vote, !r.SignVoteRequest.SkipSignExtension)
err = privVal.SignVote(chainID, vote, !r.SignVoteRequest.SkipExtensionSigning)
if err != nil {
res = mustWrapMsg(&pvproto.SignedVoteResponse{
Vote: cmtproto.Vote{}, Error: &pvproto.RemoteSignerError{Code: 0, Description: err.Error()},
Expand Down
6 changes: 3 additions & 3 deletions proto/cometbft/privval/v1/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ message PubKeyResponse {

// SignVoteRequest is a request to sign a vote
message SignVoteRequest {
cometbft.types.v1.Vote vote = 1;
string chain_id = 2;
bool skip_sign_extension = 3; // if true, the signer may skip signing the extension bytes.
cometbft.types.v1.Vote vote = 1;
string chain_id = 2;
bool skip_extension_signing = 3; // if true, the signer may skip signing the extension bytes.
}

// SignedVoteResponse is a response containing a signed vote or an error
Expand Down
5 changes: 3 additions & 2 deletions proto/tendermint/privval/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ message PubKeyResponse {

// SignVoteRequest is a request to sign a vote
message SignVoteRequest {
tendermint.types.Vote vote = 1;
string chain_id = 2;
tendermint.types.Vote vote = 1;
string chain_id = 2;
bool skip_extension_signing = 3; // if true, the signer may skip signing the extension bytes.
}

// SignedVoteResponse is a response containing a signed vote or an error
Expand Down
0