build(toolchain): bump compact toolchain to 0.34.0 - #841
Conversation
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).
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
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.
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.
5e21380 to
d742ec6
Compare
|
|
||
| ### 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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.0→0.34.0 @midnight-ntwrk/compact-runtime0.16.0→0.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; |
There was a problem hiding this comment.
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
Types of changes
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-keccakso the toolchain migration isreviewable on its own; the EIP-712 work rebases onto this once it lands.
Not visible in the diff:
turbo,
@tsconfig/node24and@vitest/coverage-v8pins, and taking thetoolchain pins from the bump. The lockfile was regenerated once rather than
merged.
@midnight-ntwrk/wallet-sdk-facade4.0.1resolution is dropped, and theharness wallet-sdk imports move to the un-hyphenated
@midnightntwrkscope: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 reallydoes lose its hyphen; that is the new package name, not a typo.
compact-cliis bumped explicitly to^0.0.3because caret on a0.0.xversion does not float, so the old pin could never resolve today's release.
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