> For the complete documentation index, see [llms.txt](https://docs.zecblocks.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zecblocks.xyz/state-reconstruction.md).

# State reconstruction

ZB-1 is designed so a client can rebuild protocol state by replaying confirmed Zcash data under the published rules.

## Reconstruction outline

{% stepper %}
{% step %}

## Identify the canonical confirmed Genesis

{% endstep %}

{% step %}

## Derive the valid token source heights

{% endstep %}

{% step %}

## Scan for ZB-1 protocol events

{% endstep %}

{% step %}

## Order events canonically

{% endstep %}

{% step %}

## Validate every event independently

{% endstep %}

{% step %}

## Discard invalid events

{% endstep %}

{% step %}

## Apply the first valid claim for each token

{% endstep %}

{% step %}

## Apply valid ownership changes

{% endstep %}

{% step %}

## Derive listings and completed ZB-1 marketplace sales

{% endstep %}
{% endstepper %}

## No mandatory ownership database

A website may cache reconstructed state for performance, but the cache is not protocol authority.

If the website disappears, another compliant implementation should be capable of reconstructing the same ZB-1 state from the public protocol data and the Zcash chain.

## Public bootstrap data

Anything a fresh implementation needs that cannot be derived from the chain must be publicly distributed and cryptographically bound to the protocol.

The final v1 release must not depend on a private API key, private database, or unpublished viewing secret for canonical reconstruction.
