I was going through the quorum docs and got stuck on how private transactions are mined? When two nodes, say Node A and Node B do a private transaction between themselves. Which node then mines the transaction and creates the block? Since no other node can see the payload of the transaction itself, does it mean that either of the two nodes can mine the transaction?
A node that is not party to a private transaction can still mine (mint) the transaction. The minting node is selected by whichever consensus mechanism you have configured. A simplified description of how private transactions work is as follows:
- Node A sends the transaction to its local transaction manager and is returned a hash to the transaction. The transaction manager also sends the transaction securely to the transaction manager for node B.
- Node A modifies the transaction so that it only contains the hash, not the private details of the transaction. It then submits this transaction to the network for minting.
- The minting node will create a block which contains the modified transaction.
- Any node that is not a party to the transaction will validate the block (and the transaction), without knowing the private details.
- When node B validates the transaction, it will use the hash to retrieve the private details from its transaction manager.
You can see the documentation for this here: https://docs.goquorum.com/en/latest/Privacy/Tessera/How%20Tessera%20Works/