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

Move the core of qbft into a qbft core module #8043

Merged
merged 8 commits into from
Dec 20, 2024

Conversation

jframe
Copy link
Contributor

@jframe jframe commented Dec 18, 2024

PR description

The first part to create a reusable QBFT library. This PR moves the core of QBFT into a new QBFT core module and keeps the Besu specific parts in the current QBFT module.

Further PRs will add QBFT specific types to the QBFT core module so it doesn't directly depend on the Besu block, block header and evm.

Changes

  • Move the core packages from QBFT into a new QBFT core module. This leaves the blockcreation, header validation, protocol, jsonrpc and validator providers in the QBFT module
  • Adapt the unit tests in the QBFT core module to use a mock of the BftExtraDataCodec so they don't depend on the QbftExtraDataCode in the QBFT module
  • I've left the QBFT core integration tests to depend on the main QBFT module for now and will remove that in a follow-up PR. The change to remove this dependency was larger than I would like to include in this PR.

Fixed Issue(s)

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:

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

@jframe jframe changed the title Move the core of QBFT into a qbft core module Move the core of qbft into a qbft core module Dec 19, 2024
@jframe jframe marked this pull request as ready for review December 19, 2024 06:02
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.

LGTM - maybe run the soak test?

consensus/qbft-core/build.gradle Outdated Show resolved Hide resolved
@jframe
Copy link
Contributor Author

jframe commented Dec 20, 2024

LGTM - maybe run the soak test?

Good idea, will run that before merging

Copy link
Contributor

@Gabriel-Trintinalia Gabriel-Trintinalia left a comment

Choose a reason for hiding this comment

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

lgtm

@jframe jframe merged commit ea8579d into hyperledger:main Dec 20, 2024
44 checks passed
@jframe jframe deleted the qbft_core_module branch December 20, 2024 03:12
garyschulte pushed a commit that referenced this pull request Dec 20, 2024
Move the core of QBFT into a qbft core module so it can be reused outside Besu

Signed-off-by: Jason Frame <[email protected]>
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