pub struct InclusionStep {
pub sibling: String,
pub sibling_is_left: bool,
}Expand description
One step of a Merkle InclusionProof: the sibling hash, and which side it
sits on.
RFC 6962 lets a verifier recover the side from index arithmetic. This carries it explicitly instead. The redundancy costs one bool per step and removes an entire class of verifier bug — an off-by-one in the index recursion produces a wrong root rather than a silently-accepted proof, and a hand-written verifier in another language is far likelier to get a stated side right than to re-derive the split correctly.
Fields§
§sibling: StringThe sibling subtree hash, sha256:<hex>.
sibling_is_left: boolWhether the sibling is the left operand at this level.
Trait Implementations§
Source§impl Clone for InclusionStep
impl Clone for InclusionStep
Source§fn clone(&self) -> InclusionStep
fn clone(&self) -> InclusionStep
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InclusionStep
impl Debug for InclusionStep
Source§impl<'de> Deserialize<'de> for InclusionStep
impl<'de> Deserialize<'de> for InclusionStep
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for InclusionStep
Source§impl PartialEq for InclusionStep
impl PartialEq for InclusionStep
Source§impl Serialize for InclusionStep
impl Serialize for InclusionStep
impl StructuralPartialEq for InclusionStep
Auto Trait Implementations§
impl Freeze for InclusionStep
impl RefUnwindSafe for InclusionStep
impl Send for InclusionStep
impl Sync for InclusionStep
impl Unpin for InclusionStep
impl UnsafeUnpin for InclusionStep
impl UnwindSafe for InclusionStep
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
Mutably borrows from an owned value. Read more