<!-- XE-16986 · [Low] SubmitStateChainBlock returns the gossip-publish error after a successful commit (false API rejection) · testnet -->
*Markdown view of <https://bounty.xe.network/XE-16986>. The page is the record; this is the same page for reading.*

XE-16986 · Bounty

# \[Low\] SubmitStateChainBlock returns the gossip-publish error after a successful commit (false API rejection)

Closed · duplicate
—
[xe#697](https://github.com/xeprotocol/xe/issues/697)
filed 2026-11-17 08:12 UTC
by kecedanzz77-bit

Verdict
:   Duplicate

Tier
:   —

Claimed
:   —

Area
:   Node / API

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-22 23:26 UTC

Told
:   2026-11-22 23:26 UTC

### Patches

None linked.

### History

- [770270](https://bounty.xe.network/log/770270) 2026-11-22 23:26 UTC reply.mirror\_failed
- [770014](https://bounty.xe.network/log/770014) 2026-11-22 23:26 UTC proposal.adopted
- [770013](https://bounty.xe.network/log/770013) 2026-11-22 23:26 UTC reply.sent
- [770012](https://bounty.xe.network/log/770012) 2026-11-22 23:26 UTC ticket.status new → closed
- [769113](https://bounty.xe.network/log/769113) 2026-11-22 23:25 UTC proposal.adopted
- [769112](https://bounty.xe.network/log/769112) 2026-11-22 23:25 UTC ticket.facts area
- [769109](https://bounty.xe.network/log/769109) 2026-11-22 23:25 UTC proposal.adopted
- [769108](https://bounty.xe.network/log/769108) 2026-11-22 23:25 UTC ticket.facts
- [769105](https://bounty.xe.network/log/769105) 2026-11-22 23:25 UTC proposal.adopted
- [769104](https://bounty.xe.network/log/769104) 2026-11-22 23:25 UTC ticket.facts
- [766292](https://bounty.xe.network/log/766292) 2026-11-22 23:17 UTC note.added
- [766286](https://bounty.xe.network/log/766286) 2026-11-22 23:17 UTC proposal.created

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

### Report

## Summary

`SubmitStateChainBlock` returns the gossip-publish error after a successful commit, so the API reports 400 "block rejected" for a block that IS committed locally. Deterministic trigger: a block whose re-marshaled JSON is in (262134, 262144\] passes the MaxBlockSize check but its gossip envelope adds 10 bytes, exceeding the 256 KiB gossip cap. The caller may retry (getting confusing fork/index errors) or conclude the block is invalid.

## Root Cause

`node/node.go:2365-2370`:

```
func (n *Node) SubmitStateChainBlock(b *statechain.Block) error {
	if err := n.StateChain.AddBlock(b); err != nil {
		return err
	}
	return n.StateChainGossip.Publish(n.ctx, b)
}
```

Contrast: `SubmitBlock` (`node/node.go:1323-1332`) and `RegisterAccount` (`:2501-2509`) both swallow publish errors and return nil ("committed locally but gossip publish failed (sync will propagate)"). `SubmitStateChainBlock` is the odd one out. The statechain submit path is used by the oracle flow.

## Verification

Executed PoC (unit-level; a full `SubmitStateChainBlock` call needs a whole Node, so the PoC demonstrates the size window plus the return-path code diff):

```
tuned block JSON size: 262140 (MaxBlockSize=262144)
final block JSON size: 262140 (<= MaxBlockSize 262144: true)
AddBlock: OK; tip index=1 (block IS committed)
gossip envelope (StateChainMsg) size: 262150 (MaxGossipMessageSize=262144, over=true)
```

A block in the (262134, 262144\] window commits locally and then fails publish — and the API reports rejection.

## Note on related reports

Searched "SubmitStateChainBlock publish error rejected" and "SubmitStateChainBlock" — only #58 (timestamps). No hits on the mechanism.

## Suggested fix

Match `SubmitBlock`: log the publish failure and return nil after a successful commit.

### Thread

**Joseph Denne**team2026-11-22 23:26 UTCdesk

Thanks. This is the same finding as an earlier report that is not public, which was filed first; the programme pays the
first verifiable submission, so this one closes as a duplicate. If you believe it is a different
bug, file a new report that links https://bounty.xe.network/XE-16986 and says what differs; it is read like any other.
