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

[PRIV] Generate Private Contract Address #1004

Merged

Conversation

vinistevam
Copy link
Contributor

PR description

Create a new method to use SenderAddress, nonce and PrivacyGroup to generate the private address.
Remove the resolveAccountFromPublicState.

Fixed Issue(s)

PRIV-25

* @return The generated address of the created private contract.
*/
public static Address privateContractAddress(
final Address senderAddress, final long nonce, final int privacyGroup) {
Copy link
Contributor

Choose a reason for hiding this comment

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

As per our Slack discussion, the privacyGroupID should be calculated as:
keccak256(RLP(address1, address2, ..., addressN))

Should we change this method signature now or is this something that will be refactored later?

Copy link
Contributor

Choose a reason for hiding this comment

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

we will change it now

@vinistevam vinistevam force-pushed the priv-contract-addr-generation branch 5 times, most recently from c150545 to 3069fb0 Compare March 1, 2019 10:09
@vinistevam vinistevam force-pushed the priv-contract-addr-generation branch from 3069fb0 to 287d178 Compare March 4, 2019 13:39
@vinistevam vinistevam force-pushed the priv-contract-addr-generation branch from 287d178 to 56e86b5 Compare March 4, 2019 14:02
@lucassaldanha lucassaldanha merged commit 2d69e6e into PegaSysEng:master Mar 4, 2019
@iikirilov iikirilov deleted the priv-contract-addr-generation branch March 20, 2019 10:22
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.

3 participants