#[repr(C)]pub struct DeclareMiningJob<'decoder> {
pub request_id: u32,
pub mining_job_token: B0255<'decoder>,
pub version: u32,
pub coinbase_prefix: B064K<'decoder>,
pub coinbase_suffix: B064K<'decoder>,
pub tx_short_hash_nonce: u64,
pub tx_short_hash_list: Seq064K<'decoder, ShortTxId<'decoder>>,
pub tx_hash_list_hash: U256<'decoder>,
pub excess_data: B064K<'decoder>,
}
Expand description
Message used by JDC to proposes a selected set of transactions to JDS they wish to mine on.
Fields§
§request_id: u32
A unique identifier for this request.
Used for pairing request/response.
mining_job_token: B0255<'decoder>
Token received previously through crate::AllocateMiningJobTokenSuccess
message.
version: u32
Header version field.
coinbase_prefix: B064K<'decoder>
The coinbase transaction nVersion field
coinbase_suffix: B064K<'decoder>
Up to 8 bytes (not including the length byte) which are to be placed at the beginning of the coinbase field in the coinbase transaction.
tx_short_hash_nonce: u64
A unique nonce used to ensure DeclareMiningJob::tx_short_hash_list
collisions are
uncorrelated across the network.
tx_short_hash_list: Seq064K<'decoder, ShortTxId<'decoder>>
A list of short transaction hashes which are used to identify the transactions.
SipHash 2-4 variant is used for short txids as a strategy to reduce bandwidth consumption. More specifically, the SipHash 2-4 variant is used.
Inputs to the SipHash functions are transaction hashes from the mempool. Secret keys k0, k1 are derived from the first two little-endian 64-bit integers from the SHA256(tx_short_hash_nonce), respectively. For more info see BIP-0152.
Upon receiving this message, JDS must check the list against its mempool.
This list does not include the coinbase transaction.
tx_hash_list_hash: U256<'decoder>
Hash of the list of full txids, concatenated in the same sequence as they are declared in
DeclareMiningJob::tx_short_hash_list
.
excess_data: B064K<'decoder>
Extra data which the JDS may require to validate the work.
Trait Implementations§
Source§impl<'decoder> Clone for DeclareMiningJob<'decoder>
impl<'decoder> Clone for DeclareMiningJob<'decoder>
Source§fn clone(&self) -> DeclareMiningJob<'decoder>
fn clone(&self) -> DeclareMiningJob<'decoder>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more