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

[PAN-2632]: Add info about public and private states #19

Closed
wants to merge 1 commit into from
Closed

[PAN-2632]: Add info about public and private states #19

wants to merge 1 commit into from

Conversation

sgregglives
Copy link
Contributor

PR description

Document the types of access that contracts in privacy groups have.

Fixed Issue(s)

PAN-2632

NicolasMassart
NicolasMassart previously approved these changes Aug 28, 2019
Copy link
Member

@NicolasMassart NicolasMassart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@MadelineMurray MadelineMurray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but have requested a review from the privacy team to cover off the tech review

Contracts have the following levels of access between public and private states:

* A contract from a privacy group can read and write to another contract in the same privacy group.
* A contract from a privacy group can read from the public state including public contracts.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A contract from a privacy group can read from the public state including public contracts.

This is not true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we process the private transaction we need run everything through the evm with the private world state for that privacy group. We cannot currently access information from the public world state. To do so would require significant changes to the way we process the call stack.

Furthermore, as it stands we can not differentiate between public and private addresses. To implement this we would probably need to implement our own opcode or perhaps do some kind of pre-compile proxy that would allow a sort of poor man's reflection.

@NicolasMassart NicolasMassart dismissed their stale review August 30, 2019 13:44

comment from privacy team requires change

@NicolasMassart
Copy link
Member

Closed in favor of #27
Next time fixing conflict will be handled in a better way than creating a new PR.

@sgregglives sgregglives deleted the pan-2632 branch September 4, 2019 13:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants