-
Notifications
You must be signed in to change notification settings - Fork 879
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
Private Log Filters track enclavePublicKey and are removed when user removed from group #1298
Private Log Filters track enclavePublicKey and are removed when user removed from group #1298
Conversation
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
…ti-tenancy-onchain-remove-filter
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
...a/org/hyperledger/besu/ethereum/api/jsonrpc/internal/privacy/methods/priv/PrivNewFilter.java
Show resolved
Hide resolved
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/privacy/DefaultPrivacyController.java
Outdated
Show resolved
Hide resolved
.../core/src/main/java/org/hyperledger/besu/ethereum/privacy/MultiTenancyPrivacyController.java
Outdated
Show resolved
Hide resolved
…ti-tenancy-onchain-remove-filter
…ti-tenancy-onchain-remove-filter
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
…ti-tenancy-onchain-remove-filter
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
…ti-tenancy-onchain-remove-filter
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
...hyperledger/besu/ethereum/mainnet/precompiles/privacy/OnChainPrivacyPrecompiledContract.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
...i/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/filter/FilterManager.java
Show resolved
Hide resolved
...hyperledger/besu/ethereum/mainnet/precompiles/privacy/OnChainPrivacyPrecompiledContract.java
Outdated
Show resolved
Hide resolved
…ti-tenancy-onchain-remove-filter
…cy AND onchain groups enabled Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
|
||
final PrivateTransactionEvent removalEvent = | ||
new PrivateTransactionEvent( | ||
privateTransaction.getPrivacyGroupId().get().toBase64String(), removedParticipant); |
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.
Is there a chance for an NPE here?
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.
from within the onchain precompile?
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.
looking at the code, the calling method returns earlier if privacy group id is empty. I can refactor to make that clearer?
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.
Unchecked privateTransaction.getPrivacyGroupId().get()
?
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.
You're right - I missed that in the diff.
Any chance this function could be called from a different path?
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.
Looks pretty good - one comment.
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.
LGTM
Changes have been made, and @pinges has approved
PR description
When multi-tenancy and removing user from onchain privacy group, send an event which is processed by the FilterManager, which triggers removal of any private log filters created by that user in that privacy group.
Fixed Issue(s)
See #883
Changelog
No changelog required since this is part of a larger feature