Skip to content

privval: migrate to protobuf #4985

Merged
tac0turtle merged 15 commits intomasterfrom
proto_privval
Jun 11, 2020
Merged

privval: migrate to protobuf #4985
tac0turtle merged 15 commits intomasterfrom
proto_privval

Conversation

@tac0turtle
Copy link
Contributor

@tac0turtle tac0turtle commented Jun 8, 2020

Description

migration of the privval reactor to protobuf

this PR will be superseded by the gRPC PR for all client and server implementations

Closes: #2830

@auto-comment
Copy link

auto-comment bot commented Jun 8, 2020

👋 Thanks for creating a PR!

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Wrote tests
  • Updated CHANGELOG_PENDING.md
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments
  • Re-reviewed Files changed in the Github PR explorer
  • Applied Appropriate Labels

Thank you for your contribution to Tendermint! 🚀

@codecov
Copy link

codecov bot commented Jun 8, 2020

Codecov Report

Merging #4985 into master will decrease coverage by 0.04%.
The diff coverage is 82.35%.

@@            Coverage Diff             @@
##           master    #4985      +/-   ##
==========================================
- Coverage   63.74%   63.70%   -0.05%     
==========================================
  Files         181      181              
  Lines       19473    19483      +10     
==========================================
- Hits        12414    12412       -2     
- Misses       6000     6010      +10     
- Partials     1059     1061       +2     
Impacted Files Coverage Δ
crypto/ed25519/ed25519.go 42.59% <ø> (ø)
tools/tm-signer-harness/internal/test_harness.go 62.06% <75.00%> (+0.66%) ⬆️
consensus/state.go 70.57% <88.88%> (-0.58%) ⬇️
libs/clist/clist.go 66.66% <0.00%> (-1.52%) ⬇️
blockchain/v2/reactor.go 35.92% <0.00%> (-1.49%) ⬇️
consensus/reactor.go 71.62% <0.00%> (-1.28%) ⬇️
blockchain/v0/pool.go 78.66% <0.00%> (+0.63%) ⬆️
p2p/pex/addrbook.go 72.76% <0.00%> (+0.87%) ⬆️
p2p/pex/pex_reactor.go 82.53% <0.00%> (+2.11%) ⬆️

@tac0turtle tac0turtle self-assigned this Jun 8, 2020
@tac0turtle tac0turtle added R:major PR contains breaking changes that have to wait till a major release is made to be merged T:breaking Type: Breaking Change T:encoding Type: Amino, ProtoBuf T:validator Type: Validator related labels Jun 8, 2020
@tac0turtle tac0turtle marked this pull request as ready for review June 9, 2020 10:15
@tac0turtle tac0turtle requested review from melekes and tessr as code owners June 9, 2020 10:15
@tac0turtle tac0turtle merged commit f6243d8 into master Jun 11, 2020
@tac0turtle tac0turtle deleted the proto_privval branch June 11, 2020 09:54
@@ -47,9 +48,11 @@ func exampleVote(t byte) *Vote {

func TestVoteSignable(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah nice, the test-vectors are still here 👍
IMO anything consensus critical should have test-vectors and these test-vectors should live in the spec (or at least should be referenced in the spec).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add specific ones for canonical. I can also add them for msgs in most reactors. Best to be safe

signBytes := VoteSignBytes("test_chain_id", v)
pb := CanonicalizeVote("test_chain_id", v)

expected, err := cdc.MarshalBinaryLengthPrefixed(CanonicalizeVote("test_chain_id", vote))
Copy link
Contributor

@liamsi liamsi Jun 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also relevant to the ledger lib that @jleni wrote as it will expect this length prefix 😬
I'm actually not sure if someone uses the ledger to sign votes etc but I guess as it is possible, this should come with a prominent note in the changelog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

R:major PR contains breaking changes that have to wait till a major release is made to be merged T:breaking Type: Breaking Change T:encoding Type: Amino, ProtoBuf T:validator Type: Validator related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove amino overhead from KMS related communication

4 participants