Struct DriveAbciValidationConstants
pub struct DriveAbciValidationConstants {
pub maximum_vote_polls_to_process: u16,
pub maximum_contenders_to_consider: u16,
pub minimum_pool_notes_for_outgoing: u64,
pub shielded_anchor_retention_blocks: u64,
pub shielded_anchor_pruning_interval: u64,
pub shielded_proof_verification_fee: u64,
pub shielded_per_action_processing_fee: u64,
pub shielded_storage_bytes_per_action: u64,
pub shielded_implicit_fee_cap: u64,
pub shielded_identity_create_denominations: &'static [u64],
}Fields§
§maximum_vote_polls_to_process: u16§maximum_contenders_to_consider: u16§minimum_pool_notes_for_outgoing: u64Minimum number of encrypted notes in the shielded pool before outgoing transitions (Unshield, ShieldedWithdrawal) are allowed. This ensures a sufficient anonymity set before funds can leave the pool.
shielded_anchor_retention_blocks: u64Number of blocks of anchors to retain. Anchors older than this are pruned at the end of each block. Clients must use an anchor no older than this many blocks when building shielded transactions.
shielded_anchor_pruning_interval: u64Anchor pruning is only performed every N blocks to avoid unnecessary
GroveDB work on every block. Must evenly divide
shielded_anchor_retention_blocks.
shielded_proof_verification_fee: u64Per-bundle fee (in credits) for Halo 2 ZK proof verification. Benchmarked at ~30x per-action signature verification cost.
shielded_per_action_processing_fee: u64Per-action fee (in credits) for processing: RedPallas spend auth signature verification, nullifier duplicate check, and tree insertion.
shielded_storage_bytes_per_action: u64Per-action long-term storage allowance, in bytes, priced at the full
storage rate (disk + processing credits per byte) by
compute_minimum_shielded_fee — the flat storage component every
pool-paid shielded transition carries per action.
The physical payload is 344 bytes: 312 in the BulkAppendTree — 32
(cmx) + 32 (rho) + 32 (cv_net, stored unencrypted for OVK
recovery) + 216 (the DashMemo Orchard TransmittedNoteCiphertext:
epk(32) || enc_ciphertext(104) || out_ciphertext(80)) — plus 32 in
the nullifier tree. The allowance may exceed that to cover what the
metering actually charges per append under the GroveVersion in force
(Merk node framing, dense path records, the amortized chunk-blob
framing).
shielded_implicit_fee_cap: u64Maximum surplus (in credits) that a ShieldFromAssetLock may implicitly
donate to the fee pools when no surplus_output address is set. Above this
cap the transition is rejected so a client cannot accidentally forfeit a
large asset-lock remainder. 20,000,000,000 credits = 0.2 Dash.
shielded_identity_create_denominations: &'static [u64]Allowed exit denominations (in credits) for IdentityCreateFromShieldedPool.
0.1, 0.3, 0.5, 1.0 DASH = {10, 30, 50, 100} × 10^9 credits. The exit amount is
restricted to this small fixed set so every identity-creation exit of a given size
is indistinguishable on-chain, maximizing the anonymity set (mirroring the exact-fee
uniformity already enforced for ShieldedTransfer). Empty pre-v12 so the transition
is gated off until the shielded family activates.
Implementations§
§impl DriveAbciValidationConstants
impl DriveAbciValidationConstants
pub fn max_retained_shielded_anchors(&self) -> Option<u64>
pub fn max_retained_shielded_anchors(&self) -> Option<u64>
Maximum number of shielded anchors the retention policy can keep on disk at once.
This is a corollary of the anchor recording and pruning algorithm, and must stay in sync with it:
- at most one anchor is recorded per block (
Drive::record_anchor_if_changedonly writes when the pool root changes), and - pruning removes every anchor older than
shielded_anchor_retention_blockson eachshielded_anchor_pruning_intervalboundary (Platform::prune_shielded_pool_anchors_v0).
Between two prune boundaries the retained set therefore spans at most
shielded_anchor_retention_blocks + shielded_anchor_pruning_interval
distinct heights, so that sum is the worst-case count.
Callers that must bound work against the retained set (e.g. the
unpaginated V0 shielded-anchors query) should derive their limits from
this value rather than re-deriving the bound from the raw constants, so
they stay coupled to the pruning algorithm. Returns None only if the
configured policy overflows u64.
Trait Implementations§
§impl Clone for DriveAbciValidationConstants
impl Clone for DriveAbciValidationConstants
§fn clone(&self) -> DriveAbciValidationConstants
fn clone(&self) -> DriveAbciValidationConstants
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for DriveAbciValidationConstants
impl Debug for DriveAbciValidationConstants
§impl Default for DriveAbciValidationConstants
impl Default for DriveAbciValidationConstants
§fn default() -> DriveAbciValidationConstants
fn default() -> DriveAbciValidationConstants
Auto Trait Implementations§
impl Freeze for DriveAbciValidationConstants
impl RefUnwindSafe for DriveAbciValidationConstants
impl Send for DriveAbciValidationConstants
impl Sync for DriveAbciValidationConstants
impl Unpin for DriveAbciValidationConstants
impl UnsafeUnpin for DriveAbciValidationConstants
impl UnwindSafe for DriveAbciValidationConstants
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> CostsExt for T
impl<T> CostsExt for T
§fn wrap_with_cost(self, cost: OperationCost) -> CostContext<Self>where
Self: Sized,
fn wrap_with_cost(self, cost: OperationCost) -> CostContext<Self>where
Self: Sized,
CostContext object with provided costs.§fn wrap_fn_cost(
self,
f: impl FnOnce(&Self) -> OperationCost,
) -> CostContext<Self>where
Self: Sized,
fn wrap_fn_cost(
self,
f: impl FnOnce(&Self) -> OperationCost,
) -> CostContext<Self>where
Self: Sized,
CostContext object with costs computed using the
value getting wrapped.§impl<T> FmtForward for T
impl<T> FmtForward for T
§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.§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.§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.§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.§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.§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.§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.§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.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T, U> IntoOnNetwork<U> for Twhere
U: FromOnNetwork<T>,
impl<T, U> IntoOnNetwork<U> for Twhere
U: FromOnNetwork<T>,
§fn into_on_network(self, network: Network) -> U
fn into_on_network(self, network: Network) -> U
Calls U::from_on_network(self).
§impl<T, U> IntoPlatformVersioned<U> for Twhere
U: FromPlatformVersioned<T>,
impl<T, U> IntoPlatformVersioned<U> for Twhere
U: FromPlatformVersioned<T>,
§fn into_platform_versioned(self, platform_version: &PlatformVersion) -> U
fn into_platform_versioned(self, platform_version: &PlatformVersion) -> U
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§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 more§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 more§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
§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
§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.§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.§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.§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> Tap for T
impl<T> Tap for T
§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 more§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 more§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 more§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 more§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 more§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 more§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.§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.§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.§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.§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.§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.§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.