<!-- XE-7917 · statechain: delete-op Value is not committed by the block hash - two blocks differing only in a delete value share one hash and signature set · testnet -->
*Markdown view of <https://bounty.xe.network/XE-7917>. The page is the record; this is the same page for reading.*

XE-7917 · Bounty

# statechain: delete-op Value is not committed by the block hash \- two blocks differing only in a delete value share one hash and signature set

Closed · duplicate
—claimed Minor
web
filed 2026-11-11 19:20 UTC
by xe:6de8078e

Verdict
:   Duplicate

Tier
:   —

Claimed
:   Minor

Area
:   DAO harness

Duplicate of
:   —

Tracked
:   internally

Updated
:   2026-11-17 09:38 UTC

Told
:   2026-11-17 09:38 UTC

### Patches

None linked.

### History

- [414841](https://bounty.xe.network/log/414841) 2026-11-17 09:38 UTC proposal.adopted
- [414840](https://bounty.xe.network/log/414840) 2026-11-17 09:38 UTC reply.sent
- [414839](https://bounty.xe.network/log/414839) 2026-11-17 09:38 UTC ticket.status new → closed
- [411995](https://bounty.xe.network/log/411995) 2026-11-17 09:37 UTC proposal.adopted
- [411994](https://bounty.xe.network/log/411994) 2026-11-17 09:37 UTC ticket.facts area
- [411993](https://bounty.xe.network/log/411993) 2026-11-17 09:37 UTC proposal.adopted
- [411992](https://bounty.xe.network/log/411992) 2026-11-17 09:37 UTC ticket.facts
- [411991](https://bounty.xe.network/log/411991) 2026-11-17 09:37 UTC proposal.adopted
- [411990](https://bounty.xe.network/log/411990) 2026-11-17 09:37 UTC ticket.facts
- [411989](https://bounty.xe.network/log/411989) 2026-11-17 09:37 UTC proposal.adopted
- [411988](https://bounty.xe.network/log/411988) 2026-11-17 09:37 UTC ticket.facts
- [386412](https://bounty.xe.network/log/386412) 2026-11-17 05:06 UTC note.added

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

### Report

## Summary

`MarshalCanonical` hashes a `set` op's value but writes four zero bytes for a `delete` op, ignoring `op.Value` entirely. Two statechain blocks differing only in a delete op's value therefore have the identical hash and verify under the same DAO/oracle signature set, so the hash is not a commitment to the full block content. In-node impact is bounded because no code path reads a delete op's value (`ApplyOps`, `validateEpochValue`, and `validateTransition` all ignore it), so this is a hash-identity and auditability break plus an uncommitted-data carrier under signed blocks, not a state forgery.

## Impact

- Two different blocks share one hash and one signature set. Any tooling, audit, or external verifier that identifies a block by its hash cannot distinguish them.
- A delete op's value becomes uncommitted data carried under a signed block hash: a signer can sign one delete value while a different value is presented alongside the same hash.
- Practical severity is low: since no in-node code path reads a delete op's value, the differing value cannot change node state today. The risk is to hash identity, auditability, and any future consumer that starts reading delete values.

## Reproduction (unit test)

Temporary test in package `statechain` (run on commit 89a542e, removed afterwards to keep the tree clean):

```
b1 := &Block{Index: 1, PrevHash: <32 zero bytes hex>, Timestamp: 1700000000,
    Ops: []Op{{Action: ActionDelete, Key: "k", Value: `"aaa"`}}}
b2 := &Block{Index: 1, PrevHash: <32 zero bytes hex>, Timestamp: 1700000000,
    Ops: []Op{{Action: ActionDelete, Key: "k", Value: `"zzz-completely-different"`}}}
HashBlock(b1) == HashBlock(b2)
// identical hash: 7ec86f3afcf579a3e41aee6905a5135593a0a916405f598bf0e589d1c3e06502
```

Control: the same two values under `ActionSet` hash differently, as expected — proving the delete branch is the only difference.

Test output (also attached as a screenshot):

```
identical hash for different delete values: 7ec86f3afcf579a3e41aee6905a5135593a0a916405f598bf0e589d1c3e06502
control: set-op hashes differ as expected
```

## Root cause (code)

- `statechain/encoding.go` (`MarshalCanonical`): the `ActionSet` branch writes the value length plus the value bytes; the `else` (delete) branch writes `var zero [4]byte` instead of `op.Value`.
- `statechain/crypto.go:12`: `HashBlock` hashes exactly what `MarshalCanonical` produces, so the hash inherits the omission.
- `statechain/types.go:14-18`: `Op.Value` is `json.RawMessage` — the value exists on the op and is simply not committed for deletes.

## Relationship to known tickets

No match was found in the visible portion of the public board. A keyword search for `delete` returned only XE-4589, XE-6742, XE-4590, and XE-4784 — certificate eviction, lease swap, vote removal, and conflict cleanup respectively, all unrelated. The duplicate check is partial (about 300 of \~757 open tickets are visible, and no separate GitHub-issues search was run for this candidate), so I leave the duplicate decision to triage.

## Suggested fix

Commit the delete op's value in `MarshalCanonical` the same way the set branch does (length-prefixed value bytes), or explicitly hash a domain-separated "no value" marker and reject non-empty delete values at block validation. Note this changes the block hash for any block containing a delete op, so it needs a coordinated rollout.

## Environment

- Commit: 89a542e ("release: testnet-0005 quorum withhold fix", 2026-11-10)
- Evidence is a unit test on that commit; no public testnet nodes were involved.
- Attachments: screenshot of the passing test output.

### Thread

**Joseph Denne**team2026-11-17 09:38 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-7917 and says what differs; it is read like any other.
