Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Issue: Potential Blocking in BroadcastConsensus May Compromise BFT Liveness

Open
#628 12 comments 0 reactions 0 assignees View on GitHub

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

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hyperledger/SmartBFT

All issues in hyperledger/SmartBFT

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.