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

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

josh-richardson
Copy link
Contributor

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

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

Copy link
Contributor

@iikirilov iikirilov left a comment

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
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
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
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
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