The spec is setting the channel_msg bit to 0 for the NewMiningJob message. But we can see in the message definition that it needs to be sent to a specific channel. So, the channel_msg bit should be 1:
|
| 0x15 | 0 | NewMiningJob | |
|
### 5.3.15 `NewMiningJob` (Server -> Client) |
|
|
|
The server provides an updated mining job to the client through a standard channel. This MUST be the first message after the channel has been successfully opened. This first message will have min_ntime unset (future job). |
|
|
|
If the `min_ntime` field is set, the client MUST start to mine on the new job immediately after receiving this message, and use the value for the initial nTime. |
|
|
|
| Field Name | Data Type | Description | |
|
| ----------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
|
| channel_id | U32 | Channel identifier, this must be a standard channel | |
|
| job_id | U32 | Identifier of the job as provided by NewMiningJob or NewExtendedMiningJob message | |
|
| min_ntime | OPTION[u32] | Smallest nTime value available for hashing for the new mining job. An empty value indicates this is a future job to be activated once a SetNewPrevHash message is received with a matching job_id. This SetNewPrevHash message provides the new prev_hash and min_ntime. If the min_ntime value is set, this mining job is active and miner must start mining on it immediately. In this case, the new mining job uses the prev_hash from the last received SetNewPrevHash message. | |
|
| version | U32 | Valid version field that reflects the current network consensus. The general purpose bits (as specified in BIP320) can be freely manipulated by the downstream node. The downstream node MUST NOT rely on the upstream node to set the BIP320 bits to any particular value. | |
|
| merkle_root | U256 | Merkle root field as used in the bitcoin block header | |
The spec is setting the
channel_msgbit to0for theNewMiningJobmessage. But we can see in the message definition that it needs to be sent to a specific channel. So, thechannel_msgbit should be 1:sv2-spec/08-Message-Types.md
Line 16 in 5b5eb4a
sv2-spec/05-Mining-Protocol.md
Lines 389 to 401 in 5b5eb4a