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

XE-13341 · Bounty

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

Closed · invalid
—
[xe#486](https://github.com/xeprotocol/xe/issues/486)
filed 2026-11-12 03:00 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

- [559455](https://bounty.xe.network/log/559455) 2026-11-20 00:50 UTC reply.mirrored
- [558535](https://bounty.xe.network/log/558535) 2026-11-20 00:49 UTC reply.sent
- [554822](https://bounty.xe.network/log/554822) 2026-11-20 00:37 UTC github.state\_pushed
- [554816](https://bounty.xe.network/log/554816) 2026-11-20 00:37 UTC github.labels
- [553386](https://bounty.xe.network/log/553386) 2026-11-20 00:33 UTC proposal.adopted
- [553229](https://bounty.xe.network/log/553229) 2026-11-20 00:33 UTC proposal.adopted
- [553228](https://bounty.xe.network/log/553228) 2026-11-20 00:33 UTC ticket.status new → closed
- [552931](https://bounty.xe.network/log/552931) 2026-11-20 00:33 UTC proposal.adopted
- [552930](https://bounty.xe.network/log/552930) 2026-11-20 00:33 UTC ticket.facts area
- [552929](https://bounty.xe.network/log/552929) 2026-11-20 00:33 UTC proposal.adopted
- [552928](https://bounty.xe.network/log/552928) 2026-11-20 00:33 UTC ticket.facts
- [550252](https://bounty.xe.network/log/550252) 2026-11-20 00:28 UTC note.added

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

### Report

## Ringkasan

Kalau message tidak valid, broadcast bisa menyebabkan modularity 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

Modularity issues kalau message tidak valid. Bisa menyebabkan code sulit dimodularisasi.

## 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-13341 and says what; it is read like any other.
