Skip to content

Ship cosigner v0.1.1, and build the dev enclave image - #2

Merged
aruokhai merged 2 commits into
mainfrom
dev-enclave-image
Oct 15, 2026
Merged

aruokhai merged 2 commits into
mainfrom
dev-enclave-image

Conversation

@aruokhai

@aruokhai aruokhai commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

The cosigner moved to vtxos/cosigner. It releases cosigner.wasm built by Nix, and anyone can rebuild a release from its tag and get the same bytes. This repo ships that release and builds the dev enclave image the wallet's e2e runs.

pins.env

  • COSIGNER_RELEASE=v0.1.1 and its sha256 (e3d704c3…). These replace MERLINWALLET_REV.
  • MERLINPLATFORM_REV points at vtxos/platform's merge, which builds against v0.1.1.
  • DEV_RUNTIME_REV is the vtxos/runtime commit the dev image packs from (bf5f804, runtime main). The runtime no longer publishes dev bundles.

release.yml

  • The cosigner job downloads the pinned release and checks its sha256, instead of cloning the wallet and building with a floating stable.
  • The platform check now requires MerlinPlatform to depend on vtxos/cosigner at the same tag.

dev-enclave/ builds the image: the runtime's QEMU dev bundle and the released cosigner in one container.

  • build.sh checks out the runtime at DEV_RUNTIME_REV and packs the bundle itself (dev-enclave.sh --pack).
  • The harness inside is the runtime's own dev-enclave.sh, unmodified. It drives the host's Docker, so the bundle runs from a host directory mounted at the same path inside the container.
  • compose.yml documents how it runs: host network, /dev/kvm and /dev/vsock, the Docker socket, and seccomp:unconfined for AF_VSOCK. It's dev only.

dev-enclave-image.yml boots each image on the runner's KVM before pushing ghcr.io/vtxos/dev-enclave:cosigner-<release>-runtime-<rev>, and prints the digest for the wallet to pin.

What was run (on a KVM workstation)

  • dev-enclave/build.sh packs runtime bf5f804 to PCR0 458969f7…, the same value the runtime's own CI builds. The runtime image is reproducible across machines as of Build the same enclave image on every machine runtime#7.
  • It fetches cosigner v0.1.1 and checks its sha256.
  • The image boots healthy with compose.yml, and down leaves no harness containers behind.
  • The wallet's enclave e2e passes against it, except one wallet-side race that fails the same way with the wallet's own cosigner. See the wallet PR.

After merge

  • Make the ghcr.io/vtxos/dev-enclave package public once, so the wallet's CI can pull it.
  • Not done here: production still pins runtime c2ea60e (flake.lock), which predates telemetry, and cosigner v0.1.1 imports enclave:telemetry. The next production release needs the runtime raised to at least c4a0b96. A new PCR0 or PCR16 also means a store the locked key policy allows.

🤖 Generated with Claude Code

The cosigner is vtxos/cosigner's now, released as cosigner.wasm. A
release here takes those exact bytes, pinned by tag and sha256 in
pins.env, instead of cloning the wallet and building with whatever
stable was that day. MerlinPlatform must build against the same tag.

dev-enclave/ is the image a wallet's e2e boots from compose:
enclave-runtime's QEMU dev bundle and that cosigner in one container,
both pinned here. The harness inside is the runtime's dev-enclave.sh,
unmodified; it drives the host's Docker, so the bundle runs from a host
directory mounted at its own path. The workflow boots each image on
the runner's KVM before pushing it, and prints the digest to pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…v0.1.1

The runtime no longer publishes dev bundles. The image's build.sh checks
out the runtime at DEV_RUNTIME_REV and packs the bundle itself
(dev-enclave.sh --pack). Same commit, same image: the runtime builds its
enclave image the same on every machine, and packing bf5f804 here gives
PCR0 458969f7, as the runtime's own CI does.

The cosigner is v0.1.1, the first release built by Nix, which anyone can
rebuild from its tag and compare. MerlinPlatform moves to the commit
that builds against it.

The entrypoint opens up the bundle it copies into the host directory:
it copies as root, and the host user has to be able to clear it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aruokhai aruokhai changed the title Ship the released cosigner, and build the dev enclave image Ship cosigner v0.1.1, and build the dev enclave image Oct 15, 2026
@aruokhai
aruokhai merged commit ea13c1f into main Oct 15, 2026
1 check 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.

1 participant