Issue: Potential Blocking in BroadcastConsensus May Compromise BFT Liveness
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go, grpc
- Domain
- blockchain, distributed-systems
Research direction
Start at Controller.BroadcastConsensus and trace the synchronous Comm.SendConsensus call, including gRPC connection handling when no transport is available. Check the consensus and communication tests for broadcast behavior; done means an unavailable connection cannot delay dissemination to other nodes while consensus liveness remains intact.
Written by the indexing model from the issue text.
Description
The current implementation of BroadcastConsensus in the Controller may block when sending messages to other nodes, potentially compromising the BFT protocol's liveness. This occurs because:
c.Comm.SendConsensus(node, m) can block when gRPC's getTransport function has no available connections
The synchronous nature of the broadcast means a single blocked send can delay all subsequent messages
This blocking behavior could prevent timely dissemination of consensus messages, violating the protocol's liveness guarantees
func (c *Controller) BroadcastConsensus(m *protos.Message) {
for _, node := range c.NodesList {
if c.ID == node {
continue
}
c.Comm.SendConsensus(node, m) // Synchronous call that may block
}
if m.GetPrePrepare() != nil || m.GetPrepare() != nil || m.GetCommit() != nil {
if leader, _ := c.iAmTheLeader(); leader {
c.LeaderMonitor.HeartbeatWasSent()
}
}
}
the proposed solution is as follows:
func (c *Controller) BroadcastConsensus(m *protos.Message) {
for _, node := range c.NodesList {
if c.ID == node {
continue
}
go c.Comm.SendConsensus(node, m) // Asynchronous non-blocking call
}
if m.GetPrePrepare() != nil || m.GetPrepare() != nil || m.GetCommit() != nil {
if leader, _ := c.iAmTheLeader(); leader {
c.LeaderMonitor.HeartbeatWasSent()
}
}
}
- Dominant language
- Go
- Stars
- 110
- Forks
- 40
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 14
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hyperledger/SmartBFT
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
hyperledger/SmartBFT#714 ·
Maintainers usually reply within 1 day
-
Set up a pr projectOpen
Difficulty 4/5 3-5 days Newbie friendliness 25/100
hyperledger/SmartBFT#666 · 4 comments ·
Maintainers usually reply within 1 day
-
Recording library runtime for bug analysis by developersMay be free again @HagarMeir claimed this 1733 days ago, and no pull request is open. Open
hyperledger/SmartBFT#487 · 1 assignee ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 15/100
hyperledger/SmartBFT#439 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
hyperledger/SmartBFT#420 ·
Maintainers usually reply within 1 day
All issues in hyperledger/SmartBFT
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/rocketmq-dashboard#7243 ·
Maintainers usually reply within 3 days
-
Missing example coverage: getClockPossibly taken @camunda-sdk-automation claimed this today. Opennew-operations
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
camunda/orchestration-cluster-api-go#75 · 2 comments ·
Maintainers usually reply within 1 day
-
[schema-coverage] elasticstack_kibana_security_entity_store_statusPossibly taken @github-actions claimed this today. Openacceptance-tests phase-coding schema-coverage testing triaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
elastic/terraform-provider-elasticstack#5396 ·
Maintainers usually reply within 1 day
-
Go device SDK: Whisper transcriber keeps buffering and transcribing audio appended after Stop()Possibly taken @apoorvdarshan claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#22770 ·
Maintainers usually reply within 1 day
-
Bug v3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day