Skip to content
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

Simplify proposal msg #2735

Merged
merged 3 commits into from Oct 31, 2018
Merged

Simplify proposal msg #2735

merged 3 commits into from Oct 31, 2018

Conversation

milosevic
Copy link
Contributor

@milosevic milosevic commented Oct 31, 2018

Fix #2646.

Note that we could easily add nice Proposal related tests after #2652 is merged.

  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGELOG_PENDING.md

@milosevic milosevic changed the base branch from master to develop October 31, 2018 10:22
@codecov-io
Copy link

codecov-io commented Oct 31, 2018

Codecov Report

Merging #2735 into develop will decrease coverage by 0.02%.
The diff coverage is 83.33%.

@@             Coverage Diff             @@
##           develop    #2735      +/-   ##
===========================================
- Coverage    62.32%   62.29%   -0.03%     
===========================================
  Files          211      211              
  Lines        17053    17029      -24     
===========================================
- Hits         10628    10608      -20     
+ Misses        5555     5552       -3     
+ Partials       870      869       -1
Impacted Files Coverage Δ
consensus/replay.go 56.33% <0%> (ø) ⬆️
consensus/state.go 79.78% <100%> (ø) ⬆️
consensus/reactor.go 70.8% <100%> (ø) ⬆️
rpc/client/httpclient.go 68.78% <0%> (-0.98%) ⬇️
evidence/store.go 89.83% <0%> (-0.54%) ⬇️
blockchain/pool.go 66.43% <0%> (+0.69%) ⬆️
privval/tcp_server.go 81.42% <0%> (+2.85%) ⬆️

@milosevic milosevic force-pushed the zarko/2646-simplify-proposal-msg branch from a989354 to fe04e5b Compare October 31, 2018 10:39
@milosevic milosevic changed the title [WIP] simplify proposal msg Simplify proposal msg Oct 31, 2018
@milosevic milosevic changed the title Simplify proposal msg [WIP] Simplify proposal msg Oct 31, 2018
@milosevic milosevic force-pushed the zarko/2646-simplify-proposal-msg branch from fe04e5b to 3ff909b Compare October 31, 2018 10:47
Height int64 `binary:"fixed64"`
Round int64 `binary:"fixed64"`
BlockID CanonicalBlockID
POLRound int64 `binary:"fixed64"`
Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I understand, the BlockID is not of fixed size (?). For HSMs to be able to parse the proposals, it is important that we keep the fixed sized fields in front (Type, Height, Round, POLRound, and then, BlockID, Timestamp, ChainID).

@milosevic milosevic changed the title [WIP] Simplify proposal msg Simplify proposal msg Oct 31, 2018
@milosevic milosevic force-pushed the zarko/2646-simplify-proposal-msg branch from 3ff909b to e72d9e5 Compare October 31, 2018 10:56
Height int64 `json:"height"`
Round int `json:"round"`
BlockID BlockID `json:"block_id"`
POLRound int `json:"pol_round"` // -1 if null.
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's keep the order here aligned with the Canonical order, so POLRound should come before BlockID

@ebuchman
Copy link
Contributor

ebuchman commented Oct 31, 2018

@ebuchman ebuchman merged commit c590590 into develop Oct 31, 2018
@ebuchman ebuchman deleted the zarko/2646-simplify-proposal-msg branch October 31, 2018 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants