Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#628 Deprecating Private Transaction hash/getHash() #639

Merged
merged 5 commits into from
Apr 3, 2020

Conversation

lucassaldanha
Copy link
Member

PR description

• Deprecating Private Transaction hash/getHash()
• In the future, private transactions will be addressed by their PMT hash

@MadelineMurray MadelineMurray mentioned this pull request Apr 2, 2020
3 tasks
@MadelineMurray MadelineMurray added the privacy private transactions label Apr 3, 2020
Copy link
Contributor

@pinges pinges left a comment

Choose a reason for hiding this comment

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

I have added some comments containing suggestions for logs and code comments.

"Processing private transaction {} in privacy group {}",
privateTransaction.getHash(),
privacyGroupId);
LOG.debug("Processing private transaction {} in privacy group {}", pmtHash, privacyGroupId);
Copy link
Contributor

Choose a reason for hiding this comment

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

"Processing private transaction corresponding to PMT {} in privacy group {}"?

@@ -414,8 +416,11 @@ public BigInteger getV() {
/**
* Returns the transaction hash.
*
* @deprecated All private transactions should be identified by their correspondent PMT hash.
Copy link
Contributor

Choose a reason for hiding this comment

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

should it be "corresponding"? I'm not sure, maybe we should ask Madeline :-)

@@ -122,6 +122,7 @@ public PrivateTransactionSimulator(
publicWorldState.updater(),
disposablePrivateState.updater(),
header,
Hash.ZERO, // PMT hash is not needed as this private transaction doesn't exist
Copy link
Contributor

Choose a reason for hiding this comment

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

What about this: "// Corresponding PMT does not exist."

@@ -38,25 +38,21 @@ public PrivateTransactionValidator(final Optional<BigInteger> chainId) {
final PrivateTransaction transaction,
final Long accountNonce,
final boolean allowFutureNonces) {
LOG.debug("Validating private transaction fields of {}", transaction.getHash());
LOG.debug("Validating private transaction {}", transaction);
Copy link
Contributor

Choose a reason for hiding this comment

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

"Validating private transaction corresponding to PMT {}" ?

"Processing private transaction {} in privacy group {}",
privateTransaction.getHash(),
privacyGroupId);
LOG.debug("Processing private transaction {} in privacy group {}", pmtHash, privacyGroupId);
Copy link
Contributor

Choose a reason for hiding this comment

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

s.a.

final ValidationResult<TransactionValidator.TransactionInvalidReason>
signatureValidationResult = validateTransactionSignature(transaction);
if (!signatureValidationResult.isValid()) {
LOG.debug(
"Private Transaction {}, failed validation {}, {}",
transaction.getHash(),
"Private Transaction failed signature validation {}, {}",
Copy link
Contributor

Choose a reason for hiding this comment

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

We might not need the "corresponding to PMT" business here ....

Signed-off-by: Lucas Saldanha <[email protected]>
Signed-off-by: Lucas Saldanha <[email protected]>
@lucassaldanha lucassaldanha merged commit 031c8cb into hyperledger:master Apr 3, 2020
@lucassaldanha lucassaldanha deleted the deleteprivtxhash branch April 14, 2020 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
privacy private transactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants