pub struct MerklePaymentCandidateNode {
pub pub_key: Vec<u8>,
pub price: Uint<256, 4>,
pub reward_address: Address,
pub merkle_payment_timestamp: u64,
pub signature: Vec<u8>,
pub committed_key_count: u32,
pub commitment_pin: Option<[u8; 32]>,
}Expand description
A node’s signed quote for potential reward eligibility.
Nodes create this in response to a client’s quote request. The pub_key
field stores the raw ML-DSA-65 public key bytes, and signature stores
the ML-DSA-65 signature over bytes_to_sign().
Fields§
§pub_key: Vec<u8>Node’s public key bytes (ML-DSA-65)
price: Uint<256, 4>Node-calculated price for storing data
reward_address: AddressNode’s Ethereum address for payment
merkle_payment_timestamp: u64Quote timestamp (provided by the client)
signature: Vec<u8>Signature over bytes_to_sign
committed_key_count: u32ADR-0004: the number of keys in the storage commitment this price was
derived from. 0 for a baseline (no-commitment) quote. Tail-placed with
#[serde(default)] so an old-format candidate (lacking these fields)
decodes as 0/None rather than misaligning onto signature.
commitment_pin: Option<[u8; 32]>ADR-0004: the pin (commitment hash) of the storage commitment this price
was derived from. None for a baseline quote.
Implementations§
Source§impl MerklePaymentCandidateNode
impl MerklePaymentCandidateNode
Sourcepub fn bytes_to_sign(
price: &Uint<256, 4>,
reward_address: &Address,
timestamp: u64,
committed_key_count: u32,
commitment_pin: &Option<[u8; 32]>,
) -> Vec<u8> ⓘ
pub fn bytes_to_sign( price: &Uint<256, 4>, reward_address: &Address, timestamp: u64, committed_key_count: u32, commitment_pin: &Option<[u8; 32]>, ) -> Vec<u8> ⓘ
Get the bytes to sign.
ADR-0004: the commitment binding (committed_key_count, commitment_pin)
is appended to the signed payload so the per-node ML-DSA-65 signature
covers it — making a count/pin mismatch genuine “two artifacts signed by
the same key” evidence. The pin is tagged (0 = none, 1 = present) so a
baseline candidate can never collide with one pinning an all-zero hash.
This is a coordinated breaking change: ant-protocol must verify the same
5-field message (its verify_merkle_candidate_signature reconstructs this
exact payload).
Trait Implementations§
Source§impl Clone for MerklePaymentCandidateNode
impl Clone for MerklePaymentCandidateNode
Source§fn clone(&self) -> MerklePaymentCandidateNode
fn clone(&self) -> MerklePaymentCandidateNode
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 MerklePaymentCandidateNode
impl Debug for MerklePaymentCandidateNode
Source§impl<'de> Deserialize<'de> for MerklePaymentCandidateNode
impl<'de> Deserialize<'de> for MerklePaymentCandidateNode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MerklePaymentCandidateNode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MerklePaymentCandidateNode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for MerklePaymentCandidateNode
Source§impl PartialEq for MerklePaymentCandidateNode
impl PartialEq for MerklePaymentCandidateNode
Source§fn eq(&self, other: &MerklePaymentCandidateNode) -> bool
fn eq(&self, other: &MerklePaymentCandidateNode) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for MerklePaymentCandidateNode
impl Serialize for MerklePaymentCandidateNode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for MerklePaymentCandidateNode
Auto Trait Implementations§
impl Freeze for MerklePaymentCandidateNode
impl RefUnwindSafe for MerklePaymentCandidateNode
impl Send for MerklePaymentCandidateNode
impl Sync for MerklePaymentCandidateNode
impl Unpin for MerklePaymentCandidateNode
impl UnsafeUnpin for MerklePaymentCandidateNode
impl UnwindSafe for MerklePaymentCandidateNode
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