-
Notifications
You must be signed in to change notification settings - Fork 12
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
test: Spawn the next leader first #425
test: Spawn the next leader first #425
Conversation
// all nodes that will be subsequently spawned. | ||
// If not, the leader will miss votes from nodes spawned before itself. | ||
// This issue will be resolved by devising the block catch-up mechanism in the future | ||
let mut nodes = vec![Self::spawn(configs.swap_remove(next_leader_idx)).await]; | ||
let listening_addr = nodes[0].get_listening_address().await; |
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.
Shouldn't this be nodes[next_leader_idx].get_listening_address()
if we want next leader to be available to other nodes before spawning (as initial_peer)?
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.
Since the nodes
vector has only one element at line 211~212, we should use nodes[0]
(which is the next leader spawned at line 211). But yeah, it's little not intuitive. Let me refactor this now.
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.
Okay, now I see, we append to the nodes array.
// all nodes that will be subsequently spawned. | ||
// If not, the leader will miss votes from nodes spawned before itself. | ||
// This issue will be resolved by devising the block catch-up mechanism in the future | ||
let mut nodes = vec![Self::spawn(configs.swap_remove(next_leader_idx)).await]; | ||
let listening_addr = nodes[0].get_listening_address().await; |
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.
Okay, now I see, we append to the nodes array.
* 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 <taxihighway@gmail.com> Co-authored-by: Al Liu <scygliu1@gmail.com>
* Use tree overlay in nomos node * Use tree overlay in tests module * Handle unexpected consensus vote stream end in tally * Add defaults for retry and delay in mixnet client * Add missing entries in config.yaml * Spawn the next leader first (#425) --------- Co-authored-by: Youngjoon Lee <taxihighway@gmail.com> Co-authored-by: Al Liu <scygliu1@gmail.com>
Solves the second bullet of #415 (comment).
Still the
ten_nodes_happy
won't pass, like below. To resolve this, I'm going to open another PR.