pub struct StorageCommitment {
pub root: [u8; 32],
pub key_count: u32,
pub sender_peer_id: [u8; 32],
pub sender_public_key: Vec<u8>,
pub signature: Vec<u8>,
}Expand description
Signed storage commitment.
Piggybacked on neighbour-sync gossip and shipped alongside a quote (ADR-0004).
The signature commits to the Merkle root, key count, sender peer ID, and
the sender’s ML-DSA-65 public key under DOMAIN_COMMITMENT.
Embedding the public key lets any receiver (including the paying client)
verify the signature without an external PeerId → MlDsaPublicKey lookup.
Binding the public key in the signed payload prevents a key-swap attack.
Wire size ≈ 5.3 KiB (root 32 B + key_count 4 B + peer_id 32 B + pubkey
1952 B + signature 3293 B).
Fields§
§root: [u8; 32]Merkle root over the responder’s claimed keys.
key_count: u32Number of leaves committed over.
sender_peer_id: [u8; 32]Sender peer ID, bound to the signature.
sender_public_key: Vec<u8>Sender’s ML-DSA-65 public key bytes (1952 bytes). Embedded so receivers can verify the signature without a separate pubkey directory. Bound by the signature.
signature: Vec<u8>ML-DSA-65 signature over canonical commitment fields. 3293 bytes.
Trait Implementations§
Source§impl Clone for StorageCommitment
impl Clone for StorageCommitment
Source§fn clone(&self) -> StorageCommitment
fn clone(&self) -> StorageCommitment
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 StorageCommitment
impl Debug for StorageCommitment
Source§impl<'de> Deserialize<'de> for StorageCommitment
impl<'de> Deserialize<'de> for StorageCommitment
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>,
impl Eq for StorageCommitment
Source§impl PartialEq for StorageCommitment
impl PartialEq for StorageCommitment
Source§fn eq(&self, other: &StorageCommitment) -> bool
fn eq(&self, other: &StorageCommitment) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for StorageCommitment
impl Serialize for StorageCommitment
impl StructuralPartialEq for StorageCommitment
Auto Trait Implementations§
impl Freeze for StorageCommitment
impl RefUnwindSafe for StorageCommitment
impl Send for StorageCommitment
impl Sync for StorageCommitment
impl Unpin for StorageCommitment
impl UnsafeUnpin for StorageCommitment
impl UnwindSafe for StorageCommitment
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<'de, T> BorrowedRpcObject<'de> for 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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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