pub enum AuditChainDefect {
DoesNotStartAtTheBeginning {
found: AuditSequence,
},
DigestAltered {
at: AuditSequence,
},
UnexpectedRoot {
at: AuditSequence,
},
SequenceBroken {
expected: AuditSequence,
found: AuditSequence,
},
LinkBroken {
at: AuditSequence,
},
ForeignCeremony {
at: AuditSequence,
},
}Expand description
How a journal failed verification.
Each variant names a distinct way a chain can be attacked, because “the audit is broken” is not actionable and “the record at position 7 no longer matches its digest” is.
Variants§
DoesNotStartAtTheBeginning
The journal does not open at the first position — records were removed from the front.
Fields
found: AuditSequenceDigestAltered
A record’s content no longer produces its own digest.
Fields
at: AuditSequenceUnexpectedRoot
The opening record claims a predecessor, or a later record claims none. Either way a link was rewritten.
Fields
at: AuditSequenceSequenceBroken
A position was skipped or repeated — records were removed from the middle, or reordered.
LinkBroken
A record names a predecessor digest that is not the digest of the record before it. Something was substituted.
Fields
at: AuditSequenceForeignCeremony
A record belongs to a different ceremony — journals were grafted together.
Fields
at: AuditSequenceImplementations§
Source§impl AuditChainDefect
impl AuditChainDefect
Sourcepub fn explain(self) -> String
pub fn explain(self) -> String
What went wrong, in words an operator can act on.
Written once here rather than at each surface: the same defect has to read the same whether it was found over gRPC, in process, or by a host running the verifier itself.
Sourcepub fn at(self) -> AuditSequence
pub fn at(self) -> AuditSequence
Where the journal stopped being trustworthy.