Expand description
Aion-native transparency log — RFC-0025.
Append-only Merkle log over BLAKE3, RFC-6962-compatible in structure (split-point MTH, audit-path inclusion proofs) and domain-separated from every other aion signed object.
Phase A, this module: in-memory log + inclusion proofs + operator-signed tree heads, all offline. Phase B adds frontier caching, consistency proofs, and persistence. Phase C adds a Rekor adapter for wire interop.
§Example
use aion_context::transparency_log::{TransparencyLog, LogEntryKind, verify_inclusion_proof};
use aion_context::crypto::SigningKey;
let mut log = TransparencyLog::new();
let payload = b"attestation bytes";
let seq = log.append(LogEntryKind::VersionAttestation, payload, 42).unwrap();
// Self-contained verification: a verifier holding the log and a
// pinned root needs no access to the original payload.
let proof = log.inclusion_proof(seq).unwrap();
let leaf = log.leaf_hash_at(seq).unwrap();
verify_inclusion_proof(
leaf,
proof.leaf_index,
proof.tree_size,
&proof.audit_path,
log.root_hash(),
).unwrap();
let operator = SigningKey::generate();
log.set_operator(operator.verifying_key());
let sth = log.sign_tree_head(&operator);
assert!(log.verify_tree_head(&sth).is_ok());Structs§
- Inclusion
Proof - An inclusion proof: the siblings along the path from a leaf to the Merkle root, innermost first.
- LogEntry
- One leaf in the transparency log.
- Signed
Tree Head - A tree head signed by the log operator.
- Transparency
Log - Append-only Merkle log.
Enums§
- LogEntry
Kind - What kind of object is recorded in a log leaf.
Constants§
- LOG_
EMPTY_ DOMAIN - Domain separator for the empty-tree sentinel root.
- LOG_
LEAF_ DOMAIN - Domain separator for leaf-data hashing.
- LOG_
NODE_ DOMAIN - Domain separator for internal-node hashing.
- LOG_
STH_ DOMAIN - Domain separator for signed tree heads.
Functions§
- leaf_
hash - Compute the canonical leaf-data bytes and return their domain-tagged BLAKE3 hash.
- verify_
inclusion_ proof - Verify an inclusion proof: given a leaf hash, the leaf’s index, the tree size at proof-generation time, the audit path, and the pinned root hash, check that the leaf is in the tree.