Skip to main content

VerifyError

Enum VerifyError 

Source
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

§expected: Hash

The parent Tree id (steps) or ChunkedBlob leaf id (chunk headers).

§inner_root: Hash

The prover-supplied inner root that failed the wrap check.

§

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

§index: u32

The out-of-range chunk index.

§leaf_count: u32

The proof’s claimed leaf_count (chunk count + 1, for the metadata leaf).

§

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

§expected: u64

The requested length.

§got: usize

The number of bytes the slice actually decoded to.

§

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

§pack_index: usize

Index of the offending pack in the caller-supplied list.

§entry_index: usize

Index of the offending entry inside that pack.

§

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

§expected: usize

Pack count recorded in the manifest.

§got: usize

Number of pack buffers the caller handed the verifier.

§

ClosurePackKeyMismatch

pack_key(packs[index]) does not equal the manifest entry.

Fields

§index: usize

Index of the mismatched pack.

§

ClosureRootMismatch

The manifest’s root does not equal the caller-supplied trusted root. The manifest is a locator, never a trust anchor.

Fields

§expected: Hash

Root the caller asked to verify against.

§got: Hash

Root the manifest named.

§

Pack(PackError)

A packfile framing/decode error while iterating a closure pack.

Trait Implementations§

Source§

impl Debug for VerifyError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for VerifyError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for VerifyError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for VerifyError

Source§

fn from(_: CodecError) -> Self

Converts to this type from the input type.
Source§

impl From<MerkleError> for VerifyError

Source§

fn from(source: MerkleError) -> Self

Converts to this type from the input type.
Source§

impl From<MkitError> for VerifyError

Source§

fn from(source: MkitError) -> Self

Converts to this type from the input type.
Source§

impl From<PackError> for VerifyError

Source§

fn from(source: PackError) -> Self

Converts to this type from the input type.
Source§

impl From<StoreError> for VerifyError

Source§

fn from(source: StoreError) -> Self

Converts to this type from the input type.
Source§

impl From<VerifyError> for RangeProofError

Source§

fn from(source: VerifyError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self> ⓘ

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Threaded<T> for T

Source§

type Rest = ()

The outputs beyond the threaded value.
Source§

fn split(self) -> (T, ())

Splits into the threaded value and the extra outputs.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more