-
Notifications
You must be signed in to change notification settings - Fork 18
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
Make threshold configurable for TreeOverlay #426
Make threshold configurable for TreeOverlay #426
Conversation
(Fraction::from(size) * threshold) | ||
.ceil() |
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.
Previously, FlatOverlay was using floor()
, and TreeOverlay was using x * 2/3 + 1
. I thought it's better to have a common function like this and chose to use ceil()
to guarantee that the threshold is never smaller than the super majority.
83554c8
to
60b92b5
Compare
6a3822d
to
f1e3524
Compare
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.
Nice, thanks!
I'm not merging this PR now because CI fails, and I'm not sure if this failure is caused by this PR or not.
This isn't even reproduced in my local. |
I've also found that the same failure sometimes occur in the One interesting thing is that the failure is not reproduced in my local (A Macbook with 10 cores), but it's reproduced in my Ubuntu VM (with 2 cores) in my Macbook, which has the similar resources as Github Actions hosts. |
I'm debugging this at #440. From my understanding so far, this failure is not highly related to this PR. But, I'm not sure yet. |
* Use tree overlay in nomos node * Use tree overlay in tests module * Handle unexpected consensus vote stream end in tally * Spawn the next leader first (#425) * Report unhappy blocks in happy path test (#430) * report unhappy blocks in the happy path test * Make threshold configurable for TreeOverlay (#426) * Modified test, so that all nodes don’t all connect to the first node only (#442) * merge fix --------- Co-authored-by: Youngjoon Lee <[email protected]> Co-authored-by: Al Liu <[email protected]>
Based on PR #425
Like FlatOverlay, we should use 100% leader threshold for TreeOverlay as well (for testing) because we don't have the block catch-up mechanism yet.