Build manifest
See what a build trusts and which contract checks it keeps, with sakura build --manifest.
sakura build --manifest writes a file describing a build: which code it trusts without
checking, and which contract checks it keeps at run time. Reviewers and release tools read it
to see what a build relies on.
sakura build --manifest src
sakura build --target wasm --manifest srcA successful build writes its output to target/sakura/js (or target/sakura/wasm) and the
manifest to target/sakura/manifest.json, relative to the working directory. --out-dir
changes the output directory; the manifest path stays target/sakura/manifest.json.
--emit lir writes no manifest. A failed build does not write a new manifest, so check the exit
status before reading an existing file.
What is in it
The manifest is one JSON object with:
schema_version: "1.1",kind: "manifest",target(jsorwasm: the build target, and the verification profile its statuses were obtained for) and the inputsnapshothash. Version 1.1 addedtarget.compiler.versionandcompiler.git; a local build may have a nullgit.trusted: the trusted base, everything the build relies on without the compiler checking it. That is the compiler, the runtime (with its SHA-256), the standard library's host bindings, your@externaldeclarations,@trustreasons and@totaldeclarations. The JavaScript runtime issakura_runtime.js. A WebAssembly build listssakura_rt.wasm(linked intomain.wasm), the Node hostsakura_wasm_host.jsand thesakura_runtime.jsit delegates to.obligations: one entry per contract clause, with an ID, symbol ID, clause, status and source span. A build marks a clauseprovedonly when it removed all of that clause's checks using matching authenticated proofs fromsakura verify; every other clause isruntime_checked. A WebAssembly build removes the checks proved bysakura verify --target wasm(thei64profile), and a JavaScript build those proved on thejsprofile.
An obligation ID is o: followed by a digest of the symbol, the clause name and the normalized
predicate, so editing only a function's body keeps its obligation IDs. That ID does not decide
whether a stored proof is still valid: verification also tracks bodies and other dependencies.
The manifest records assumptions and run-time checks; it does not certify the program. See
sakura verify for proof statuses, the proof cache and which checks a
build can remove.
Last updated