measurement
voynich measurement reads, publishes, deprecates and verifies on-chain Measurement PDAs that bind a 48-byte SHA-384 enclave runtime measurement to its source repository, commit SHA, version and reproducible build recipe hash. How the enclave bundle is built reproducibly is in Reproducible build and recipe; the program account layout is in Program: Accounts.
voynich measurement list --status active
voynich measurement show <96-hex digest>
voynich measurement publish --repo <source_repo> --commit <commit_sha>
voynich measurement verify <96-hex digest> --rebuild --source backend
voynich measurement deprecate <96-hex digest>voynich measurement list#
Lists published on-chain measurement records. Needs no wallet.
voynich measurement list [--status active|deprecated]--status'active' | 'deprecated'Optional filter. When omitted, returns both active and deprecated records.
Prints a paginated { items, page, asOf } object whose items are MeasurementRecord objects.
voynich measurement show#
Reads one published measurement record by its 96-character hex SHA-384 digest. Needs no wallet.
voynich measurement show <digest>Prints the MeasurementRecord JSON, or exits 1 with MEASUREMENT_NOT_FOUND if none exists on chain.
voynich measurement publish#
Publishes a 366-byte Measurement PDA on chain via publish_measurement. Signs with the wallet (--keypair, VOYNICH_KEYPAIR, or the Solana CLI keypair) and pays the PDA rent and transaction fee.
voynich measurement publish \
--repo https://github.com/org/repo \
--commit <7 to 64 hex commit SHA> \
[--recipe enclave/dist/recipe.json] \
[--digest <96-hex SHA-384>] \
[--recipe-hash <64-hex SHA-256>] \
[--version <semver>]When --digest, --recipe-hash or --version is omitted, the command reads recipe.json automatically from --recipe <path> or the first existing default path (enclave/dist/recipe.json, backend/enclave/dist/recipe.json, dist/recipe.json). Explicit flags override values from recipe.json.
--repostring (1 to 128 bytes)requiredSource repository URL or identifier (no whitespace or control characters).
--commitstring (7 to 64 hex chars)requiredSource commit SHA that produced the measurement.
--recipefile pathPath to recipe.json generated by enclave/build.mjs.
--digest96-hex SHA-384Non-zero 48-byte enclave runtime measurement. Defaults to measurement in recipe.json.
--recipe-hash64-hex SHA-256Non-zero 32-byte voynich/enclave-recipe/v1 hash. Defaults to recipeHash in recipe.json.
--versionstring (1 to 32 bytes)Release version string (no whitespace or control characters). Defaults to version in recipe.json.
Prints:
{
"measurement": "<Measurement PDA address>",
"digest": "<96-hex SHA-384>",
"transaction": "<transaction signature>",
"status": "active"
}voynich measurement deprecate#
Marks an active Measurement PDA as deprecated via deprecate_measurement. The signing wallet must be either measurement.publisher or Config.admin (otherwise UNAUTHORIZED).
voynich measurement deprecate <digest>Prints the updated MeasurementRecord with status: "deprecated".
voynich measurement verify#
Checks a published measurement against the chain and against either a local recipe.json or a fresh clean rebuild from source. Needs no wallet.
voynich measurement verify <digest> [--recipe <path>] [--source <dir>] [--rebuild]digest96-hex SHA-384, first argumentrequiredThe measurement digest to verify.
--recipefile pathPath to a local recipe.json to compare against (default search: enclave/dist/recipe.json, backend/enclave/dist/recipe.json, dist/recipe.json under --source or cwd). Ignored when --rebuild is set.
--sourcedirectory pathDirectory containing the checkout (enclave/build.mjs, backend/enclave/build.mjs, or build.mjs) for --rebuild, or the base directory for default recipe.json lookup.
--rebuildflagImports enclave/build.mjs and runs a clean build into a temporary directory, computing fresh measurement (SHA-384) and recipeHash (SHA-256) directly from source and removing the temporary directory afterward.
The command:
- Reads the
MeasurementRecordfromGET /v1/measurements/{digest}. - Against a cluster (
!config.fixture), fetches the on-chainMeasurementPDA (measurementPda(digest, config.programId)), decodes it withdecodeMeasurementAccount, and confirms every field matches (onChainMatch). - Compares the local or rebuilt SHA-384 against
record.digest(digestMatch) and the local or rebuilt SHA-256 againstrecord.recipeHash(recipeMatch). - Sets
verified = (status === "active" && onChainMatch && digestMatch && recipeMatch).
Prints JSON on stdout and exits 0 when verified is true, or 1 when verified is false (for example, if the measurement is deprecated or either hash differs):
{
"verified": true,
"digest": "<96-hex SHA-384>",
"recipeHash": "<64-hex SHA-256>",
"status": "active",
"onChainMatch": true,
"digestMatch": true,
"recipeMatch": true,
"sourceRepo": "https://github.com/org/repo",
"commitSha": "<commit SHA>",
"version": "0.1.3"
}