Skip to content

Comments

Feat: TEE prover service implementation#345

Merged
jonas089 merged 41 commits intomainfrom
jonas/tee-prover-service
Feb 18, 2026
Merged

Feat: TEE prover service implementation#345
jonas089 merged 41 commits intomainfrom
jonas/tee-prover-service

Conversation

@jonas089
Copy link
Contributor

@jonas089 jonas089 commented Jan 9, 2026

This PR adds a prover service implementation for the TEE service.
A new feature flag tee_mode was introduced alongside batch_mode that will start the TEE prover service + message prover service, similar to how we did it for the batch prover.

Detailed documentation can be found in TEE.md.

@jonas089 jonas089 self-assigned this Jan 9, 2026
@jonas089 jonas089 added the enhancement New feature or request label Jan 9, 2026
@jonas089 jonas089 linked an issue Jan 9, 2026 that may be closed by this pull request
@jonas089 jonas089 force-pushed the jonas/tee-prover-service branch from a6bccf7 to 87ca68d Compare January 12, 2026 14:47
@jonas089 jonas089 marked this pull request as ready for review January 13, 2026 16:05
@jonas089 jonas089 requested a review from damiannolan January 13, 2026 16:05
Copy link
Collaborator

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

Nice work, in terms of the prover service integration looks clean enough to me, but I need to get a better understanding of the flow overall.

Ok(Self {
grpc_address: "127.0.0.1:50051".into(),
rpc: RpcConfig::from_env()?,
hyperlane: HyperlaneConfig::default(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the intension is to move everything to a load from env or default pattern then shouldn't we use from_env() here also?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment here, should this be using from_env()?

There was a from_env impl added for CelestiaHyperlaneConfig but I don't see where its being used.

"mailbox": "0xb1c938F5BA4B3593377F399e12175e8db0C787Ff",
"merkleTreeHook": "0x1D957dA7A6988f5a9d2D2454637B4B7fea0Aeea5",
"protocolFee": "0xFCb1d485ef46344029D9E8A7925925e146B3430E",
"protocolFee": "0x1D957dA7A6988f5a9d2D2454637B4B7fea0Aeea5",
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this change correct? I know it shouldn't technically affect the relayer but both addresses for merkle tree hook and protocol fee hook are the same here.

Relayer doesn't care about protocl fee hook (afaik)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here, this should not change

Copy link
Collaborator

Choose a reason for hiding this comment

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

And here too!

@@ -1,5 +1,5 @@
defaultHook:
address: "0xFCb1d485ef46344029D9E8A7925925e146B3430E"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here, I'm not sure that this should change ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This comment still is applicable. This address is being changed for some reason to the same address of the requiredHook below, which is a merkle tree hok.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we put this back before merge

Copy link
Collaborator

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

Prover impl looks good! Nice work.

There's still some comments that need to be addressed before we merge tho.

  • Configuration (see comments on from_env)
  • Reading ELFs from expected relative directory
  • Hyperlane contract address changes
  • Remove any dangling references to "middleware"

Ok(Self {
grpc_address: "127.0.0.1:50051".into(),
rpc: RpcConfig::from_env()?,
hyperlane: HyperlaneConfig::default(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment here, should this be using from_env()?

There was a from_env impl added for CelestiaHyperlaneConfig but I don't see where its being used.

use tracing::{debug, error, info, warn};

#[derive(Deserialize, Serialize)]
struct AttestationRequest {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: can we move this struct after the use crate definition below

Copy link
Collaborator

Choose a reason for hiding this comment

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

How come we are using hex strings over the wire? Is that the best approach?

@@ -1,5 +1,5 @@
defaultHook:
address: "0xFCb1d485ef46344029D9E8A7925925e146B3430E"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This comment still is applicable. This address is being changed for some reason to the same address of the requiredHook below, which is a merkle tree hok.

"mailbox": "0xb1c938F5BA4B3593377F399e12175e8db0C787Ff",
"merkleTreeHook": "0x1D957dA7A6988f5a9d2D2454637B4B7fea0Aeea5",
"protocolFee": "0xFCb1d485ef46344029D9E8A7925925e146B3430E",
"protocolFee": "0x1D957dA7A6988f5a9d2D2454637B4B7fea0Aeea5",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here, this should not change

Copy link
Collaborator

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

Approving! Feel free to merge after the contract addresses are put back for protocol fee hook!

@@ -1,5 +1,5 @@
defaultHook:
address: "0xFCb1d485ef46344029D9E8A7925925e146B3430E"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we put this back before merge

"mailbox": "0xb1c938F5BA4B3593377F399e12175e8db0C787Ff",
"merkleTreeHook": "0x1D957dA7A6988f5a9d2D2454637B4B7fea0Aeea5",
"protocolFee": "0xFCb1d485ef46344029D9E8A7925925e146B3430E",
"protocolFee": "0x1D957dA7A6988f5a9d2D2454637B4B7fea0Aeea5",
Copy link
Collaborator

Choose a reason for hiding this comment

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

And here too!

@jonas089 jonas089 merged commit 2bab70a into main Feb 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: TEE prover service

2 participants