I’m running into a blocking issue across all Midnight contracts, and it seems like a broader toolchain inconsistency rather than a local setup problem.
1) Runtime Version Mismatch (default state)
Out of the box, all contracts fail with:
CompactError: Version mismatch: compiled code expects 0.15.0, runtime is 0.14.0
Observations
-
Contracts appear to be compiled against
compact 0.15.0 -
But dependency resolution installs
@midnight-ntwrk/compact-runtime 0.14.0 -
Happens across fresh installs and multiple example repos
2) After Manually Fixing Runtime → New Failure
If I manually upgrade:
@midnight-ntwrk/compact-runtime → 0.15.0
The version mismatch is resolved, but deployment still fails, now with:
Error: Unexpected error: Error: expected instance of ContractMaintenanceAuthority
Stack trace (excerpt)
at set maintenanceAuthority (.../midnight_onchain_runtime_wasm_bg.js:1365:9)
at ContractExecutableImpl.<anonymous> (.../ContractExecutable.ts:337:49)
Environment
-
Node.js: v24.14.0
-
Clean install (
rm -rf node_modules && npm install) -
Reproducible across multiple contracts (e.g.
hello-world) -
Using preprod + proof server (working correctly)
Key Insight
There seems to be no version alignment across the stack, specifically between:
-
compact -
@midnight-ntwrk/compact-runtime -
@midnight-ntwrk/compact-js -
@midnight-ntwrk/onchain-runtime-v3 -
@midnight-ntwrk/midnight-js-*
Fixing one layer (runtime) exposes incompatibility in another (onchain runtime / contract execution).
Questions
-
Is there an official version matrix for the full toolchain?
-
Are the current example repos out of sync with the latest releases?
-
What is the correct set of versions that actually works end-to-end?
-
Is this related to a recent upgrade to
0.15.xthat hasn’t been propagated fully?
Why this matters
Right now:
-
Default setup →
fails -
Manual fix →
still fails differently
This effectively blocks:
-
New developers onboarding
-
Contract deployment even for basic examples
Happy to help debug further or test fixes, but would really appreciate clarity on the correct version alignment.
At the moment, the toolchain feels internally inconsistent — fixing one layer just exposes another break. Would be great to get a canonical “known working setup”.