Skip to content

Add block builder tee proofs #236

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

Draft
wants to merge 1 commit into
base: flashtestations
Choose a base branch
from

Conversation

fnerdman
Copy link
Collaborator

Adds a section on how flashtestations will be used as block proofs. not sure if we should add. Pros: adds to the bigger picture, implementation is easy once we have flashtestations, so we could add it to the current cycle. Cons: somewhat diverts from the path of trying to present a spec that can universally and transparently track attestations and their TTL.
Don't merge for now, needs feedback.

Copy link

vercel bot commented May 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
rollup-boost ⬜️ Ignored (Inspect) Visit Preview May 19, 2025 0:24am

@fnerdman fnerdman force-pushed the add-block-builder-tee-proofs branch from 182e53a to ecebf4e Compare May 19, 2025 12:24
@ferranbt
Copy link
Collaborator

Does this one go on top of #232 ?

@fnerdman fnerdman changed the base branch from main to flashtestations May 19, 2025 19:40
@dmarzzz
Copy link
Member

dmarzzz commented May 20, 2025

let's close this for now imo @fnerdman , when @avalonche starts implementing we can add this in

Copy link

@Melvillian Melvillian left a comment

Choose a reason for hiding this comment

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

High level looks good 👍 but I have some comments on specific parts.

// 1. The caller is a registered address from an attested TEE
// 2. The TEE is running an approved block builder workload (via policy)

// Additional validation can be performed on the blockContentHash

Choose a reason for hiding this comment

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

What validation would this be? I can't think of anything useful we can do with a nonstandard hash like the one we have here. Solidity doesn't have retrospection so we can't look at the previous transactions to validate the blockContentHash onchain; all we can do is rely on the TEE to correctly compute this hash.

If we can't think of anything, can we remove this comment so it's not ambiguous what we mean here? That would simplify things for implementers


```solidity
// Block builder verification contract
function verifyBlockBuilderProof(bytes32 blockContentHash) external {

Choose a reason for hiding this comment

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

I think we should add a uint8 version argument here, so we can easily communicate the version of flashtestations this verification is meant for. Without this for example, if we later decide that we want to we want to change how the blockContentHash is calculated, then we'll have no way to communicate to offchain verifiers how to recompute the blockContentHash offchain.

The downside of this is that it will slightly increase L1 gas cost because of the additional calldata. But it's just a single 8-bit value, so it's very little.


// Additional validation can be performed on the blockContentHash

emit BlockBuilderProofVerified(

Choose a reason for hiding this comment

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

we should add version here (see above comment)

For rollup systems, this proof mechanism:

1. Can be included as the final transaction in each block
2. Enables L1 contracts to verify that blocks were built by authorized TEEs

Choose a reason for hiding this comment

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

Is this possible? L1 contracts do not have access to the EIP-4844 blobs that (see this explainer on EIP-4844 specifically the wording "Blobs are persisted in beacon nodes, not in execution layer").

If we want to expose this data to L1's, we'd need some way to bridge this transaction call to the L1. Maybe we want to do that, but it'll increase the gas cost of this (which we want to keep as cheap as possible).

I think we should remove this line for now, as it's not clear it's possible.

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.

4 participants