Skip to content

if some process locks a block in round 0, then 0 is valid proposal.PO…#2704

Merged
ebuchman merged 2 commits intodevelopfrom
2702-proposal-pol-round-validation
Nov 6, 2018
Merged

if some process locks a block in round 0, then 0 is valid proposal.PO…#2704
ebuchman merged 2 commits intodevelopfrom
2702-proposal-pol-round-validation

Conversation

@melekes
Copy link
Contributor

@melekes melekes commented Oct 25, 2018

…LRound in rounds > 0

This condition is really hard to get. Initially, lockedRound and
validRound are set to -1 as we start with round 0.

Refs #2702

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

…LRound in rounds > 0

This condition is really hard to get. Initially, lockedRound and
validRound are set to -1 as we start with round 0.

Refs #2702
@melekes melekes requested review from ebuchman and xla as code owners October 25, 2018 14:45
@codecov-io
Copy link

codecov-io commented Oct 25, 2018

Codecov Report

Merging #2704 into develop will increase coverage by 0.02%.
The diff coverage is 50%.

@@             Coverage Diff             @@
##           develop    #2704      +/-   ##
===========================================
+ Coverage    62.21%   62.23%   +0.02%     
===========================================
  Files          212      212              
  Lines        17136    17143       +7     
===========================================
+ Hits         10661    10669       +8     
  Misses        5577     5577              
+ Partials       898      897       -1
Impacted Files Coverage Δ
consensus/state.go 79.78% <50%> (ø) ⬆️
libs/events/events.go 93.2% <0%> (-4.86%) ⬇️
libs/db/remotedb/remotedb.go 36.84% <0%> (-4.69%) ⬇️
libs/db/mem_db.go 82.9% <0%> (-2.39%) ⬇️
consensus/reactor.go 66.31% <0%> (-1.05%) ⬇️
p2p/pex/pex_reactor.go 73.05% <0%> (-0.33%) ⬇️
blockchain/pool.go 66.43% <0%> (+0.69%) ⬆️
privval/ipc_server.go 69.81% <0%> (+5.66%) ⬆️

@ebuchman
Copy link
Contributor

Closing for #2735

@milosevic please confirm

@ebuchman ebuchman closed this Oct 31, 2018
@melekes
Copy link
Contributor Author

melekes commented Oct 31, 2018

I think changes here make the code better&more readable (NOTE they do not fix/change anything)

@ebuchman
Copy link
Contributor

Ah right, happy to bring that in, but it looks like it changes the logic to allow POLRound to equal the current round which I don't think we want.

@melekes
Copy link
Contributor Author

melekes commented Oct 31, 2018

No, it will return err if proposal.POLRound >= proposal.Round

@ebuchman ebuchman reopened this Nov 5, 2018
@ebuchman ebuchman merged commit 071ebdd into develop Nov 6, 2018
@ebuchman ebuchman deleted the 2702-proposal-pol-round-validation branch November 6, 2018 06:32
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.

3 participants