Skip to content

Conversation

@Melvillian
Copy link
Collaborator

We want to add the commit hash to the Policy because Flashtestations
needs a way to associate a TEE's workloadId with the source code used
to build the TEE image represented by that workloadId. There is no way
to do this that does not involve some sort of onchain permissioned action,
because to do it without permissioned action would require building TEE
images onchain, which is prohibitively expensive. Instead, we settle for
a multisig signer that is permissioned to associate workloadIds with commit hashes.

Offchain verifiers can then use this commit hash to locate the TEE image build source code,
build the TEE image, derive the workloadId, and then compare that locally-built
workloadId with the workloadId in the policy that is associated with the commit hash.
In this way, anyone can reliably prove that a given block is built using source code
that orders transactions in a fair and verifiable manner which is the purpose of flashtestations).

@Melvillian Melvillian requested a review from Ruteri July 22, 2025 19:05
@Melvillian
Copy link
Collaborator Author

This PR is in a bad state because it's trying to build off of this PR in Ruteri's repo: #21

once that merges to flashtestations master this PR will be much cleaner

@Melvillian Melvillian force-pushed the add-commit-hash-to-policy branch from 798b9c7 to a7e083a Compare July 25, 2025 16:33
@Melvillian Melvillian changed the base branch from minimal-example-of-working-onchain-verification-on-ethereum-sepolia to main July 25, 2025 16:34
…o a policy

Completes UNI-835

We want to add the commit hash to the Policy because Flashtestations
needs a way to associate a TEE's workloadId with the source code used
to build the TEE image represented by that workloadId. There is no way
to do this that does not involve some sort of onchain permissioned action,
because to do it without permissioned action would require building TEE
images onchain, which is prohibitively expensive. Instead, we settle for
a multisig signer that is permissioned to associate workloadIds with commit hashes.

The recordLocators part of the metadata makes it easier for verifiers to find the URL from
which to fetch the source code. We provide multiple locators so there is higher availability.

Offchain verifiers can then use this commit hash to locate the TEE image build source code,
build the TEE image, derive the workloadId, and then compare that locally-built
workloadId with the workloadId in the policy that is associated with the commit hash.
In this way, anyone can reliably prove that a given block is built using source code
that orders transactions in a fair and verifiable manner which is the purpose of flashtestations).

fix broken tests

fixed tests
@Melvillian Melvillian force-pushed the add-commit-hash-to-policy branch from a7e083a to 8d99a49 Compare July 25, 2025 16:59
@Melvillian Melvillian merged commit 4fa6018 into main Jul 30, 2025
2 checks passed
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