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

# How to read a corpus entry

> One real entry walked field by field: CAP and protocol tags, the synthetic flag, both passphrases, the expected decoded values and the re-encode check.

For SDK maintainers and indexer authors meeting the corpus for the first time. After this page you can read any entry's manifest and check its bytes and expected values yourself (`xdrcheck entry <id>`, `--decoded` for the XDR-JSON).

Every corpus entry is one JSON manifest under `corpus/manifest/` plus the XDR files it names. This page walks one real entry, `cap-0040/extra-signer-signed-payload-local` ([CAP-40](https://docs.xdrcheck.dev/caps/overview.md#cap-40)), field by field. The format of every field is on [Manifest and index format](https://docs.xdrcheck.dev/reference/manifest.md); the JSON Schema is `corpus/schema/manifest-entry.schema.json`.

## What the entry is

| Field | Value | What it means |
| - | - | - |
| `id` | `cap-0040/extra-signer-signed-payload-local` | Stable entry ID: the coverage row, then a name ([Entry IDs](https://docs.xdrcheck.dev/reference/manifest.md#entry-ids)) |
| `title` | PRECOND\_V2 with a signed-payload extra signer and its signature | The pattern in one line |
| `kind` | `ledger` | The bytes are whole ledgers (`LedgerCloseMeta`); other kinds hold one XDR value, a strkey or an SDK call |
| `caps` | `[40, 21]` | The CAPs whose shapes the entry holds; it is listed on each CAP's page |
| `protocol.introduced` | `19` | The protocol that made the shape possible |
| `synthetic` | `false` | `false`: the bytes come from stellar-core, not from a hand-made recipe |
| `negative`, `validity` | `false`, `valid` | A valid ledger every reader must accept |
| `shapes` | `precond-v2`, `extra-signers`, `signed-payload-signature`, `signature-hint-xor` | Shape tags, searchable across the corpus |
| `why` | An extra signer is a precondition, not a signer of any account: its key appears only in the envelope and the matching signature carries a XORed hint. Readers that record it as an account signer or as a participant invent a relation that no ledger entry shows. | Why readers get it wrong |
| `fields.validated` | `VF-13`, `VF-18` | The rows of the hardening guide's field table this entry demonstrates |

## Where the bytes come from: both passphrases

The entry has 4 variants: the same scenario step run on a local, offline stellar-core under the testnet and the mainnet passphrase, at two protocols. The network ID is part of every transaction hash, so the hashes differ by passphrase while the accounts, derived from public labels, are the same.

| Network | Protocol | Ledger | Bytes | `blob.sha256` | Transaction hash | Regenerate with |
| - | - | - | - | - | - | - |
| testnet | 30 | 18 | 2,352 | `68c4874b82bbb6c3…` | `187165045b94ff9a…` | `xdrcheck-corpus gen scenarios/s02-signed-payload-and-signers.yaml --network testnet --protocol 30` |
| pubnet | 30 | 18 | 2,352 | `991bf801ea2cad77…` | `4bb15c5e2d2894e8…` | `xdrcheck-corpus gen scenarios/s02-signed-payload-and-signers.yaml --network pubnet --protocol 30` |
| testnet | 28 | 18 | 2,344 | `0b57c09675f49b15…` | `187165045b94ff9a…` | `xdrcheck-corpus gen scenarios/s02-signed-payload-and-signers.yaml --network testnet --protocol 28` |
| pubnet | 28 | 18 | 2,344 | `09fac188950344f3…` | `4bb15c5e2d2894e8…` | `xdrcheck-corpus gen scenarios/s02-signed-payload-and-signers.yaml --network pubnet --protocol 28` |

Each variant's `source` records the stellar-core that emitted it (`30.0.0`, commit `0e49751aa9dd`, and the sha256 of its package and binary), the scenario file (`corpus/scenarios/s02-signed-payload-and-signers.yaml`), the step (`extra-signer-in-preconditions`) and its hashes, so `make verify-generate` can run the scenario again offline and compare. `reproducibility: normalised-identical` says how the regenerated bytes compare.

## What a correct reader must produce

`expect` holds the values a correct reader derives from the ledger. `xdrcheck-corpus verify` checks each pinpointed value against the decoded bytes and requires the reference extractor, which derives participants and movements from what stellar-core changed, to agree with the rest ([Manifest, section 6](https://docs.xdrcheck.dev/reference/manifest.md#6-expected-values-and-how-they-are-matched)). The same `expect` holds for every variant; `${derived.…}` stands for a per-variant value such as the transaction hash.

| Expected | Value |
| - | - |
| ledger `transactions` | 1 |
| ledger `operations` | 1 |
| ledger `events` | 2 |
| ledger `entry_changes` | 8 |
| transaction 0 `result_code` | `tx_success`, operations `["payment.success"]` |
| value at `…/cond/v2/extra_signers` | `["PA3LW24Y6IJPYBE3H7NQ2HCWE2DX3EKR56Y4DHKTGWGQAIFRXAAAAAAAAAQFZINLDYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAW4"]`: A signed-payload extra signer with a 32-byte payload; it is a precondition, not a signer of any account. |
| value at `…/signatures/1/hint` | `"b1b80001"`: Last 4 bytes of D's key (b1 b8 00 00) XOR the last 4 bytes of the payload (00 00 00 01). |
| participant | `GC3SWPJ2WESFIOR7X74URJEOATTLLLIBNHAQAZYGH2SIIICU76GZCPPP` as source, fee\_payer |
| participant | `GCY5DNH2FH4F7CCCIUMJTPIP3DPAOT6OLHN4ZVVV5Z7TJODMZNSBZFXM` as destination |
| **not** a participant | `GA3LW24Y6IJPYBE3H7NQ2HCWE2DX3EKR56Y4DHKTGWGQAIFRXAAAA34Q` (account D of the scenario): D is named only as an extra signer; no ledger entry of D changed |
| movement `fee` | 100 (`derived.fee_charged`) stroops of native from `GC3SWPJ2…` |
| movement `transfer` | 10000000 stroops of native from `GC3SWPJ2…` to `GCY5DNH2…` |

`participants.exact` and `movements_exact` are `true`: a reader that records any other participant or movement fails the entry. The replay harness compares an indexer's stored rows with these values ([Replay](https://docs.xdrcheck.dev/architecture/replay.md)).

## Check it yourself

Decode and re-encode every variant byte for byte through rs-stellar-xdr, check the hashes, and compare with the decoded values (after `make build`):

```sh theme={null}
bin/xdrcheck-corpus verify --tier curated --entries 'cap-0040/extra-signer-signed-payload-local'
```

Or read the files with nothing but Python 3 (and the `zstd` command for the decoded sidecar):

```python theme={null}
import hashlib, sys
sys.path.insert(0, "packages/python")
import xdrcheck

entry = xdrcheck.open("corpus").entry("cap-0040/extra-signer-signed-payload-local")
want = entry.manifest()["expect"]["values"]
for v in entry.variants:
    blob = v.blob()                               # the XDR bytes stellar-core emitted
    assert hashlib.sha256(blob).hexdigest() == v.sha256
    doc = v.expected_json()                       # the same bytes decoded (SEP-51 XDR-JSON)
    for w in want:
        node = doc
        for part in w["path"].strip("/").split("/"):
            node = node[int(part)] if isinstance(node, list) else node[part]
        assert node == w["equals"], w["path"]
    print(v.network, v.protocol, len(blob), "bytes: hashes and expected values agree")
```

## What the kit's runs say about it

* **SDK conformance:** agrees in 21 of 21 columns ([SDK matrix](https://docs.xdrcheck.dev/results/sdk-matrix.md)).
* **Replay:** baseline `0.1.0` on `sep54-dir`: pass; wallet-backend `f0c00cf52420` on `rpc`: pass; wallet-backend `f0c00cf52420` on `sep54-s3`: pass ([Replay results](https://docs.xdrcheck.dev/results/replay.md)).
* **Mainnet:** its rarest shape token occurs 81 times on pubnet, first at ledger 41,573,647 and last at 65,288,361 ([Mainnet scan](https://docs.xdrcheck.dev/results/mainnet-scan.md#prevalence-by-entry)).

## Related

* [The corpus](https://docs.xdrcheck.dev/architecture/corpus.md)
* [Authoring corpus entries](https://docs.xdrcheck.dev/guides/add-corpus-entries.md#authoring-reference)
* [For SDK maintainers](https://docs.xdrcheck.dev/start/for-sdk-maintainers.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.