-
Notifications
You must be signed in to change notification settings - Fork 15
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
spec: Render clear the distinction of a Proposal
for v
and the full value v
#365
Comments
Proposal
for v
and the actual (full) value v
Proposal
for v
and the full value v
Are you proposing an optimization to the following scenario?
I guess it makes sense to address this scenario, as it will reduce the traffic in rounds greater than 0. I wonder whether we need to change the consensus algorithm for that. Did you think about the following option:
The idea would be that in round 1, we use a fresh small message from the proposer of round 1, and we re-use the block parts of round 0. If the received Data-flow-wise, the idea would be that if I receive the small message, I ask the block propagation module whether it has a complete block that matches the |
Yes, I agree with your proposal for lines 22 and 28. For 36 and 49 we do not need the "small" |
If I understand correctly, in the algorithm we only need I am asking because in the code, we compute So if only If so, then we could potentially remove the |
That is my original proposal, essentially. Also, |
We have to be a bit careful here. Because validity is checked outside the consensus statemachine. Consider the case in Line 28, when I don't have the full value, then this shouldn't mean that We should do |
This is true. We would need to somehow adapt the block from lines 22 and 28 to account for that. |
So, in general we can have either:
that must be distinguished. @josef-widder is probably convincing me that his approach is better or maybe we can find a compromise. |
Reporting here what @matan-starkware has written to me:
The broader context was the discussion regarding the implementation of the |
Proposal
for v
and the full value v
Proposal
for v
and the full value v
The arXiv paper considers that values are included in
Proposal
messages, which have the format⟨PROPOSAL, hp, r, v, vr⟩
, while vote messages (PREVOTE
andPRECOMMIT
) carry onlyid(v)
, which is the ID or short representation ofv
.In practical implementations, like in CometBFT, a
Proposal
message carriesid(v)
while the full valuev
is transmitted in a different way (e.g., split into multiple block parts). SoProposal
messages are fixed-size, as vote messages.Also in the arXiv paper, we require in lines 26 (prevote to precommit step transition) and 49 (precommit step to decision), the reception of
⟨PROPOSAL, hp, r, v, ∗⟩ from proposer(hp, r)
. For all effects, however, we only need to knownv
, which is the full value referenced by the2f + 1
votes forid(v)
. We don't need to check ifv
was proposed byproposer(hp, r)
because this check is part of the propose to prevote step transition. We cannot prevote a valuev
if we don't receive⟨PROPOSAL, hp, r, v, ∗⟩ from proposer(hp, r)
, but we can issue a precommit for and decidev
without checking this assertion.Moreover, notice that in the Quint model for consensus there is no distinction between
v
andid(v)
.An elegant way to address this confusion between
v
andid(v)
is to assume, as we do in the Quint model, that they are the same, i.e.,id(v) == v
. This means that consensus actual orders and decides on value IDs.But in this case, how we check that base on the value ID received in consensus we have the full associated value? We can, using the nomenclature of the paper, use the
valid(v)
function to perform this check. Notice thatvalid(v)
is a requirement for all state machine transitions that lead to progress, lines 22, 28, 36, and 49.The
valid(v)
primitive should therefore verify whether we know the full value proposed by theProposal
message, and whether once receiving a2f + 1
quorum of prevotes or precommits forid(v) == v
we can precommit or decidev
.Proposal
⟨PROPOSAL, hp, r, v, ∗⟩ from proposer(hp, r)
requirement for actions in lines 36 and 49 of the algorithm.valid(v)
implementation checks for the full value referenced in the paper asv
orid(v)
The text was updated successfully, but these errors were encountered: