Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Added information on EEA-compliant and Pantheon-extended privacy #1765

Merged
merged 30 commits into from
Jul 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0ed474b
WIP
MadelineMurray Jun 13, 2019
0cd240a
WIP
MadelineMurray Jun 15, 2019
0bb7329
WIP:
MadelineMurray Jun 16, 2019
8e1cc0e
WIP
MadelineMurray Jun 29, 2019
3329412
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
MadelineMurray Jun 29, 2019
d9d7716
Ready for review
MadelineMurray Jun 29, 2019
4edbf16
WIP
MadelineMurray Jul 12, 2019
3bd6f8d
WIP
MadelineMurray Jul 13, 2019
236afe8
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
MadelineMurray Jul 15, 2019
7f58702
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
MadelineMurray Jul 21, 2019
0787fe8
Added overview of privacy methods
MadelineMurray Jul 21, 2019
e99111d
Added method overviews
MadelineMurray Jul 21, 2019
c46761a
Reorganised privacy section
MadelineMurray Jul 21, 2019
e261569
Moved files
MadelineMurray Jul 22, 2019
12c3568
Rework
MadelineMurray Jul 22, 2019
a5ffe15
Merge branch 'privacyReorg' of https://github.com/MadelineMurray/pant…
MadelineMurray Jul 22, 2019
9834dde
Merge branch 'MadelineMurray-privacyReorg'
MadelineMurray Jul 22, 2019
f55ff08
Merge branch 'master' of https://github.com/PegaSysEng/pantheon into …
MadelineMurray Jul 22, 2019
da054a5
Merge branch 'MadelineMurray-privacyReorg'
MadelineMurray Jul 22, 2019
1ca598f
Merge branch 'managingPrivateTransactions' of https://github.com/Made…
MadelineMurray Jul 22, 2019
7e1f705
rework
MadelineMurray Jul 22, 2019
4acf168
Merge branch 'MadelineMurray-managingPrivateTransactions'
MadelineMurray Jul 22, 2019
2058cbd
Merge branch 'master' of https://github.com/PegaSysEng/pantheon
MadelineMurray Jul 23, 2019
1a86c07
Merge branch 'eeajsMethods' of https://github.com/MadelineMurray/pant…
MadelineMurray Jul 24, 2019
9319b04
Merge branch 'MadelineMurray-eeajsMethods'
MadelineMurray Jul 24, 2019
fcd5f38
fix conflict
MadelineMurray Jul 24, 2019
6d4f152
Merge branch 'master' of https://github.com/PegaSysEng/pantheon
MadelineMurray Jul 25, 2019
ba57ea5
Merge branch 'master' of https://github.com/PegaSysEng/pantheon
MadelineMurray Jul 26, 2019
f6e61c1
Added privacy group content
MadelineMurray Jul 26, 2019
b567991
Merge branch 'master' into legPanPrivacyGroups
MadelineMurray Jul 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions docs/Privacy/Explanation/Privacy-Groups.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
description: Privacy
<!--- END of page meta data -->

# Privacy Groups

A privacy group is a group of nodes identified by a unique privacy group ID by Orion. Each private transaction is
stored in Orion with the privacy group ID.

The Pantheon nodes maintain the public world state for the blockchain and a private state for each privacy group.
The private states contain data that is not shared in the globally replicated world state. Private transactions read
and write to the private world state for the privacy group, and read from the public world state.

## Privacy Types

Pantheon implements two types of privacy:

* EEA-compliant privacy - private transactions include `privateFor` as the recipient.
* Pantheon-extended privacy - private transactions include `privacyGroupId` as the recipient.

Both privacy types create privacy groups and store private transactions with their privacy group in Orion.

![Privacy Groups](../../images/PrivacyGroups.png)

!!! note
The Orion nodes are not shown above for clarity only. To send private transactions,
each Pantheon node must have an associated Orion node.

### EEA-compliant Privacy

