You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specs/flashtestations.md
+93Lines changed: 93 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -670,3 +670,96 @@ To establish trust in expected measurements, the TEE block builder must be built
670
670
4.**Verification**: Independent parties can follow the build process and verify that it produces the same measurements
671
671
672
672
This allows anyone to verify that the expected measurements correspond to the published source code.
673
+
674
+
## Block Builder TEE Proofs
675
+
676
+
The Flashtestations protocol can be extended to provide cryptographic guarantees that blocks were constructed by an authorized TEE-based block builder. This section describes how block builders running in a TEE can prove block authenticity through an onchain verification mechanism.
677
+
678
+
### Core Mechanism
679
+
680
+
The block builder TEE proof system works through a final transaction appended to each block. This transaction:
681
+
682
+
1. Calls a designated smart contract method that accepts a block content hash
683
+
2. Verifies the caller's authorization using `isAllowedPolicy(block_builder_policy_id, msg.sender)`
684
+
3. Provides cryptographic evidence that the block was constructed by a valid TEE-based block builder
685
+
686
+
The key insight is that the required private key to sign this transaction is protected within the TEE environment. Thus, only a genuine TEE-based block builder with the proper attestation can successfully execute this transaction.
687
+
688
+
### Block Building Process
689
+
690
+
When building a block, the TEE block builder:
691
+
692
+
1. Produces a block according to the L2 protocol rules
693
+
2. Computes the block content hash using the `ComputeBlockContentHash` function:
694
+
695
+
```solidity
696
+
function ComputeBlockContentHash(block, transactions) {
697
+
// Create ordered list of all transaction hashes
698
+
transactionHashes = []
699
+
for each tx in transactions:
700
+
txHash = keccak256(rlp_encode(tx))
701
+
transactionHashes.append(txHash)
702
+
703
+
// Compute a single hash over block data and transaction hashes
704
+
// This ensures the hash covers the exact transaction set and order
0 commit comments