Add a step-by-step flow to illustrate nonce validation. (#699)

* Rename whitelist to allowlist.

Signed-off-by: Byron Gravenorst <byron.gravenorst@consensys.net>

* Additional updates.

Signed-off-by: Byron Gravenorst <byron.gravenorst@consensys.net>

* Whitelist renaming.

Signed-off-by: Byron Gravenorst <byron.gravenorst@consensys.net>

* Address reviewer feedback.

Signed-off-by: Byron Gravenorst <byron.gravenorst@consensys.net>

* Fix typos.

Signed-off-by: Byron Gravenorst <byron.gravenorst@consensys.net>

* Add a step-by-step flow describing nonce validation.

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

* Fix requirements file.

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>

* Address reviewer feedback.

Signed-off-by: bgravenorst <byron.gravenorst@consensys.net>
pull/705/head
bgravenorst 4 years ago committed by GitHub
parent f6b1555b3d
commit 405ded4674
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CI/requirements.txt
  2. 19
      docs/Concepts/Privacy/Private-Transactions.md

@ -3,7 +3,6 @@ mkdocs-material==6.1.7
Markdown==3.2.1
markdown-fenced-code-tabs==1.0.3
markdown-include==0.5.1
MarkupSafe==1.1.1
mkdocs-markdownextradata-plugin==0.1.3
mkdocs-exclude==1.0.2
mkdocs-redirects==1.0.0

@ -53,6 +53,8 @@ Besu maintains separate private states for each
account is specific to the privacy group. That is, the nonce for account A for privacy group ABC is
different to the nonce for account A for privacy group AB.
A nonce is the number of previous transactions made by the sender.
!!! note
If sending more than one transaction for mining in the same block (that is, you are not waiting
for the transaction receipt), you must calculate the private transaction nonce outside Besu.
@ -79,6 +81,23 @@ for the private transaction with the incorrect nonce.
of nonce management when sending multiple private transactions. The example calculates the
correct nonces for the private transactions and privacy marker transactions outside of Besu.
The following private transaction flow illustrates when nonce validation occurs:
1. Submit a private transaction with a [nonce value](#private-transaction-nonce).
1. The private transaction is distributed to all participants in the privacy group.
1. The privacy marker transaction is created and submitted to the transaction pool with a nonce of `0`
if using one time accounts. If using a specific account with
[`--privacy-marker-transaction-signing-key-file`](../../Reference/CLI/CLI-Syntax.md#privacy-marker-transaction-signing-key-file), the
nonce for that account is obtained and used for the privacy marker transaction.
1. The privacy marker transaction is mined and included in the block.
1. After the block containing the privacy marker transaction is imported, and the privacy marker
transaction is processed, the private transaction is retrieved from the private transaction manager
and executed.
If the private transaction was submitted with a correct nonce in step 1, the nonce is
validated as correct, if an incorrect nonce was submitted, the private transaction execution
fails.
<!-- links ---->
[privacy marker transaction]: ../../Concepts/Privacy/Private-Transaction-Processing.md

Loading…
Cancel
Save