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

Align proposer logic with spec #2529

Closed
milosevic opened this issue Oct 1, 2018 · 3 comments
Closed

Align proposer logic with spec #2529

milosevic opened this issue Oct 1, 2018 · 3 comments
Assignees
Labels
C:consensus Component: Consensus T:bug Type Bug (Confirmed)
Projects
Milestone

Comments

@milosevic
Copy link
Contributor

milosevic commented Oct 1, 2018

if proposer(h_p , round_p ) = p then
if validValue_p != nil then
proposal ← validValue_p
else
proposal ← getValue()
broadcast ⟨PROPOSAL, h_p , round_p , proposal, validRound_p⟩.

More details can be found in https://github.com/tendermint/spec.

@milosevic milosevic added C:consensus Component: Consensus T:enhancement Type: Enhancement labels Oct 1, 2018
@milosevic milosevic added this to the launch milestone Oct 1, 2018
@xla xla added this to Queued in Launch Oct 3, 2018
@ebuchman ebuchman added T:bug Type Bug (Confirmed) and removed T:enhancement Type: Enhancement labels Oct 4, 2018
@milosevic milosevic self-assigned this Oct 9, 2018
@milosevic milosevic moved this from Queued to Ongoing in Launch Oct 9, 2018
@ebuchman
Copy link
Contributor

@milosevic can you clarify how our current implementation differs right now?

@milosevic
Copy link
Contributor Author

In defaultDecideProposal, we first check if we have locked block, and this is what we propose; if locked block is not set we propose validBlock (if set). See

if cs.LockedBlock != nil {
// If we're locked onto a block, just choose that.
block, blockParts = cs.LockedBlock, cs.LockedBlockParts
} else if cs.ValidBlock != nil {
// If there is valid block, choose that.
block, blockParts = cs.ValidBlock, cs.ValidBlockParts
} else {
// Create a new proposal block from state/txs from the mempool.
block, blockParts = cs.createProposalBlock()
if block == nil { // on error
return
}
}
. This is wrong as proposal should only be based on validBlock ( see spec).

@ebuchman
Copy link
Contributor

Fixed in #2642. Thanks!

Launch automation moved this from Ongoing to Done Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:consensus Component: Consensus T:bug Type Bug (Confirmed)
Projects
No open projects
Launch
  
Done
Development

No branches or pull requests

2 participants