-
Notifications
You must be signed in to change notification settings - Fork 743
feat: extend privval to support signing raw bytes
#5138
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
base: v0.38.x
Are you sure you want to change the base?
Conversation
Ironbird - launch a networkTo use Ironbird, you can use the following commands:
Custom Load Test ConfigurationYou can provide a custom load test configuration using the `--load-test-config=` flag:Use |
|
This is added in v1.x. We are not planning on backporting this behavior to 0.38 |
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: Tony Arcieri (iqlusion) <tony@iqlusion.io>
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
melekes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds support for signing arbitrary raw byte messages in the PrivValidator API, including new request/response types, client/server handling, implementations, and tests.
- Extend
PrivValidatorwithSignRawBytesand implement canonical signing bytes (RawBytesMessageSignBytes) - Define new protobuf messages (
SignRawBytesRequest,SignedRawBytesResponse) and wire them through client/server/retry logic - Provide
FilePV,MockPV, and end-to-end tests for raw-bytes signing
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| types/priv_validator.go | Added SignRawBytes method and RawBytesMessageSignBytes |
| types/priv_validator_test.go | Tests for raw-bytes signing helper |
| proto/tendermint/privval/types.proto | Added SignRawBytesRequest/SignedRawBytesResponse |
| privval/signer_requestHandler.go | Handle SignRawBytesRequest in request handler |
| privval/signer_client.go | Implement SignerClient.SignRawBytes |
| privval/retry_signer_client.go | Retry logic for SignRawBytes |
| privval/msgs.go | Wrap raw-bytes messages in mustWrapMsg |
| privval/file.go | FilePV.SignRawBytes implementation |
| privval/signer_client_test.go | Added TestSignerRawBytes |
Comments suppressed due to low confidence (2)
privval/retry_signer_client.go:98
- There are no tests covering
RetrySignerClient.SignRawBytes; consider adding unit tests to validate retry and error paths.
func (sc *RetrySignerClient) SignRawBytes(chainID, uniqueID string, rawBytes []byte) ([]byte, error) {
types/priv_validator.go:21
- [nitpick] Add a doc comment for the new
SignRawBytesinterface method to explain its purpose, parameters, and return values.
SignRawBytes(chainID, uniqueID string, rawBytes []byte) ([]byte, error)
|
@zrbecker any update on when this can be merged? it's currently blocking our throughput increase work. Thanks 🙏 |
|
@rach-id looks like we have some CI failures |
|
@aljo242 Thanks. I updated the lines that are related to this PR. However, the rest seem to be from the rest of the repo and should be handled in a separate PR better. I can open that PR if you prefer. For the test, it's a flake that also used to happen in celestia-core and had to fix. So it's not related to the changes. It just needs to be restarted a couple times. |
|
@aljo242 any update on this? We would really like to know the status of this PR, if there are any concerns that we can discuss, any improvements we should add to speed up shipping it. Thanks. |
Re-enables support for signing raw bytes using a consensus key, originally added in #969. That PR originally sourced its protos via git from: https://github.com/rach-id/tendermint-rs/commits/rachid/generate-latest-v38-protos To avoid the git dependency, this vendors the relevant protos, until such a time that they can be merged into CometBFT properly, i.e.: cometbft/cometbft#5138
Re-enables support for signing raw bytes using a consensus key, originally added in #969. That PR originally sourced its protos via git from: https://github.com/rach-id/tendermint-rs/commits/rachid/generate-latest-v38-protos To avoid the git dependency, this vendors the relevant protos, until such a time that they can be merged into CometBFT properly, i.e.: cometbft/cometbft#5138
Re-enables support for signing raw bytes using a consensus key, originally added in #969. That PR originally sourced its protos via git from: https://github.com/rach-id/tendermint-rs/commits/rachid/generate-latest-v38-protos To avoid the git dependency, this vendors the relevant protos, until such a time that they can be merged into CometBFT properly, i.e.: cometbft/cometbft#5138
Added a new method to the PrivValidator interface that enables validators to securely sign arbitrary raw bytes.
Implements #5126 in v0.38.x
I will open a PR for main after this one gets merged or when it's reviewed and the changes are agreed upon.
PR checklist
.changelog(we use unclog to manage our changelog)docs/orspec/) and code comments