-
Notifications
You must be signed in to change notification settings - Fork 130
[PAN-3122] Allow private transactions to access public state #1916
base: master
Are you sure you want to change the base?
Conversation
…n create public contract from private contract
…nsactions/contracts
8cfac99
to
4fce9fb
Compare
There was a problem hiding this 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
...java/tech/pegasys/pantheon/tests/web3j/privacy/PrivateContractPublicStateAcceptanceTest.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
@Override | ||
public NavigableMap<Bytes32, AccountStorageEntry> storageEntriesFrom( |
There was a problem hiding this comment.
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
...e/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/MainnetContractCreationProcessor.java
Outdated
Show resolved
Hide resolved
...java/tech/pegasys/pantheon/tests/web3j/privacy/PrivateContractPublicStateAcceptanceTest.java
Outdated
Show resolved
Hide resolved
|
||
@Override | ||
public void setNonce(final long value) { | ||
throw new UnsupportedOperationException(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
34066bd
to
172cde1
Compare
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