Skip to content

Commit ac73bee

Browse files
committed
clarify Coinbase-only vs Full-Template
1 parent 795371b commit ac73bee

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

06-Job-Declaration-Protocol.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ In order to fully implement the Client side of the Job Declaration Protocol, the
2828

2929
It is responsible for:
3030
- Receiving Templates from the Template Provider (via Template Distribution Protocol).
31-
- Declaring Custom Jobs to JDS (via Job Declaration Protocol).
31+
- Declaring Custom Jobs to JDS (via Job Declaration Protocol under Full-Template mode).
3232
- Notifying declared Custom Jobs to Pool (via Mining Protocol).
3333
- Receiving Shares from downstream Mining Devices working on Custom Jobs (via Mining Protocol).
3434
- Submitting Shares for Custom Jobs to Pool.
@@ -41,7 +41,7 @@ Additionally, if:
4141

4242
JDC is also responsible for switching to a new Pool+JDS (or solo mining as a last resort).
4343

44-
This fallback strategy incentivizes honesty on Pool side, otherwise it will lose hashrate by rejecting Shares for Custom Job that was already acknowledged to be valid.
44+
This fallback strategy incentivizes honesty on Pool side, otherwise it will lose hashrate by rejecting Shares for a Custom Job that was already acknowledged to be valid.
4545

4646
## 6.3 Job Declaration Modes
4747

@@ -50,11 +50,21 @@ This fallback strategy incentivizes honesty on Pool side, otherwise it will lose
5050
Under Coinbase-only mode:
5151
- JDS allocates `mining_job_token` to JDC (`AllocateMiningJobToken` / `AllocateMiningJobToken.Success`).
5252
- Pool evaluates fee revenue of some proposed work (uniquely identified by `mining_job_token`) by looking at the coinbase.
53-
- JDC never reveals the `txid`s contained in the template (in other words, the transaction set).
53+
- JDC never reveals the tx data contained in the template (in other words, the transaction set).
5454
- proposed work is acknowledged as valid by Pool via `SetCustomMiningJob.Success`.
5555
- the `DeclareMiningJob` message is never used.
5656
- if a valid block is found, JDC propagates it unilaterally.
5757

58+
In other words, Pool + JDS operating under Coinbase-only mode do not require to ever know which transactions are included in the miner template, preserving the privacy around the miner's mempool.
59+
60+
This leaves Pool arguably vulnerable to an attack where miner declares a coinbase with some fee revenue while one of the following situations is true:
61+
- the template actually has a different fee revenue.
62+
- the template has invalid transactions.
63+
64+
This potential attack vector has similar incentives to block-witholding, and acts as a strong disincentive for Pool + JDS to adopt Coinbase-only mode.
65+
66+
This could however be mitigated with Zero-Knowledge-Proof based protocol extensions, where JDC proves that the fee revenue on the coinbase belongs to a valid template, without ever revealing the template itself.
67+
5868
![](./img/jd_coinbase_mode.png)
5969

6070
As soon as JDC has:
@@ -89,9 +99,9 @@ The table below shows a comparison between the two Sv2 Job Declation Modes:
8999

90100
| | Coinbase-only | Full-Template |
91101
|-------------------------------------|-|-|
92-
| knowledge of fee revenue | JDC and Pool | JDC and JDS (on behalf of Pool) |
93-
| knowledge of txdata on the template | JDC | JDC and JDS (on behalf of Pool) |
94-
| block propagation | JDC | JDC and JDS (on behalf of Pool) |
102+
| knowledge of fee revenue | JDC <br> • Pool (while blind against tx data) |JDC <br> • Pool (while blind against tx data) <br> • JDS (verifying against revealed tx data on behalf of Pool) |
103+
| knowledge of txdata on the template | JDC | JDC <br> • JDS (on behalf of Pool) |
104+
| ability to broadcast mined block |JDC | JDC <br> • JDS (on behalf of Pool) |
95105

96106
## 6.4 Job Declaration Protocol Messages
97107

0 commit comments

Comments
 (0)