-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support vote extensions * Update single signer test * Lint * add additional checks * Fix leader election test * fix e2e * lint * use grpc timeout in nonce overallocation * lint * Bump horcrux-proxy
- Loading branch information
Showing
23 changed files
with
1,141 additions
and
433 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package signer | ||
|
||
import ( | ||
"io" | ||
|
||
"github.com/cometbft/cometbft/libs/protoio" | ||
cometprotoprivval "github.com/cometbft/cometbft/proto/tendermint/privval" | ||
) | ||
|
||
// ReadMsg reads a message from an io.Reader | ||
func ReadMsg(reader io.Reader) (msg cometprotoprivval.Message, err error) { | ||
const maxRemoteSignerMsgSize = 1024 * 10 | ||
protoReader := protoio.NewDelimitedReader(reader, maxRemoteSignerMsgSize) | ||
_, err = protoReader.ReadMsg(&msg) | ||
return msg, err | ||
} | ||
|
||
// WriteMsg writes a message to an io.Writer | ||
func WriteMsg(writer io.Writer, msg cometprotoprivval.Message) (err error) { | ||
protoWriter := protoio.NewDelimitedWriter(writer) | ||
_, err = protoWriter.WriteMsg(&msg) | ||
return err | ||
} |
Oops, something went wrong.