-
Notifications
You must be signed in to change notification settings - Fork 834
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
#628 Deprecating Private Transaction hash/getHash() #639
Conversation
Signed-off-by: Lucas Saldanha <[email protected]>
Signed-off-by: Lucas Saldanha <[email protected]>
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.
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); |
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.
"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. |
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.
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 |
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 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); |
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.
"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); |
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.
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 {}, {}", |
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 might not need the "corresponding to PMT" business here ....
Signed-off-by: Lucas Saldanha <[email protected]>
Signed-off-by: Lucas Saldanha <[email protected]>
Signed-off-by: Lucas Saldanha <[email protected]>
PR description
• Deprecating Private Transaction hash/getHash()
• In the future, private transactions will be addressed by their PMT hash