In our privacy implementation complying with the [EEA Client Specification](https://entethalliance.org/technical-documents/)
the group of nodes specified by `privateFrom`and `privateFor` form a privacy group and are given a unique
privacy group ID by Orion.

!!! example
The diagram above illustrates two privacy groups enabling:

* A, B, and C to send transactions that are private from D
* A, C, and D to send transactions that are private from B

Using EEA-compliant privacy, to send private transactions between A, B, and C, A initialises a contract in a private transaction with
B and C specified as the `privateFor` and A specified as the `privateFrom`. Initialising the contract
creates a privacy group consisting of A, B, and C. For the ABC private state to remain consistent,
A, B, and C must be included on transactions (as either `privateFrom` or `privateFor`) even if they are
between two of the three parties.

To send private transactions between A, C, and D, C initialises a different contract in a private transaction with
A and D specified as the `privateFor` and C specified as the `privateFrom`. Initialising the contract
creates a privacy group consisting of A, C, and D. For the ACD private state to remain consistent,
A, C, and D must be included on transactions (as either `privateFrom` or `privateFor`) even if they are
between two of the three parties.


### Pantheon-extended Privacy

In our extended privacy implementation, a privacy group is created using [`priv_createPrivacyGroup`](../../Reference/Pantheon-API-Methods.md#priv_createprivacygroup)
and private transactions sent to the privacy group ID.

!!! example
Using the same privacy groups as above.

Using Pantheon-extended privacy, to send private transactions between A, B, and C, A creates a privacy
group consisting of A, B, and C. The privacy group ID is specified when sending private transactions and
A, B, and C are recipients of all private transactions sent to the privacy group.

To send private transactions between A, C, and D, A creates a privacy group consisting of A, C, and D.
The privacy group ID of this group is specified when sending private transactions with A, C, and D
as recipients.
37 changes: 2 additions & 35 deletions docs/Privacy/Explanation/Privacy-Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Private transactions have additional attributes to public Ethereum transactions:

* `privateFrom` - Orion public key of transaction sender

* `privateFor` - Orion public keys of transaction recipients
* `privateFor` - Orion public keys of transaction recipients or `privacyGroupId` - [Privacy group to receive transaction](Privacy-Groups.md)

* `restriction` - Private transactions are `restricted` or `unrestricted`:

Expand All @@ -53,37 +53,4 @@ of the Orion nodes sending and receiving the transaction.

!!! important
The mapping of Pantheon node addresses to Orion node public keys is off-chain. That is, the
sender of a private transaction must know the Orion node public key of the recipient.

## Privacy Groups

The group of nodes specified by `privateFrom`and `privateFor` form a privacy group and
are given a unique privacy group ID by Orion. The private transaction is stored in Orion with the privacy group ID.

The Pantheon nodes maintain the public world state for the blockchain and a private state for each privacy group.
The private states contain data that is not shared in the globally replicated world state. Private transactions read
and write to the private world state for the privacy group, and read from the public world state.

![Privacy Groups](../../images/PrivacyGroups.png)

!!! note
The Orion nodes are not shown above for clarity only. To send private transactions,
each Pantheon node must have an associated Orion node.

!!! example
The above illustrates two privacy groups enabling:

* A, B, and C to send transactions that are private from D
* A, C, and D to send transactions that are private from B

To send private transactions between A, B, and C, A initialises a contract in a private transaction with
B and C specified as the `privateFor` and A specified as the `privateFrom`. Initialising the contract
creates a privacy group consisting of A, B, and C. For the ABC private state to remain consistent,
A, B, and C must be included on transactions (as either `privateFrom` or `privateFor`) even if they are
between two of the three parties.

To send private transactions between A, C, and D, C initialises a different contract in a private transaction with
A and D specified as the `privateFor` and C specified as the `privateFrom`. Initialising the contract
creates a privacy group consisting of A, C, and D. For the ACD private state to remain consistent,
A, C, and D must be included on transactions (as either `privateFrom` or `privateFor`) even if they are
between two of the three parties.
sender of a private transaction must know the Orion node public key of the recipient.
4 changes: 2 additions & 2 deletions docs/Privacy/Explanation/Private-Transaction-Processing.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Private transactions are processed as illustrated and described below.
1. A private transaction is submitted using [eea_sendRawTransaction](../../Reference/Pantheon-API-Methods.md#eea_sendrawtransaction).
The signed transaction includes transaction attributes that are specific to private transactions:

* `privateFor` specifies the list of recipients
* `privateFor` or `privacyGroupId` specifies the list of recipients
* `privateFrom` specifies the sender
* `restriction` specifies the transaction is of type [_restricted_](Privacy-Overview.md#private-transactions)

Expand All @@ -28,7 +28,7 @@ The signed transaction includes transaction attributes that are specific to priv
1. The Private Transaction Handler sends the private transaction to Orion.

1. Orion distributes the private transaction directly (that is, point-to-point) to the Orion nodes specified
in the `privateFor` attribute. All Orion nodes specified in by `privateFor` and `privateFrom` store the transaction.
in `privateFor` or belonging to the privacy group identified by `privacyGroupId`. All recipient Orion nodes store the transaction.
The stored transaction is associated with the transaction hash and privacy group ID.

1. Orion returns the transaction hash to the Private Transaction Handler.
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ nav:
- Use the web3.js-eea Client Library: Privacy/How-To/eeajs.md
- Explanation:
- Privacy Overview: Privacy/Explanation/Privacy-Overview.md
- Privacy Groups: Privacy/Explanation/Privacy-Groups.md
- Processing Private Transactions: Privacy/Explanation/Private-Transaction-Processing.md
- Permissioning:
- Overview: Permissions/Permissioning-Overview.md
Expand Down