Skip to content

Commit 6fcc7d0

Browse files
Krish1979namtruong
andauthored
Update Transaction-manager.md (#20)
* Update Transaction-manager.md Update new Data recovery (batch resend) method introduced along with privacy enhancement changes * Update Tessera.md * Update Tessera.md * Update SampleConfiguration.md * Update Tessera.md * fix markdownlint check * fix markdownlint check * fix vale check Co-authored-by: namtruong <[email protected]>
1 parent 852d096 commit 6fcc7d0

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

Diff for: docs/HowTo/Configure/Tessera.md

+8
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@ should exist in the serverConfigs):
8787
"bootstrapNode": true,
8888
```
8989

90+
### Privacy Enhancements Flag
91+
92+
Privacy enhancement features to support Party Protection (PP) and Private State Validation (PSV) are enabled by setting the flag to true. The default value is set to FALSE
93+
94+
```json
95+
"enablePrivacyEnhancements" : "true",
96+
```
97+
9098
### CORS: Server sub-config
9199

92100
For the ThirdParty server type it may be relevant to configure CORS.

Diff for: docs/HowTo/Configure/Transaction-manager.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The default transaction manager comes with the standard options most setups will
4444

4545
These must be built from source and can be found inside the `tessera-dist` module.
4646

47-
## Data recovery
47+
## Data recovery (Legacy)
4848

4949
Tessera contains functionality to request transactions from other nodes in the network; this is useful if the database is lost or corrupted somehow.
5050

@@ -59,3 +59,23 @@ The data recovery mechanism is intended to be a "switch-on" feature as a startup
5959
The data recovery procedure works by invoking a "resend request" to each new node it sees in the network. This request will cause the target node to resend each of its transactions to the intended recipient, meaning they will again save the transaction in their database.
6060

6161
The target node will not send back transactions as a response the request in order to ensure that a malicious node cannot get access to the transactions. example: anyone can send a request for a particular key, but it will mean that the node that holds that key will receive the transactions, not the node making the request. In normal usage, the node making the request and the node holding the public key are the same.
62+
63+
## Data recovery (Enhanced from `Privacy Enhancement` release)
64+
65+
Due to the interdependence between Party Protection and PSV transactions (the existence and validation of ACOTHs), transactions cannot just be accepted but need to be recovered in the appropriate manner so that they don’t get wrongly rejected.
66+
67+
To do this we introduce a separate persistence unit called `tessera-recover` which consists a number of tables so that incoming history transactions received can be sorted before synchronising to the main database
68+
69+
The recovery process will include these steps:
70+
71+
- **Request** - the transaction manager that runs in recovery mode will send resend requests to other nodes in the network and wait for requests to be completed. The requested nodes will attempt to resend the transactions they have for the recovery node in batches (rather than singles compared to the legacy resend process). Transactions received are persisted to a separate staging database unit, and the batch request will be considered successful once the requested node finishes sending the transactions.
72+
- **Stage** - All transactions in the staging area will be sorted by dependency. This is done by executing a special staging query multiple times, until all transactions in the staging area are sorted and validated.
73+
- **Sync** - Once the staging process is done, the transactions are copied to the main database - by utilising the normal /push. During the sync, enhanced-privacy transactions are checked and validated the same way they were before.
74+
75+
Tessera recovery process will stop and shutdown once the above steps are executed. Each stage result will be reported as SUCCESS(0), PARTIAL_SUCCESS(1), or FAILURE(2). The result code would be useful for scripting purpose (for example automatically start Tessera in normal mode if recovery successfully completed)
76+
77+
To trigger the recovery process, Tessera will need to be started in recovery mode by using the command line
78+
79+
tessera -r or tessera --recover
80+
81+
During the recovery process, Tessera won’t accept any new enhanced-privacy transactions but will continue to accept 'standard' private transactions.

Diff for: docs/Reference/SampleConfiguration.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,11 @@ description: Sample configuration file
128128
"alwaysSendTo": [
129129
"String..."
130130
],
131+
"bootstrapNode": false,
131132
"unixSocketFile": "Path",
132133
"features": {
133-
"enableRemoteKeyValidation": false
134+
"enableRemoteKeyValidation": false,
135+
"enablePrivacyEnhancements": false
134136
},
135137
"encryptor": {
136138
"type": "Enumeration: NACL, EC",

0 commit comments

Comments
 (0)