Skip to content

build(toolchain): bump compact toolchain to 0.34.0 - #841

Merged
0xisk merged 7 commits into
mainfrom
build/compact-toolchain-0.34
Sep 1, 2026
Merged

0xisk merged 7 commits into
mainfrom
build/compact-toolchain-0.34

Conversation

@0xisk

@0xisk 0xisk commented Sep 1, 2026

Copy link
Copy Markdown
Member

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Unblocks #827: 0.34.0 ships the keccak256 primitive and fixes the
keccak256/secp256k1 compiler crashes (compact#608, compact#609).

Extracted from feat/multisig-eip712-keccak so the toolchain migration is
reviewable on its own; the EIP-712 work rebases onto this once it lands.

Not visible in the diff:

  • Conflicts against build(deps): batch open Dependabot bumps #832, refactor(test-utils): remove createEitherTestUser #688 and test: run remaining categories live and unify shielded-key fixtures #694 resolved by keeping main's newer biome,
    turbo, @tsconfig/node24 and @vitest/coverage-v8 pins, and taking the
    toolchain pins from the bump. The lockfile was regenerated once rather than
    merged.
  • The @midnight-ntwrk/wallet-sdk-facade 4.0.1 resolution is dropped, and the
    harness wallet-sdk imports move to the un-hyphenated @midnightntwrk scope:
    the 4.x pin existed only to keep the old live harness loading, and the stack
    moves to midnight-js 5.0.0-beta.7.
  • @midnight-ntwrk/ledger-v8@midnightntwrk/ledger-v9. The scope really
    does lose its hyphen; that is the new package name, not a typo.
  • compact-cli is bumped explicitly to ^0.0.3 because caret on a 0.0.x
    version does not float, so the old pin could never resolve today's release.
  • Dry suites, full compile, and typecheck ran green against the published
    simulator 0.4.0. The live suites have not run on the new rc stack yet;
    that verification happens separately this week and ships as a patch release
    if it catches anything.

PR Checklist

Migrate the library to the 0.34.0 toolchain: pragma language_version
>= 0.26.0 across contracts and mocks, compact-runtime 0.19.0,
compact-js 2.5.5-rc.8, midnight-js 5.0.0-beta.7, ledger-v9 1.0.0-rc.3,
and the CI setup pin. Unblocks keccak256 work (#827): 0.34.0 ships the
primitive and fixes the keccak256/secp256k1 compiler crashes
(compact#608, compact#609).
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

@0xisk 0xisk linked an issue Sep 1, 2026 that may be closed by this pull request
The async simulator this branch needs is on npm now, so the local
file: pin to the compact-tools worktree goes away and yarn resolves
^0.4.0 from the registry. Recorded in the CHANGELOG toolchain entry.
The indexer 4.4.0-rc.2 image runs an spo-indexer subprocess that
dials spo_node.url, defaulting to ws://localhost:9944. Nothing
listens there inside the container, so the subprocess dies and
takes the whole indexer down. Point it at the node service;
blockfrost_id stays a non-empty placeholder since SPO features
are unused on the local devnet.
Caret ranges on 0.0.x pin the exact patch, so ^0.0.2 never picks up
today's compact-cli 0.0.3 (which pulls compact-builder 0.0.4). Bump
explicitly to compile with the current tooling line.
@0xisk
0xisk marked this pull request as ready for review September 1, 2026 17:05
@0xisk
0xisk requested review from a team as code owners September 1, 2026 17:05
The JubjubScalar parameter types now carry the range guarantee the
negation comment used to derive, and the local is a scalar, not a
Field. No circuit change.
The 5.0.0-beta.7 stack ships the wallet-sdk family under the
un-hyphenated @midnightntwrk scope, so the old-scope import no longer
resolves. Declare the package instead of relying on hoisting.
@0xisk
0xisk force-pushed the build/compact-toolchain-0.34 branch from 5e21380 to d742ec6 Compare September 1, 2026 17:08
@0xisk
0xisk merged commit c86b1dd into main Sep 1, 2026
8 checks passed
@0xisk
0xisk deleted the build/compact-toolchain-0.34 branch September 1, 2026 17:35
Comment thread CHANGELOG.md

### Changed

- Upgrade the Compact toolchain and Midnight dependencies: compiler `0.31.0` → `0.34.0`, `@midnight-ntwrk/compact-runtime` `0.16.0` → `0.19.0`, `@midnight-ntwrk/ledger-v8` `8.1.0` → `@midnightntwrk/ledger-v9` `1.0.0-rc.3`, `@midnight-ntwrk/compact-js` `2.5.1` → `2.5.5-rc.8`, the `midnight-js` packages `4.1.1` → `5.0.0-beta.7`, and `@openzeppelin/compact-simulator` `^0.3.1` → `^0.4.0`. Contract `pragma language_version` raised `>= 0.23.0` → `>= 0.26.0` (the language version shipped with compiler 0.34.0). (#841)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth defining what should go in the changelog at some point. To me, dev dep changes aren't important for users, they only matter for development. The important things to note are bumping the compiler and language version

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can also be seen in the PR so it's not worth restating so much. That's my style on this though. If we did want to include every major detail like this, I suggest trying to make it more organized and readable e.g.


Upgrade the Compact toolchain and Midnight deps

  • compiler 0.31.00.34.0
  • @midnight-ntwrk/compact-runtime 0.16.00.19.0
  • etc

// OpenZeppelin Compact Contracts v0.3.0-alpha.2 (access/AccessControl.compact)

pragma language_version >= 0.23.0;
pragma language_version >= 0.26.0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not in the diff so I can't highlight it, but most, if not all, of the constraints are incorrect from the bump. Yet another reason to consider #829

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^Addressed on #869

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.

dev: upgrade the Compact toolchain to 0.34.0

3 participants