The three corpora
A corpus is an ordered set of transaction sequences with their starting accounts. A proof draws on three of them.
The three
| Corpus | Its inputs |
|---|---|
| Own tests | The program's own test transactions. |
| Generated | Seeded instruction sequences generated from the IDL. |
| Mainnet | Transactions sampled from mainnet for the program address, replayed over current account state. |
Generated
Sequences are generated from the stock IDL with deterministic signer keys, so the same program gives the same corpus. Program-derived addresses, fixed addresses, signer funding and the order of initializers are resolved from the IDL and from hints read out of your source.
Successful transactions feed the calls that follow them in a sequence. Negative variants, inputs built to fail, run without committing their changes: an error path is compared like any other result.
Own tests
Your test suite is recorded once as it runs on the stock build: the signed transactions, the starting and changing account state, the slots. The recording replays on both builds.
$ tare prove --tests-corpus <path/to/tests.json>
Mainnet
$ tare prove --program <PROGRAM_ID>
Samples recent transactions for the address and replays each over the account state it ran against. It is a bounded number of RPC reads, made once when you run the command.
The corpus hash
Every corpus is hashed. The hash and the count from each of the three go into the proof report and the record, which is what makes a proof a statement about a specific set of inputs.