OpenZeppelin / OpenZeppelin/compact-contracts
dev: single-source the Compact toolchain version
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 29
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 25
Description
Problem
The Compact compiler version is pinned in three places that can drift apart, and nothing detects it:
| Where | Version |
|---|---|
.github/actions/setup/action.yml:39 |
0.31.0 |
.github/workflows/release.yml:56 |
0.31.0 |
README.md badge + install snippet |
0.31.0 |
a current local compact update |
0.31.1 |
So CI and local developers compile with different compilers, silently.
Why it matters
Compatibility pins (golden digests, ledger layout, circuit surface) are computed from whatever the local toolchain produced. If a patch bump ever changes codegen, a locally green suite can be red in CI, or worse the reverse.
Verified benign today: rebuilding MockConfidentialNoteFungibleToken under 0.31.0 and 0.31.1 gives byte-identical digests, ledger layout, and circuit surface. This is a latent trap, not a live break.
Proposal
Single-source the version so CI, release, docs, and local installs cannot disagree:
- One file (e.g.
.compact-version) read by the setup action, the release workflow, and acompact updatehelper script. - Generate or check the README badge and snippet from it.
- Optionally fail CI when the built artifact's
compiler-versiondiffers from the pin.
Acceptance criteria
- Exactly one place declares the compiler version.
- CI, release, and README derive from it.
- A mismatch between the pin and the built artifact's
compiler-versionis visible rather than silent. - Documented supported range, or the pin bumped to
0.31.1so CI and local agree.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the version declarations in .github/actions/setup/action.yml, .github/workflows/release.yml, and the README.md badge and install snippet, then inspect how the current local compact update works. Define the single source and how CI and release consume it, including the artifact compiler-version check. Done means the acceptance criteria hold without version drift.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- build-system, ci-cd, release, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100