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

[PAN-3122] Allow private transactions to access public state - #1916

Open
josh-richardson wants to merge 10 commits into
PegaSysEng:masterfrom
josh-richardson:pan-3122
Open

[PAN-3122] Allow private transactions to access public state#1916
josh-richardson wants to merge 10 commits into
PegaSysEng:masterfrom
josh-richardson:pan-3122

Conversation

@josh-richardson

@josh-richardson josh-richardson commented Sep 9, 2019

Copy link
Copy Markdown
Contributor

PR description

This allows private contract calls to access public state, meaning that a private contract a can retrieve data from a public contract b. Any operations which change state are disallowed.

Further details here: https://pegasys1.atlassian.net/browse/PAN-3122

@iikirilov iikirilov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Need to clarify some dubious code in the ReadOnlyMutableAccount

}

@Override
public NavigableMap<Bytes32, AccountStorageEntry> storageEntriesFrom(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We need to double-check this


@Override
public void setNonce(final long value) {
throw new UnsupportedOperationException();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What are the implications of this if a new OPCode is added that we don't private contracts to call in the public state?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We get into quite a nasty situation where pantheon tries to re-evaluate this over and over.

@josh-richardson
josh-richardson marked this pull request as ready for review September 11, 2019 22:42
@josh-richardson
josh-richardson force-pushed the pan-3122 branch 2 times, most recently from 34066bd to 172cde1 Compare September 12, 2019 08:11
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.

2 participants