What stays identical
The Tare build is the same program to everything that talks to it.
What is identical
| Who relies on it | |
|---|---|
| Account layouts | Every account your program already owns on chain. |
| Discriminators | Clients building instructions, and accounts being read back. |
| The IDL | Generated clients, explorers, wallets. It is byte-identical. |
| Error codes and messages | Clients that branch on an error, and anyone reading a failed transaction. |
| Events | Indexers. |
| Logs | Indexers and explorers, including the instruction-name lines. |
| Return data | Programs that call yours and read what it returns. |
Order of checks
Declared-ID checks, instruction logs, argument deserialization, account extraction, constraints, the handler, return data and exit keep their observable order. When several constraints fail at once, the error reported is the one stock Anchor reports.
What that allows
Programs on Solana upgrade in place over their existing accounts. Because layouts and discriminators are unchanged, the Tare build is deployed as an ordinary upgrade at the same address, with no account migration. Deploy the Tare build
How it is shown
Identity is not asserted, it is run: tare prove executes both builds over the same inputs and compares the results after every transaction. What is compared