-
Notifications
You must be signed in to change notification settings - Fork 170
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
FIP-0086 Include message-rebroadcast and skipping rounds #998
FIP-0086 Include message-rebroadcast and skipping rounds #998
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation in pseudocode looks uneven due to intermittent use if tab vs. space. A quick find/replace should get those sorted out. I recommend replacing them all with spaces.
I am worried that I might misinterpret the pseudocode because of the indentation. I'd be grateful if you can get the indentation fixed first before I leave too many silly comments 😊
Co-authored-by: Masih H. Derkani <m@derkani.org>
Co-authored-by: Masih H. Derkani <m@derkani.org>
Co-authored-by: Masih H. Derkani <m@derkani.org>
@masih the indenting has been fixed. Note indenting is not perfect (at least in edit mode) because the \bottom special character occupies more than a regular character (not fully monospace). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More substantive technical questions in #809 (comment) and #809 (comment)
FIPS/fip-0086.md
Outdated
|
||
45: reBroadcast <COMMIT, value, instance, round, evidence>; trigger(timeout) | ||
46: collect a clean set M of valid COMMIT messages from this round and instance | ||
OR (NOT mayHaveStrongQuorum(value, round, step, 0) for all value ≠ 丄) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just say has strong quorum of bottom, instead of does not have for any other value? I believe that's a necessary equivalent condition, and this result is relied on at 55. Looping over all values and checking is inelegant if we have this assumption.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks, good catch. Done.
FIPS/fip-0086.md
Outdated
47: if (HasStrongQuorumValue(M) AND StrongQuorumValue(M) ≠ 丄) \* decide | ||
48: evidence ← Aggregate(M) | ||
49: reBroadcast <DECIDE, StrongQuorumValue(M), instance, evidence> \* break loop, wait for other DECIDE messages | ||
50: if (∃ m ∈ M: m.value ≠ 丄 s.t. mayHaveStrongQuorum(m.value, r, COMMIT, 1/3)) \* m.value was possibly decided by others |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I noted while implementing, this is simpler to follow if the branches of this if
are flipped. Test explicitly for strong quorum of bottom. If that is not found, take the non-buttom value that must exist in some message, with the assertion that it might have been decided by another participant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks.
FIPS/fip-0086.md
Outdated
|
||
45: reBroadcast <COMMIT, value, instance, round, evidence>; trigger(timeout) | ||
46: collect a clean set M of valid COMMIT messages from this round and instance | ||
OR (NOT mayHaveStrongQuorum(value, round, step, 0) for all value ≠ 丄) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OR (NOT mayHaveStrongQuorum(value, round, step, 0) for all value ≠ 丄) | |
OR (NOT mayHaveStrongQuorum(value, round, COMMIT, 0) for all value ≠ 丄) |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrote in a commit not to spam with a commit for this. Hence why not committing the suggestion.
FIPS/fip-0086.md
Outdated
OR (step = DECIDE | valid DECIDE evidence | ||
AND (∃ M: Power(M)>⅔ AND evidence=Aggregate(M) | is a strong quorum | ||
AND ∀ m’ ∈ M: m’.step = COMMIT | of COMMIT messages | ||
AND ∀ m’ ∈ M: m’.round = round | from the same round |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DECIDE round is always zero, so this never passes. This instead wants to say the COMMIT messages all have the same round as each other.
(I thought we fixed this once already...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks. And yes, it sounds just like what we discussed at some point, but it is part of the modifications in this PR 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Traced back the reintroduction of this typo to #985 . Went through the changes there and could not find any other typo being reintroduced, other than using Power(M)>2/3
instead of IsStrongQuorum
(and fixed that in this PR too).
Co-authored-by: Alex North <445306+anorth@users.noreply.github.com>
Thanks for the review @anorth , the changes have been added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editorial review. Looks good apart from some formatting issues. Did some checking against the Google doc and they seem consistent -- however, due to some changes in notation and structure, I may have missed something.
FIPS/fip-0086.md
Outdated
|
||
12: while (step != DECIDE) { | ||
13: if (round = 0) | ||
14: BEBroadcast <QUALITY, value, instance>; trigger (timeout) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made my comments on the new v3 version in the Google doc which was published at the same time, for faster/easier initial discussion. |
Went through you comments in the doc and applied most of the changes both here and there. @anorth A couple of standing comments were left in the doc with replies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, the major items I raised in discussion are now addressed. There are parts where this spec is much too concrete and doesn't appear to allow implementers much freedom to do it better. I think these would be better if made more abstract and directly describing the properties required, rather than how to achieve them.
There's lots of inconsistent indentation in the pseudocode. Can we stick to 2 spaces?
@anorth your last batch of comments is hopefully now fixed + I polished the indentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, changes LGTM now
# Conflicts: # FIPS/fip-0086.md
Conflicts resolved. |
Follow design master issue at filecoin-project/go-f3#177