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

[consensus] rename some network methods and failpoints to make them more consistent #2130

Merged
merged 2 commits into from
Jul 21, 2022

Conversation

bchocho
Copy link
Contributor

@bchocho bchocho commented Jul 21, 2022

This change is Reviewable

@bchocho bchocho requested review from ikabiljo and zekun000 July 21, 2022 18:49
let msg = ConsensusMsg::SyncInfo(Box::new(sync_info_msg));
self.broadcast(msg).await
}

pub async fn broadcast_timeout_vote(&mut self, timeout_vote_msg: VoteMsg) {
fail_point!("consensus::send_vote", |_| ());
fail_point!("consensus::broadcast_timeout_vote", |_| ());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything else is just aesthetics. This is the only significant change (it conflicts with L210)

@ikabiljo
Copy link
Contributor

@bchocho - I do feel like we should have a same prefix for all process failpoints, and then the same prefix for all sending messages failpoints.

I am also adding one joint failpoint for those two types here - 3507996 (that's a draft for consensus testing I am doing)

how about having these prefixes:
"consensus::send::"
"consensus::process::"

so my new fail_points become:
"consensus::send::any"
"consensus::process::any"

"consensus::broadcast_timeout_vote" becomes "consensus::send::broadcast_timeout_vote"
"consensus::send_vote" becomes "consensus::send::vote"
"consensus::request_block" becomes "consensus::send::request_block" or "consensus::send::block_retrieval" (I actually prefer the second as we are sending BlockRetrievalRequest, even though function is called request_block)

what do you think?

@bchocho bchocho enabled auto-merge (squash) July 21, 2022 21:09
@github-actions
Copy link
Contributor

✅ Forge test success

Forge is land-blocking

all up : 5788 TPS, 2940 ms latency, 5350 ms p99 latency,no expired txns

@bchocho bchocho merged commit eb22678 into main Jul 21, 2022
@bchocho bchocho deleted the brian/cleanup-network branch July 21, 2022 21:38
@@ -188,7 +188,7 @@ impl BlockStore {
if highest_commit_cert.ledger_info().ledger_info().ends_epoch() {
retriever
.network
.notify_epoch_change(EpochChangeProof::new(
.send_epoch_change(EpochChangeProof::new(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to differentiate it from send but maybe did a bad job. notify == notify self so this doesn't go through network

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants