The code that holds the Pool, runs every Crossing and admits each enclave platform is on chain as hashes, and each one rebuilds from its tagged source to the same value. This page rebuilds them on your own machine and names the on-chain value each must equal: the Pool program’s deployed bytecode, the enclave image’s measurement, and the attestation guest whose proof admitted every enclave platform.
The Pool program#
privium_pool builds with solana-verify, which compiles it inside a pinned Docker image, so the same source yields the same bytes on any machine. Each release names its source commit and the base image it was built with.
Read the deployed hash#
WSL or Linux solana-verify get-program-hash -u <RPC URL> BH2ggvL6MxJ96zQhiuCdJDym84kN4RPpkf4bVJgZAVYeBuild the tagged source#
From
backend/program/at the release’s commit, with the release’s base image:backend/program solana-verify build --library-name privium_pool --base-image <base image> solana-verify get-executable-hash target/deploy/privium_pool.soCompare#
The two hashes are equal.
solana-verify verify-from-reporuns both steps from the repository itself:WSL or Linux solana-verify verify-from-repo -u <RPC URL> \ --program-id BH2ggvL6MxJ96zQhiuCdJDym84kN4RPpkf4bVJgZAVYe \ --library-name privium_pool --mount-path backend/program \ --commit-hash <release commit> --base-image <base image> \ <repository URL>
solana-verify runs on Linux and in WSL, with Docker reachable from it. Who can replace the program, and on what terms, is in Trust model.
The enclave image#
The enclave image is everything the Trust Domain boots: the TDVF firmware, the kernel, the ACPI tables that fix the TD’s topology, and the initramfs holding the Coprocessor. The repository builds the initramfs from source and pins every other part by its SHA-256; a measurement tool then replays the boot over that set and prints the registers a hardware quote of it reports, with the Registry digest they make (The measurement).
What a build takes#
An inputs file names every part of the image, in the fields of backend/scripts/tdx/inputs.example.json. Paths are relative to the file, every file carries its SHA-256, and the build stops on any file that differs. Each release publishes, as the release’s assets beside its tagged source, its inputs file, every binary input that file pins (the TDVF firmware, the kernel, the ACPI tables, the rootfs files and the tdx-measure binary), and its own build-manifest.json, measurement.json and source-identity.json.
| Field | Pins |
|---|---|
sourceCommit, sourceDateEpoch |
the source revision, and the timestamp every initramfs member carries |
firmware.fd |
the TDVF virtual firmware |
vmlinuz |
the kernel |
acpi.bin, rsdp.bin, table-loader.bin |
the TD’s ACPI tables, which fix its topology and enter RTMR0 |
cpus, memory, xfam |
the TD’s shape, and its XFAM as little-endian hex |
cmdline |
the kernel command line, console=ttyS0 rdinit=/init panic=-1 |
tdx-measure |
the measurement tool |
rootfs |
bin/sh, bin/mount, the dynamic loader and shared libraries the Coprocessor links, and the public configuration in etc/privium/ (runtime.env, attestation.json, pool.json, council.json), each with its file mode |
The measurement tool is VIRTEE’s tdx-measure at source commit 08fc6201b576e8f19a16252125f416d8203a93a3, its CLI built with its own lockfile. A copy you build yourself from that commit replays the same registers; with its hash in your inputs file, only the tool’s entries in the build manifest change.
Check out the source#
Check out the release’s source commit and download the release’s assets beside it. The commands run from
backend/.Build the image#
With Node and Docker:
backend node scripts/tdx/build.mjs /path/to/inputs.json /path/to/outputThe build runs for
linux/amd64in three pinned stages. The first, on Python 3.13.8 pinned by its image digest, hashes every source file it copies fromcoprocessor/,program/andscripts/tdx/intosource-identity.json, whose digest is the build’ssourceTreeSha256. The second, on Rust 1.99.0 pinned by its image digest, vendors every cratecoprocessor/Cargo.locknames and compiles the Coprocessor offline with one codegen unit, remapped paths and no build ID. The third runs with no network: it checks every input’s hash and writes a newc initramfs with entries sorted by path, fixed inode numbers, owner and group 0 andsourceDateEpochon every member. The output directory holdsinitramfs.cpio,metadata.json,build-manifest.json,source-identity.json,build-command.jsonand the pinned inputs. SettingsourceTreeSha256in the inputs file makes the build require that exact source tree.Measure it#
On Linux, where the measurement tool runs:
backend node scripts/tdx/measure.mjs measure /path/to/output/build-manifest.json /path/to/output/measurement.jsonThe wrapper re-hashes every artifact and the tool against the manifest, runs
tdx-measure --json metadata.jsonover the direct-boot sequence, and writesmeasurement.json:mrtd,rtmr0,rtmr1,rtmr2andxfamin hex,registryDigest, which is , andbuildManifestSha256.
Compare with the chain#
| From your build | Compare with |
|---|---|
registryDigest |
an entry in the Registry’s measurements, the measurement on /trust, and for a measurement added after initialization its MeasurementProposal |
mrtd, rtmr0, rtmr1, rtmr2, xfam |
the quote in each register_enclave transaction of that measurement, at the offsets below |
sourceTreeSha256 |
the source_commit of the measurement’s MeasurementProposal, and the release’s source-identity.json |
SHA-256 of your build-manifest.json |
the proposal’s manifest_digest, and the SHA-256 of the release’s build-manifest.json |
binarySha256 and each artifact hash in build-manifest.json |
the release’s build-manifest.json, and any other build of the same commit and inputs |
The secp256r1 instruction just before each register_enclave holds the quote’s 632-byte header and TD report body, the message the attestation key signed, from byte 113 of its data to the end. The measured fields sit at these bytes of that message:
| Field | Bytes |
|---|---|
| XFAM | 176..184 |
| MRTD | 184..232 |
| RTMR0 | 376..424 |
| RTMR1 | 424..472 |
| RTMR2 | 472..520 |
measurement.json marks its values offline-prediction; the quote is the hardware’s own report. register_enclave computed the Registry digest from that quote when it admitted the key, so a digest equal to yours means the processor reported the registers you built. To digest registers read from a quote yourself, put mrtd, rtmr0, rtmr1, rtmr2 and xfam as hex in a JSON file and run:
node scripts/tdx/measure.mjs digest registers.json
The platform attestation guest#
Every enclave platform enters the Registry through a Groth16 proof that one program, the attestation guest, checked the platform’s whole Intel collateral: the PCK certificate chain to Intel’s root, the revocation lists, the TCB level and the Quoting Enclave identity (Attestation). The program verifies that proof only under VerifierConfig: the guest’s identity, the SHA-256 of Intel’s root certificate and the SP1 Groth16 verifying key. Rebuilding the guest recomputes all three, with no quote, collateral or proof.
The guest is pinned to SP1 5.2.4 and dcap-qvl 0.6.6. Its export builds inside the official SP1 5.2.4 image, pinned by its digest, from the checked-in lockfiles. With Docker, from backend/program/attestation-guest/ at the release’s commit, and Intel’s root certificate fetched from Intel:
node build.mjs /absolute/path/to/intel-root.der ../../.local/mainnet/attestation
The output directory must be inside backend/. The export runs with no network and writes privium-attestation-guest.elf, platform.verifier.json and SHA256SUMS, the hashes of the two.
In platform.verifier.json |
Compare with |
|---|---|
guest_id |
guest_id in VerifierConfig |
root_hash |
root_hash in VerifierConfig, and the SHA-256 of the root certificate you fetched |
alpha, beta, gamma, delta, ic |
the same fields in VerifierConfig |
Then read each Platform record: verifier names that VerifierConfig and dev is false, and the Registry’s allow_dev_platforms is 0, a value fixed when the Registry was initialized. Equal values mean every platform in the Registry was admitted by the code you just built, against the Intel root you fetched yourself.