verify_audit_chain
Validates the integrity of a trade audit chain by checking that each record's hash links correctly to its predecessor, returning verification details and the first break point if any.
Instructions
Verify the integrity of the audit chain.
Walks the chain from from_seq (default: 1, the genesis record) to
to_seq (default: latest), checking that every record's prev_hash
matches the previous record's data_hash, and that each data_hash
equals SHA256(prev_hash || content_hash).
Returns a dict with verified, checked_count, first_break_at,
reason. A first_break_at of None with verified=True means the
chain is intact across the verified range.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_seq | No | Ending sequence_num (inclusive). None = through latest. | |
| from_seq | No | Starting sequence_num (inclusive). None = from beginning. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||