> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ton.org/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.ton.org/feedback

```json
{
  "path": "/foundations/serialization/merkle-update",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Merkle updates

Merkle update cells always have two references, `c1`, `c2`, and behave like a Merkle proof for both.
The level of a Merkle update cell, `0 <= l < 3`, is determined as `max{Lvl(c1) - 1, Lvl(c2) - 1, 0}`.

Each Merkle update cell serializes as follows:

* one tag byte with value `0x04`;
* the 256-bit higher hash of the referenced cell `c1` or the [representation hash](/foundations/serialization/cells) of `c` if its level equals zero;
* the same for the second reference `c2`;
* 2 bytes that store the depth of the old deleted subtree that was replaced by the reference `c1`;
* 2 bytes that store the depth of the new deleted subtree that was replaced by the reference `c2`.
