Skip to content

Commit 9c10129

Browse files
committed
clarify DeclareMiningJob
1 parent 2595b1b commit 9c10129

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

06-Job-Declaration-Protocol.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ Notably, if the pool intends to change the space it requires for coinbase transa
8080

8181
### 6.3.4 `DeclareMiningJob` (Client -> Server)
8282

83-
A request sent by the Job Declarator that proposes a selected set of transactions to the upstream (pool) node.
83+
A request sent by JDC that proposes a selected set of transactions to JDS.
84+
85+
[`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.
86+
87+
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`.
8488

8589
| Field Name | Data Type | Description |
8690
| --------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -91,7 +95,7 @@ A request sent by the Job Declarator that proposes a selected set of transaction
9195
| 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 |
9296
| tx_short_hash_nonce | U64 | A unique nonce used to ensure tx_short_hash collisions are uncorrelated across the network |
9397
| 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). |
94-
| tx_hash_list_hash | U256 | Hash of the full sequence of SHA256(transaction_data) contained in the transaction_hash_list |
98+
| 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 |
9599
| excess_data | B0_64K | Extra data which the Pool may require to validate the work (as defined in the Template Distribution Protocol) |
96100

97101
### 6.3.5 `DeclareMiningJob.Success` (Server -> Client)

0 commit comments

Comments
 (0)