pub enum VerifyError {
Show 41 variants
BundleTooLarge,
BadMagic,
UnsupportedBundleVersion(u8),
InnerRootMismatch {
expected: Hash,
inner_root: Hash,
},
InnerRootFoldMismatch,
Malformed,
CommitIdMismatch,
CommitBytesHashMismatch,
NotACommitOrRemix(ObjectType),
TooManySteps(usize),
InvalidEntryName(usize),
NonFinalStepNotTree(usize),
Merkle(MerkleError),
InvalidPayloadKind(u8),
PayloadIdMismatch,
ChunkIndexOutOfRange {
index: u32,
leaf_count: u32,
},
TooManyChunks,
ZeroLengthRange,
IncompleteLengthProofSet(u32),
UnexpectedLengthProofs,
Bao(String),
ShortSlice {
expected: u64,
got: usize,
},
InvalidBlobPrologue,
OffsetOverflow,
Decode(MkitError),
SelectorLeafMismatch,
RangeCrossesChunkBoundary,
RangeOutOfBounds,
PathNotFound(usize),
PathThroughNonTree,
Store(StoreError),
TooManyClosureObjects,
ClosureRootWrongType(ObjectType),
ClosureProfileViolation {
pack_index: usize,
entry_index: usize,
},
ClosureManifestBadMagic,
ClosureManifestUnsupportedVersion(u8),
ClosureManifestMalformed,
ClosurePackCountMismatch {
expected: usize,
got: usize,
},
ClosurePackKeyMismatch {
index: usize,
},
ClosureRootMismatch {
expected: Hash,
got: Hash,
},
Pack(PackError),
}Expand description
Errors verifying (or, natively, building) a disclosure.
Variants§
BundleTooLarge
The encoded bundle exceeds MAX_BUNDLE_BYTES.
BadMagic
The bundle is shorter than the fixed magic+version header, or the
magic bytes are not "MKDP".
UnsupportedBundleVersion(u8)
The bundle’s version byte is not 2. A version byte of 1 is
this error with payload 1; there is no v1 compatibility decoder.
InnerRootMismatch
A step’s or chunk header’s declared inner_root does not wrap to
the expected object id (Tree domain for steps, ChunkedBlob domain
for chunk headers). Checked before the field is used for anything.
Fields
InnerRootFoldMismatch
The proof folds to a different root than the bundle declared, even though the declared root wraps to the expected id (or vice versa). Both must agree.
Malformed
The codec body is malformed: truncated, an over-cap length, an invalid varint, or trailing bytes after the declared body.
CommitIdMismatch
The bundle’s embedded commit_id field does not match the id the
caller asked to verify against.
CommitBytesHashMismatch
BLAKE3(commit_bytes) does not equal the commit id being verified.
NotACommitOrRemix(ObjectType)
commit_bytes decoded to an object type other than Commit or
Remix — the only two kinds that carry a tree_hash a path can
be walked from.
TooManySteps(usize)
More steps than crate::store::MAX_TREE_DEPTH were supplied.
InvalidEntryName(usize)
The entry name at the given step index fails SPEC-OBJECTS §4.1
name validation (TreeEntry::validate_name).
NonFinalStepNotTree(usize)
A non-final step’s mode is not EntryMode::Tree — every step
but the last MUST descend into a directory.
Merkle(MerkleError)
A step’s, or the payload’s, merkle inclusion proof failed to
verify — wraps every MerkleError variant (out-of-range
position, unaligned proof, or a folded value that does not match
the expected id).
InvalidPayloadKind(u8)
The bundle’s payload_kind byte is not one of the three defined
kinds (0 Object, 1 Chunk, 2 Range).
PayloadIdMismatch
An Object payload’s BLAKE3/merkle id does not equal the
authenticated leaf id.
ChunkIndexOutOfRange
A chunk index (or a length-proof’s index) is out of range for
the ChunkedBlob’s proven leaf_count.
Fields
TooManyChunks
A proof’s implied chunk count (leaf_count - 1) exceeds
serialize::MAX_CHUNKS (crate-private, not linkable from here).
ZeroLengthRange
A Range payload’s len is zero — there is nothing to disclose
or verify.
IncompleteLengthProofSet(u32)
chunk_len_proofs was non-empty but did not cover exactly
0..index with no gaps or duplicates — an incomplete or malformed
set is a typed error, never silently treated as “absent”.
UnexpectedLengthProofs
chunk_len_proofs was non-empty on a Range payload that has no
chunk before it to describe: either the leaf is a plain Blob (no
chunk at all), or the disclosed chunk is index 0 (nothing precedes
the first chunk).
Bao(String)
A Bao slice failed to verify against the expected root/offset/len.
ShortSlice
A Bao slice decoded to fewer bytes than the claimed len.
Fields
InvalidBlobPrologue
verify_blob_len_proof’s bytes 0..6 are not a valid v1 Blob
prologue (wrong object type, magic, or schema version byte).
OffsetOverflow
An offset/length computation would overflow u64.
Decode(MkitError)
A byte range’s canonical decode/serialize error.
SelectorLeafMismatch
Selector::Chunk/Selector::Range was used against a leaf
whose object type does not support that selector (e.g. Chunk on
a plain Blob, or either on a Tree).
RangeCrossesChunkBoundary
build_disclosure: the requested range crosses a ChunkedBlob
chunk boundary — unsupported in this (v1) profile.
RangeOutOfBounds
build_disclosure: the requested range is out of bounds for the
leaf’s actual content length.
PathNotFound(usize)
build_disclosure: a path component was not found in its
parent tree.
PathThroughNonTree
build_disclosure: the path continues past a non-Tree entry,
or the requested selector needs a leaf that isn’t reached because
an intermediate component isn’t a directory.
Store(StoreError)
build_disclosure: the underlying object store returned an
error.
TooManyClosureObjects
The supplied object set exceeds crate::pack::MAX_ENTRIES.
ClosureRootWrongType(ObjectType)
The closure root deserialized but is not a Commit, Remix, or Tag.
ClosureProfileViolation
A pack in the closure profile contained a delta or compressed entry.
Fields
ClosureManifestBadMagic
The encoded closure manifest is shorter than the magic+version
header, or the magic bytes are not "MKCL".
ClosureManifestUnsupportedVersion(u8)
The manifest’s version byte is not 1.
ClosureManifestMalformed
The manifest body is malformed: truncated, an over-cap pack list, an unknown mode byte, or trailing bytes.
ClosurePackCountMismatch
The number of packs supplied does not match the manifest.
Fields
ClosurePackKeyMismatch
pack_key(packs[index]) does not equal the manifest entry.
ClosureRootMismatch
The manifest’s root does not equal the caller-supplied trusted root.
The manifest is a locator, never a trust anchor.
Pack(PackError)
A packfile framing/decode error while iterating a closure pack.
Trait Implementations§
Source§impl Debug for VerifyError
impl Debug for VerifyError
Source§impl Display for VerifyError
impl Display for VerifyError
Source§impl Error for VerifyError
impl Error for VerifyError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Error> for VerifyError
impl From<Error> for VerifyError
Source§fn from(_: CodecError) -> Self
fn from(_: CodecError) -> Self
Source§impl From<MerkleError> for VerifyError
impl From<MerkleError> for VerifyError
Source§fn from(source: MerkleError) -> Self
fn from(source: MerkleError) -> Self
Source§impl From<MkitError> for VerifyError
impl From<MkitError> for VerifyError
Source§impl From<PackError> for VerifyError
impl From<PackError> for VerifyError
Source§impl From<StoreError> for VerifyError
impl From<StoreError> for VerifyError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Source§impl From<VerifyError> for RangeProofError
impl From<VerifyError> for RangeProofError
Source§fn from(source: VerifyError) -> Self
fn from(source: VerifyError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for VerifyError
impl !UnwindSafe for VerifyError
impl Freeze for VerifyError
impl Send for VerifyError
impl Sync for VerifyError
impl Unpin for VerifyError
impl UnsafeUnpin for VerifyError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more