<!-- XE-13331 · [net/gossip.go] M5: broadcast() tidak handle message yang tidak valid — scalability · testnet -->
*Markdown view of <https://bounty.xe.network/XE-13331>. The page is the record; this is the same page for reading.*

XE-13331 · Bounty

# \[net/gossip.go\] M5: broadcast() tidak handle message yang tidak valid — scalability

Closed · invalid
—
[xe#476](https://github.com/xeprotocol/xe/issues/476)
filed 2026-11-12 02:58 UTC
by wahyu20260100233-ops

Verdict
:   Invalid

Tier
:   —

Claimed
:   —

Area
:   P2P / sync

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 00:51 UTC

Told
:   2026-11-20 00:50 UTC

### Patches

None linked.

### History

- [559467](https://bounty.xe.network/log/559467) 2026-11-20 00:50 UTC reply.mirrored
- [558558](https://bounty.xe.network/log/558558) 2026-11-20 00:49 UTC reply.sent
- [554035](https://bounty.xe.network/log/554035) 2026-11-20 00:35 UTC github.state\_pushed
- [554034](https://bounty.xe.network/log/554034) 2026-11-20 00:35 UTC github.labels
- [553400](https://bounty.xe.network/log/553400) 2026-11-20 00:33 UTC proposal.adopted
- [553251](https://bounty.xe.network/log/553251) 2026-11-20 00:33 UTC proposal.adopted
- [553250](https://bounty.xe.network/log/553250) 2026-11-20 00:33 UTC ticket.status new → closed
- [552972](https://bounty.xe.network/log/552972) 2026-11-20 00:33 UTC proposal.adopted
- [552971](https://bounty.xe.network/log/552971) 2026-11-20 00:33 UTC ticket.facts area
- [552970](https://bounty.xe.network/log/552970) 2026-11-20 00:33 UTC proposal.adopted
- [552969](https://bounty.xe.network/log/552969) 2026-11-20 00:33 UTC ticket.facts
- [550089](https://bounty.xe.network/log/550089) 2026-11-20 00:27 UTC note.added

[Full history](https://bounty.xe.network/log?ref=XE-13331) · [JSON](https://bounty.xe.network/v1/tickets/XE-13331) · [markdown](https://bounty.xe.network/XE-13331.md)

### Report

## Ringkasan

Kalau message tidak valid, broadcast bisa menyebabkan scalability issues.

## Lokasi

- File: `net/gossip.go`
- Lines: 171-187

## Kode

```
func (g *Gossip) broadcast(key string, msg []byte, mode GossipMode) {
    ...
    for _, pid := range peers {
        go g.sendToPeer(pid, key, msg)
    }
}
```

## Impact

Scalability issues kalau message tidak valid. Bisa menyebabkan network tidak bisa scale.

## Suggested Fix

```
func (g *Gossip) broadcast(key string, msg []byte, mode GossipMode) {
    ...
    // validasi message sebelum broadcast
    if !g.isValidMessage(msg) {
        logging.Warnf("gossip: invalid message, not broadcasting")
        return
    }

    for _, pid := range peers {
        go g.sendToPeer(pid, key, msg)
    }
}

func (g *Gossip) isValidMessage(msg []byte) bool {
    // validasi message
    if len(msg) == 0 {
        return false
    }
    // dll
    return true
}
```

### Thread

**XE desk**team2026-11-20 00:50 UTCgithub

Thanks for the report. We read it against the code and could not confirm a bug in what it describes.

This report is closed as invalid. If we have missed something, file a new report that links
https://bounty.xe.network/XE-13331 and says what; it is read like any other.
