Introducing a new way to review your PRs.

Read the announcement

solana-foundation / solana-verifiable-build

CLI tool for deterministically building and verifying executable against on-chain programs or buffer accounts

View on GitHub

18 documents · Updated Nov 23, 2026

docs / repository-automation

Repository automation and releases

Repository automation keeps the verifier fit for use and moves trusted build environments from source control to users. GitHub Actions checks Rust changes, builds release binaries, publishes versioned Docker images, keeps image data current, and links a verifier release to the downstream verified-programs API.

Automation model

The automation has four related goals: block unsafe changes, create repeatable release outputs, distribute the environments used by verification, and keep generated trust data aligned with those environments. Most jobs run only when requested, while pull-request checks and selected maintenance jobs also respond to repository changes.

flowchart LR
    Change[Source or Dockerfile change] --> Checks[CI checks]
    Checks -->|accepted change| Release[Release workflow]
    Release --> Crate[crates.io package]
    Release --> Binaries[GitHub release binaries]
    Release --> API[Verified-programs API update PR]
    Docker[Generated Dockerfiles] --> Images[Versioned container images]
    Images --> Whitelist[Image digest whitelist PR]
    Whitelist --> Verifier[Verifier image selection]

The workflows use signed, automated pull requests for generated updates. Release and image publication use protected credentials from the release-automation environment instead of storing those credentials in the repository. ci-doppler-smoke.yaml provides a manual check that the secret path, Docker login, and read-only API token still work.

Workflow families

The workflow set separates source validation from distribution and maintenance. This separation lets an engineer validate a change without publishing an artifact, while still giving release jobs a clear path from a version to its public outputs.

FamilyMain purposeTypical result
Pull-request CICheck formatting, lint rules, dependency order, and integration behaviorA pass or failure on the proposed change
ReleasePrepare and publish one verifier versionA crate, signed binaries, checksums, and a GitHub release
Docker publishingBuild environments for one or more Solana or Agave versionsVersioned images with provenance attestations
Generated-data maintenanceRefresh Dockerfiles, installer pins, and image digestsSigned pull requests with source-controlled updates
Downstream coordinationCarry a verifier release into the verified-programs APIA pull request in the API repository

References: .github/…/test.yaml• L1-49 .github/…/rust-checks.yml• L1-52 .github/…/release.yml• L1-25 .github/…/publish_dockerfile.yaml• L1-20 .github/…/update_whitelist.yaml• L1-16

Validation and build confidence

CI checks the verifier at two levels. Rust quality checks enforce a consistent source shape and reject compiler warnings, while the integration matrix exercises supported verification paths and build environments. Both checks run before a normal change reaches the default branch.

Rust quality checks

The Rust quality workflow runs on pull requests to master. It checks formatting, Clippy warnings, and Cargo dependency ordering. Its concurrency rule cancels an older run for the same pull request so feedback follows the newest change.

References: .github/…/rust-checks.yml• L3-12 .github/…/rust-checks.yml• L41-52

Integration checks

The integration workflow runs on pushes and pull requests to master, and it can also run manually. It builds the verifier and runs a matrix of named tests. The matrix covers representative Solana program examples, image-based verification, presets, and a current Agave environment. Jobs do not stop when one matrix entry fails, so the run shows the full set of affected paths.

References: .github/…/test.yaml• L1-8 .github/…/test.yaml• L14-26 .github/…/test.yaml• L39-49

Manual artifact builds

The manual build workflow is a utility for producing Linux and macOS binaries from a chosen branch, tag, or commit. It does not change the package version and does not publish a crate or create a release. Each uploaded binary has a SHA-256 checksum so a consumer can check the downloaded file.

References: .github/…/build.yml• L1-14 .github/…/build.yml• L16-27 .github/…/build.yml• L46-65 README.md• L78-83

Verifier release flow

The Release workflow is the canonical path for a verifier release. It turns a semantic version input into one release commit, platform artifacts, a Git tag, a GitHub release, and a crates.io publication. A dry run exercises the preparation, build, and crate publish checks without making the public release changes.

Release preparation

The workflow accepts a version in X.Y.Z form and must run from the default branch. In normal mode it updates the package metadata, checks the locked build, and opens a signed release pull request. It also checks that the requested crate version is not already published. Recovery mode is reserved for a version that crates.io already has and reuses the existing release branch instead of trying to publish that version again.

The release input is anchored in package metadata. Cargo.toml declares the crate identity and version, while Cargo.lock records the resolved dependency set that the release build must use.

References: .github/…/release.yml• L25-41 .github/…/release.yml• L49-97 .github/…/release.yml• L121-167 .github/…/release.yml• L185-216 Cargo.toml• L1-18 Cargo.lock• L3927-3966

Artifact and package publication

After preparation, parallel Linux and macOS jobs build the same release commit and attach checksummed binaries. A separate job confirms that the package version matches the requested release and runs the crates.io dry-run check. In a real run, the final job creates or reuses the vX.Y.Z tag, creates the GitHub release with both binaries and checksums, then publishes the crate as the last normal release action.

sequenceDiagram
    participant Maintainer
    participant Actions as Release workflow
    participant GitHub
    participant Crates as crates.io
    Maintainer->>Actions: Start with version and mode
    Actions->>Actions: Validate version and release state
    Actions->>GitHub: Open or reuse release branch
    Actions->>Actions: Build Linux and macOS artifacts
    Actions->>Actions: Check package publishability
    Actions->>GitHub: Push tag and upload release assets
    Actions->>Crates: Publish package

The workflow keeps reruns safe where possible. It checks an existing tag before pushing and can skip the crate publish step only when recovery mode proves that the requested version is already on crates.io.

References: .github/…/release.yml• L242-330 .github/…/release.yml• L332-394 .github/…/release.yml• L395-496 RELEASE.md• L45-71 RELEASE.md• L91-114

Container environment distribution

The repository distributes versioned Docker environments that match Solana and Agave release lines. A checked-in Dockerfile defines the environment for a version, and publishing automation builds that file, pushes the resulting image to Docker Hub, and records build provenance.

Dockerfile generation

The generator discovers upstream Solana and Agave release tags and creates docker/v<version>.Dockerfile files for supported releases. It selects the matching Rust toolchain image, handles the change from Solana to Agave release sources, and pins installer script checksums. It can create new files or refresh existing files when upstream installer content changes.

The manual generation workflow opens a signed pull request with generated Dockerfile changes. A separate maintenance workflow refreshes installer checksum pins in existing files. These pull requests keep environment changes reviewable before publication.

References: generate_dockerfiles.py• L23-43 generate_dockerfiles.py• L148-214 generate_dockerfiles.py• L282-374 .github/…/generate_dockerfiles.yml• L1-51 .github/…/update_existing_dockerfile_checksums.yml• L1-52

Image publication

The single-image workflow publishes the Dockerfile for one requested Solana version. The changed-image workflow compares two commits, finds changed versioned Dockerfiles, and publishes each changed version in a matrix. Both workflows use the solanafoundation/solana-verifiable-build Docker Hub repository and attach a build provenance attestation to the pushed image.

flowchart TD
    Dockerfile[Versioned Dockerfile] --> Select{Publication scope}
    Select -->|one version| One[Publish one image]
    Select -->|changed files| Many[Publish changed versions]
    One --> Registry[Docker Hub image tag]
    Many --> Registry
    Registry --> Attestation[Build provenance attestation]

The image workflows obtain registry credentials through Doppler and request only the package and identity permissions needed to publish and attest. ci-doppler-smoke.yaml gives maintainers a low-risk way to test this access path without pushing an image.

References: .github/…/publish_dockerfile.yaml• L11-20 .github/…/publish_dockerfile.yaml• L25-67 .github/…/publish_all_dockerfiles.yaml• L12-49 .github/…/publish_all_dockerfiles.yaml• L57-99 .github/…/ci-doppler-smoke.yaml• L1-37

Image whitelist maintenance

The image whitelist links a Solana version to the digest of its published container. The verifier uses this generated data to select a known image rather than trusting a mutable tag. The whitelist updater reads published image tags and digests, keeps only numeric release versions, and writes the Rust image map used by the verifier.

Digest synchronization

The whitelist workflow runs after Docker changes reach master or when a maintainer starts it manually. It creates a signed pull request that updates the generated image map. The workflow therefore creates a review point between image publication and verifier use of the new digest.

Keep the sequence in this order when a Dockerfile changes:

  1. Merge the Dockerfile change.
  2. Publish the image.
  3. Merge the whitelist update pull request.

References: update_image_whitelist.py• L10-31 update_image_whitelist.py• L41-67 update_image_whitelist.py• L69-92 .github/…/update_whitelist.yaml• L3-10 .github/…/update_whitelist.yaml• L37-56 src/image_config.rs• L1-8

Downstream release coordination

A published verifier release also updates the Dockerfile in the separate verified-programs API repository. The coordination workflow accepts the release tag from a published non-preview release or from a manual run, validates its form, and opens a pull request that pins the API image to the same verifier tag.

This link keeps the service that performs remote verification aligned with the CLI release. The workflow checks that the expected install line exists before editing the downstream Dockerfile, so a change in that file's structure fails instead of silently changing the wrong text.

References: .github/…/open-verified-programs-api-pr.yml• L1-20 .github/…/open-verified-programs-api-pr.yml• L23-43 .github/…/open-verified-programs-api-pr.yml• L54-94 RELEASE.md• L73-80

Change checklist

When these files or sections are changed, remember to consider these:

  • A release version change must stay aligned across Cargo.toml, Cargo.lock, the vX.Y.Z Git tag, GitHub release assets, and the crates.io package.
  • A Dockerfile publish change must preserve the version extraction contract used by publish_all_dockerfiles.yaml and the version tag consumed by update_image_whitelist.py.
  • A Docker image change must be followed by publication before the generated image map is merged. Otherwise the verifier can refer to a digest that is not available in the registry.
  • A release tag format change must be coordinated with the downstream API bump workflow, which accepts only vX.Y.Z tags.
  • A generated-file format change must update both the generator and the consuming verifier map contract. Do not hand-edit src/image_config.rs.
  • A credential or permission change must be checked in both the Doppler smoke path and the publish or downstream workflow that uses the credential.

Important failure modes

TriggerConsequenceGuard
Release runs with a version already on crates.io in normal modePreparation stops before a duplicate package publishThe workflow queries crates.io and rejects an existing version
Release uses recovery mode for a version that is not publishedRecovery stops before it can create a partial releaseRecovery mode requires the requested package version to exist
Release tag points to a different commit than the resolved release commitFinalization stops instead of attaching assets to the wrong sourceTag SHA comparison runs before tag reuse
A changed Dockerfile is published before its whitelist updateThe verifier may not accept the new image digestPublish first, then merge the signed whitelist PR
Upstream installer content changes without a checksum refreshA generated environment can fail its pinned installer checkThe checksum maintenance workflow refreshes existing Dockerfiles
The downstream API Dockerfile no longer has the expected install lineThe API bump PR is not createdThe coordination workflow checks the line before editing

Key files

FileWhy to read it
.github/…/test.yamlShows the integration validation matrix for verifier behavior.
.github/…/rust-checks.ymlShows the pull-request quality gate for Rust source changes.
.github/…/release.ymlDefines the canonical release lifecycle from version input to crate publication.
Cargo.tomlDefines the package identity and release version used by Cargo.
Cargo.lockRecords the resolved dependency set used by locked release and CI builds.
RELEASE.mdStates release roles, dry-run behavior, post-release coordination, and recovery rules.
.github/…/build.ymlDefines the manual binary build utility that does not publish a release.
generate_dockerfiles.pyDefines how upstream release data becomes pinned Docker build environments.
.github/…/publish_dockerfile.yamlPublishes one requested Docker environment and its provenance.
.github/…/publish_all_dockerfiles.yamlPublishes all changed versioned Docker environments.
update_image_whitelist.pyConverts registry tags and digests into the verifier's generated image map.
.github/…/update_whitelist.yamlOpens the reviewed update that carries registry state into the verifier.
.github/…/open-verified-programs-api-pr.ymlConnects a published verifier release to the downstream API image.