pub struct DigDataStoreMetadata {
pub root_hash: BytesImpl<32>,
pub label: Option<String>,
pub description: Option<String>,
pub size_proof: Option<String>,
pub program_hash: Option<BytesImpl<32>>,
pub size_bucket: Option<SizeBucket>,
}Expand description
The DIG DataLayer metadata: the SDK’s DataStoreMetadata shape with the exact byte count
("b") REPLACED by a power-of-2 size_bucket ("sz"), plus the additive program_hash ("p").
This is the metadata dig-merkle curries into a minted store. The DIG store size is expressed as
a coarse power-of-2 SizeBucket rather than an exact byte count — a clean replacement of the
SDK’s bytes/"b" field (pre-release: there are NO on-chain DIG stores carrying "b"). With
size_bucket == None && program_hash == None it serializes byte-identically to the SDK’s
DataStoreMetadata with bytes == None (it emits l/d/sp only, never "b") — an SDK-typed
reader parses it and simply ignores the unknown "sz"/"p" keys (SPEC §8/§9).
Fields§
§root_hash: BytesImpl<32>The anchored .dig merkle root — always the first metadata atom (SPEC §8).
label: Option<String>An optional human-readable store label (CLVM alist key "l").
description: Option<String>An optional human-readable store description (CLVM alist key "d").
size_proof: Option<String>An optional size-proof string (CLVM alist key "sp").
program_hash: Option<BytesImpl<32>>The optional CLVM tree-hash of the program/puzzle this store is associated with (CLVM alist
key "p", appended after "sp"). dig-merkle stores and echoes this value; it never computes it.
size_bucket: Option<SizeBucket>The optional .dig store size as a power-of-2 bucket (CLVM alist key "sz", appended LAST —
after "p"). This REPLACES the SDK’s exact-byte "b" field: dig-merkle never emits "b", and
the size is this coarse bucket instead. Encoded on-wire as the minimal 1-byte bucket exponent
k ∈ 0..=10 (empty atom for k = 0), so a None size emits no key at all. See SizeBucket.
Trait Implementations§
Source§impl Clone for DigDataStoreMetadata
impl Clone for DigDataStoreMetadata
Source§fn clone(&self) -> DigDataStoreMetadata
fn clone(&self) -> DigDataStoreMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DigDataStoreMetadata
impl Debug for DigDataStoreMetadata
Source§impl Default for DigDataStoreMetadata
impl Default for DigDataStoreMetadata
Source§fn default() -> DigDataStoreMetadata
fn default() -> DigDataStoreMetadata
impl Eq for DigDataStoreMetadata
Source§impl<N, D> FromClvm<D> for DigDataStoreMetadatawhere
D: ClvmDecoder<Node = N>,
Decodes (root_hash . items), reading l/d/sp/p/sz and IGNORING any other key (the same
_ => () tolerance as the SDK).
impl<N, D> FromClvm<D> for DigDataStoreMetadatawhere
D: ClvmDecoder<Node = N>,
Decodes (root_hash . items), reading l/d/sp/p/sz and IGNORING any other key (the same
_ => () tolerance as the SDK).
There is deliberately NO "b" arm. Every DIG capsule store ALWAYS carries "sz" (dig-merkle
writes it), so "sz" is the authoritative size. A foreign SDK DataLayer store’s exact-byte "b"
is NOT a DIG size-proof — fabricating a bucket from it would misrepresent a non-capsule — so "b"
falls to the unknown-key tolerance and is ignored, and a sz-free store decodes honestly with
size_bucket == None. This does NOT break reading SDK stores: they still DECODE fine (root/l/d/sp
parse, "b" skipped). A p-free store likewise decodes with program_hash == None (SPEC §5.1).
fn from_clvm( decoder: &D, node: N, ) -> Result<DigDataStoreMetadata, FromClvmError>
Source§impl MetadataWithRootHash for DigDataStoreMetadata
The SDK’s generic build_datastore/from_spend require this bound to recover the anchored root.
root_hash_only clears every optional field — including program_hash and size_bucket — to None.
impl MetadataWithRootHash for DigDataStoreMetadata
The SDK’s generic build_datastore/from_spend require this bound to recover the anchored root.
root_hash_only clears every optional field — including program_hash and size_bucket — to None.
fn root_hash(&self) -> BytesImpl<32>
fn root_hash_only(root_hash: BytesImpl<32>) -> DigDataStoreMetadata
Source§impl PartialEq for DigDataStoreMetadata
impl PartialEq for DigDataStoreMetadata
impl StructuralPartialEq for DigDataStoreMetadata
Source§impl<N, E> ToClvm<E> for DigDataStoreMetadatawhere
E: ClvmEncoder<Node = N>,
Encodes (root_hash . items) where items pushes l/d/sp (mirroring the SDK, but NEVER the
exact-byte "b" key), then appends ("p" . program_hash) and finally ("sz" . exponent) LAST,
each only when Some.
impl<N, E> ToClvm<E> for DigDataStoreMetadatawhere
E: ClvmEncoder<Node = N>,
Encodes (root_hash . items) where items pushes l/d/sp (mirroring the SDK, but NEVER the
exact-byte "b" key), then appends ("p" . program_hash) and finally ("sz" . exponent) LAST,
each only when Some.
Never emitting "b" and appending the DIG keys only when present is the byte-identity guarantee:
with program_hash == None && size_bucket == None the bytes equal the SDK’s DataStoreMetadata
with bytes == None (SPEC §9).
Auto Trait Implementations§
impl Freeze for DigDataStoreMetadata
impl RefUnwindSafe for DigDataStoreMetadata
impl Send for DigDataStoreMetadata
impl Sync for DigDataStoreMetadata
impl Unpin for DigDataStoreMetadata
impl UnsafeUnpin for DigDataStoreMetadata
impl UnwindSafe for DigDataStoreMetadata
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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> Layer for T
impl<T> Layer for T
Source§type Solution = NodePtr
type Solution = NodePtr
Layer::construct_solution and Layer::parse_solution.Source§fn parse_puzzle(
allocator: &Allocator,
puzzle: Puzzle,
) -> Result<Option<T>, DriverError>
fn parse_puzzle( allocator: &Allocator, puzzle: Puzzle, ) -> Result<Option<T>, DriverError>
None if the puzzle doesn’t match.
An error is returned if the puzzle should have matched but couldn’t be parsed.Source§fn parse_solution(
_allocator: &Allocator,
solution: NodePtr,
) -> Result<<T as Layer>::Solution, DriverError>
fn parse_solution( _allocator: &Allocator, solution: NodePtr, ) -> Result<<T as Layer>::Solution, DriverError>
Layer::Solution type from a CLVM solution pointer.Source§fn construct_puzzle(
&self,
ctx: &mut SpendContext,
) -> Result<NodePtr, DriverError>
fn construct_puzzle( &self, ctx: &mut SpendContext, ) -> Result<NodePtr, DriverError>
SpendContext.Source§fn construct_solution(
&self,
_ctx: &mut SpendContext,
solution: <T as Layer>::Solution,
) -> Result<NodePtr, DriverError>
fn construct_solution( &self, _ctx: &mut SpendContext, solution: <T as Layer>::Solution, ) -> Result<NodePtr, DriverError>
Source§fn construct_spend(
&self,
ctx: &mut SpendContext,
solution: Self::Solution,
) -> Result<Spend, DriverError>
fn construct_spend( &self, ctx: &mut SpendContext, solution: Self::Solution, ) -> Result<Spend, DriverError>
Source§fn construct_coin_spend(
&self,
ctx: &mut SpendContext,
coin: Coin,
solution: Self::Solution,
) -> Result<CoinSpend, DriverError>
fn construct_coin_spend( &self, ctx: &mut SpendContext, coin: Coin, solution: Self::Solution, ) -> Result<CoinSpend, DriverError>
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.