diff --git a/06-Job-Declaration-Protocol.md b/06-Job-Declaration-Protocol.md index 99f6b11..f34bd05 100644 --- a/06-Job-Declaration-Protocol.md +++ b/06-Job-Declaration-Protocol.md @@ -73,7 +73,11 @@ Notably, if the pool intends to change the space it requires for coinbase transa ### 6.3.4 `DeclareMiningJob` (Client -> Server) -A request sent by the Job Declarator that proposes a selected set of transactions to the upstream (pool) node. +A request sent by JDC that proposes a selected set of transactions to JDS. + +[`SipHash`](https://www.aumasson.jp/siphash/siphash.pdf) is used for short txids as a strategy to reduce bandwidth consumption, since including full txids (transaction data hash) would make the message body excessively big. + +More specifically, the `SipHash 2-4` variant is used. Aside from the preimage (which is the full txid), keys `k0` and `k1` are used to avoid collisions, which is the main purpose of `tx_short_hash_nonce`. | Field Name | Data Type | Description | | --------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -84,7 +88,7 @@ A request sent by the Job Declarator that proposes a selected set of transaction | coinbase_tx_suffix | B0_64K | 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 tx_short_hash collisions are uncorrelated across the network | | tx_short_hash_list | SEQ0_64K[SHORT_TX_ID] | Sequence of SHORT_TX_IDs. 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 (see bip-0152 for more information). Upstream node checks the list against its mempool. Does not include the coinbase transaction (as there is no corresponding full data for it yet). | -| tx_hash_list_hash | U256 | Hash of the full sequence of SHA256(transaction_data) contained in the transaction_hash_list | +| tx_hash_list_hash | U256 | SHA256 hash of the list of full txids, concatenated in the same sequence as they are declared in the_short_hash_list | | excess_data | B0_64K | Extra data which the Pool may require to validate the work (as defined in the Template Distribution Protocol) | ### 6.3.5 `DeclareMiningJob.Success` (Server -> Client)