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

[Follow up] Add Transaction Permissioning Hook to PermissioningService Interface #8365

Open
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

relu91
Copy link

@relu91 relu91 commented Feb 28, 2025

PR description

This PR builds upon the work started in #7952, finalizing the implementation while maintaining consistency with the existing changes.

Key Updates:

  • Completed the feature without altering the previous implementation significantly.
  • Added some improvements to the acceptance tests
  • Ensured consistency with the existing codebase by following established style and logic.
  • Took inspiration from the NodePermissioningController for handling plugin-based submissions, aligning the approach with Besu’s existing permissioning mechanisms.

Basically, after merging this work, people can filter transactions using the PermissioningService in their plugins. I would say adding some examples to the documentation might be useful.

Note: I didn't like the previous acceptance test, I found it a little bit convoluted for simply assigning the filtering mechanism of the plugins. As I said, I tried to be as conservative as I could. If you want, we can discuss possible improvements there.

Fixed Issue(s)

#7835

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • spotless: ./gradlew spotlessApply
  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

vaidikcode and others added 29 commits November 28, 2024 02:16
Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
…hen it already exists

Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
…er#7835

# Conflicts:
#	acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/PermissioningPluginTest.java
Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
Signed-off-by: Vaidik <vaidikbhardwaj00@gmail.com>
Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
Signed-off-by: Vaidik <vaidikbhardwaj00@gmail.com>
Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
Signed-off-by: vaidikcode <vaidikbhardwaj00@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

thanks for your contribution! Strong preference for not modifying the smart contract permissioning code at this stage since it's about to be removed.

Copy link
Contributor

Choose a reason for hiding this comment

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

we've deprecated smart contract based permissioning per the sunset plan https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu

so this class is going to be removed

Copy link
Contributor

Choose a reason for hiding this comment

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

and right now we're effectively in a code freeze for the sunset features. So would prefer not to modify this code if possible, and if not possible, would prefer to remove smart contract permissioning first.

Copy link
Author

Choose a reason for hiding this comment

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

That was indeed another thing that I wanted to mention in the first comment. I can revert that change. Should I also add @Depracted tag? or is it not common practice here?

Copy link
Author

Choose a reason for hiding this comment

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

Meanwhile, I checked the latest version from main reverting the changes. Let me know if I need to do other cleanups of the previous changes.

relu91 added 3 commits March 3, 2025 16:09
Signed-off-by: reluc <relu.cri@gmail.com>
Signed-off-by: reluc <relu.cri@gmail.com>
Signed-off-by: reluc <relu.cri@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants