Private transaction lifecycle
This topic illustrates the high-level lifecycle of normal private transactions and privacy marker transactions (PMTs).
In both examples, participants A and B are party to the transaction and participant C is not.
Normal private transactions
- Participant A sends a private transaction to their GoQuorum node A.
- GoQuorum serializes the private transaction
data
value to JSON and sends it to Tessera node A with participant details. - Tessera encrypts the
data
and distributes it to transaction participants. - Tessera returns the hash of the encrypted
data
to GoQuorum node A. GoQuorum replaces the private transactiondata
value with the hash. GoQuorum signs the private transaction and sets thev
value to37
or38
to mark the transaction as private. - GoQuorum distributes the private transaction throughout the network.
- All nodes can see the transaction. Only transaction participants (participants A and B) can get the decrypted data from Tessera and execute the transaction.
Privacy marker transactions
Participant A sends a private transaction to their GoQuorum node A.
GoQuorum serializes the private transaction
data
value to JSON and sends it to Tessera node A with participant details.Tessera encrypts the
data
and distributes it to transaction participants.Tessera returns the hash of the encrypted
data
to GoQuorum node A. GoQuorum creates a public PMT with thedata
field set to the hash. GoQuorum signs the PMT.GoQuorum distributes the PMT throughout the network. All nodes can see the PMT.
The PMT is processed in the same way as a standard public transaction. Since the PMT's
to
value is the address of the privacy precompile contract, that contract is called.GoQuorum nodes B and C call the privacy precompile with the PMT
data
.GoQuorum attempts to retrieve the decrypted private transaction from Tessera using the publicly available hash from the PMT.
Action depends on whether the node is a transaction participant:
Participant: GoQuorum gets the decrypted
data
of the private transaction from Tessera and the privacy precompile executes the private transaction.Non-participant: No private transaction is found, so the privacy precompile returns immediately.