Verify Audit Chain
verify_audit_chainValidate trade audit chain integrity by checking hash continuity across a sequence range. Returns verified status, checked count, and first break point if tampering is detected.
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 | |||