Skip to content

feat(besu): add IBFT 2.0 and QBFT light clients - #1092

Merged
srdtrk merged 37 commits into
mainfrom
gjermund/besu-poc
Aug 27, 2026
Merged

feat(besu): add IBFT 2.0 and QBFT light clients#1092
srdtrk merged 37 commits into
mainfrom
gjermund/besu-poc

Conversation

@gjermundgaraba

Copy link
Copy Markdown
Contributor

Description

closes: #XXXX


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Wrote unit and integration tests.
  • Added relevant natspec and godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

@gjermundgaraba gjermundgaraba changed the title gjermund/besu poc poc: Besu IBFT 2.0 / QBFT light clients Aug 20, 2026
@gjermundgaraba
gjermundgaraba force-pushed the gjermund/besu-poc branch 2 times, most recently from 50b870e to 6b57741 Compare August 20, 2026 18:11
@gjermundgaraba gjermundgaraba changed the title poc: Besu IBFT 2.0 / QBFT light clients feat(besu): add IBFT 2.0 and QBFT light clients Aug 20, 2026
@gjermundgaraba
gjermundgaraba force-pushed the gjermund/besu-poc branch 7 times, most recently from 3cfe0a8 to 812898f Compare August 22, 2026 17:09
@gjermundgaraba
gjermundgaraba marked this pull request as ready for review August 22, 2026 17:09
@gjermundgaraba
gjermundgaraba requested a review from a team as a code owner August 22, 2026 17:09
@gjermundgaraba
gjermundgaraba changed the base branch from main to gjermund/proof-api-relay-safety August 22, 2026 17:10
@mergify

mergify Bot commented Aug 22, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@greptile-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds Solidity light clients and proof-service support for Besu IBFT 2.0 and QBFT networks, together with generated bindings, fixtures, and end-to-end infrastructure.

  • Adds Besu header, validator quorum, account-proof, and storage-proof verification.
  • Registers Besu-to-Besu and dummy-EVM proof API modules.
  • Adds single- and dual-Besu test environments covering deployment, client registration, packet receipt, and acknowledgement relay.
  • Expands generated ABI validation and documents supported Besu configurations.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains within the eligible follow-up review scope.

No blocking failure remains.

Important Files Changed

Filename Overview
ibc-solidity/contracts/light-clients/besu/BesuLightClientBase.sol Implements shared Besu header parsing, validator quorum checks, trusted-state updates, and EVM account and storage proof verification.
ibc-solidity/contracts/light-clients/besu/BesuIBFT2LightClient.sol Specializes the shared client for IBFT 2.0 commit-seal digest construction.
ibc-solidity/contracts/light-clients/besu/BesuQBFTLightClient.sol Specializes the shared client for QBFT commit-seal digest construction.
packages/proof-api/modules/besu-to-besu/src/tx_builder.rs Constructs Besu client creation, update, packet relay, and proof-bearing destination transactions.
packages/proof-api/modules/besu-to-besu/src/lib.rs Exposes the Besu-to-Besu proof API route and dispatches shared service operations.
e2e/interchaintestv8/chainconfig/besu_qbft.go Creates and manages a four-validator Docker Compose QBFT network for end-to-end tests.
e2e/interchaintestv8/besu_to_besu_test.go Exercises dual-Besu deployment, client registration, token transfer, packet receipt, and acknowledgement relay.
programs/proof-api/src/bin/proof-api.rs Registers the new Besu-to-Besu and dummy-EVM proof API modules with the server.

Sequence Diagram

sequenceDiagram
  participant A as Besu Chain A
  participant P as Proof API
  participant B as Besu Chain B
  participant LC as Besu Light Client
  A->>A: Send packet and store commitment
  P->>A: Read header, event, and storage proof
  P-->>B: Build update and receive transaction
  B->>LC: Verify header, validator quorum, and account root
  LC-->>B: Verify packet commitment proof
  B->>B: Receive packet and write acknowledgement
  P->>B: Read acknowledgement proof
  P-->>A: Build acknowledgement relay
  A->>LC: Verify updated B state and acknowledgement
  A->>A: Complete packet lifecycle
Loading

Reviews (2): Last reviewed commit: "fix(besu): decouple relay safety API" | Re-trigger Greptile

@gjermundgaraba
gjermundgaraba force-pushed the gjermund/besu-poc branch 2 times, most recently from 117726e to 8abcbfb Compare August 23, 2026 13:55
@gjermundgaraba
gjermundgaraba changed the base branch from gjermund/proof-api-relay-safety to gjermund/rust-1-98-compat August 23, 2026 13:55
Base automatically changed from gjermund/rust-1-98-compat to main August 23, 2026 19:39
@gjermundgaraba

Copy link
Copy Markdown
Contributor Author

@greptile review

@srdtrk srdtrk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

First pass. I'm still reviewing the proof api code

Comment thread .github/workflows/e2e-attestor.yml Outdated
command:
- --config-file=/opt/besu/config.toml
- --identity=validator1
- --p2p-host=10.42.0.2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is cool. It does feel a bit weird that we have to hard code IPs, number of validators, and the images used. Maybe this file should be generated from a template?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

we can consider it, for now i left it since besu requires deterministic addresses

Comment thread e2e/interchaintestv8/chainconfig/besu_qbft.go
Comment thread e2e/interchaintestv8/chainconfig/besu_qbft.go
Comment thread e2e/interchaintestv8/chainconfig/besu_qbft.go
Comment thread ibc-solidity/solidity.just Outdated
Comment thread ibc-solidity/solidity.just Outdated
Comment thread ibc-solidity/solidity.just Outdated
Comment on lines +142 to +147
Some(
self.src_listener
.get_block_number()
.await
.map_err(to_tonic_status)?,
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

smarter thing to do is to get this by parsing the timeout events, getting the timestamp and then converting it to a height. However, I understand that it might be cumbersome. If we can modify proof API to use timestamps for timeouts rather than block heights, that might be more ideal.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah, might be worth considering, but in the proof api as it is, i dont think it is worth doing rn (perhaps in ibc "link")

pub src_ics26_address: Address,
pub dst_rpc_url: String,
pub dst_ics26_address: Address,
pub consensus_type: BesuConsensusType,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wonder if we can query the chains to figure this out to remove the need for this config param. Would improve the UX a lot imo.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

would. we should look into it when we move this over to link

@gjermundgaraba
gjermundgaraba force-pushed the gjermund/besu-poc branch 2 times, most recently from 8a4808b to f023bca Compare August 25, 2026 07:02
Signed-off-by: Gjermund Garaba <gjermund@garaba.net>
Signed-off-by: Gjermund Garaba <gjermund@garaba.net>
Signed-off-by: Gjermund Garaba <gjermund@garaba.net>
Signed-off-by: Gjermund Garaba <gjermund@garaba.net>
Signed-off-by: Gjermund Garaba <gjermund@garaba.net>
Signed-off-by: Gjermund Garaba <gjermund@garaba.net>
Signed-off-by: Gjermund Garaba <gjermund@garaba.net>
Signed-off-by: Gjermund Garaba <gjermund@garaba.net>
Signed-off-by: Gjermund Garaba <gjermund@garaba.net>
srdtrk added 17 commits August 27, 2026 16:46
Signed-off-by: srdtrk <srdtrk@hotmail.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>
Signed-off-by: srdtrk <srdtrk@hotmail.com>

@srdtrk srdtrk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@srdtrk
srdtrk merged commit 60f6575 into main Aug 27, 2026
199 checks passed
@srdtrk
srdtrk deleted the gjermund/besu-poc branch August 27, 2026 17:27
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