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

Refactor and extend PluginTransactionPoolValidatorService #6636

Merged

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented Feb 28, 2024

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

Most advanced CI tests are deferred until PR approval, but you could:

  • locally run all unit tests via: ./gradlew build
  • locally run all acceptance tests via: ./gradlew acceptanceTest
  • locally run all integration tests via: ./gradlew integrationTest
  • locally run all reference tests via: ./gradlew ethereum:referenceTests:referenceTests

PR description

This PR extends the transaction pool validator plugin, to also pass the isLocal and hasPriority attributes of the tx to validate

Optional<String> validateTransaction(
      final Transaction transaction, final boolean isLocal, final boolean hasPriority);

Then a renaming has been done, for making clear that this validator service only apply when adding a tx to the transaction pool, and not when doing other validations, like during block import, along with a refactor to align this service to the way TransactionSelectorService is managed.

Fixed Issue(s)

@fab-10 fab-10 force-pushed the txpool-validator-service-refactor-extend branch from db73383 to 1ab0bac Compare February 28, 2024 19:31
@fab-10 fab-10 force-pushed the txpool-validator-service-refactor-extend branch from 7fca6f8 to 8581c4d Compare February 29, 2024 15:02
Signed-off-by: Fabio Di Fabio <[email protected]>
@fab-10 fab-10 force-pushed the txpool-validator-service-refactor-extend branch from 8581c4d to 94bdfaf Compare February 29, 2024 15:31
@fab-10 fab-10 marked this pull request as ready for review February 29, 2024 16:26
@fab-10 fab-10 enabled auto-merge (squash) February 29, 2024 16:32
Copy link
Contributor

@siladu siladu left a comment

Choose a reason for hiding this comment

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

I don't have much input from a plugin system point of view, but generally looks good 👍

# Conflicts:
#	CHANGELOG.md
#	acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/ThreadBesuNodeRunner.java
@fab-10 fab-10 merged commit 2b8d44e into hyperledger:main Mar 5, 2024
52 of 55 checks passed
@fab-10 fab-10 deleted the txpool-validator-service-refactor-extend branch March 5, 2024 11:31
jflo pushed a commit to jflo/besu that referenced this pull request Mar 5, 2024
jflo pushed a commit to jflo/besu that referenced this pull request Mar 8, 2024
amsmota pushed a commit to Citi/besu that referenced this pull request Apr 16, 2024
amsmota pushed a commit to Citi/besu that referenced this pull request Apr 16, 2024
matthew1001 pushed a commit to kaleido-io/besu that referenced this pull request Jun 7, 2024
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.

2 participants