V0.7 to V0.8 Migration (Draft)
Status: draft. V0.8 is in active development. Nothing on this page is final. This stub exists so you can plan ahead — concrete migration steps will land alongside the V0.8 RC1 release.
V0.7 will remain the supported stable line through the V0.8 RC cycle. You do not need to migrate immediately — but if you are starting a new project today and will ship after V0.8, reading this page now will save a rewrite.
Tracking V0.8
Follow progress on the GitHub milestone:
The milestone tracks every breaking change, design discussion, and RC ship date. When V0.8 RC1 is tagged, this page will be rewritten with precise migration steps, a covenant migrate --target 0.8 command, and test-suite updates. Until then, treat the section below as directional.
What the V0.8 migration will cover
The release themes driving this version:
1. WASM target stabilization
V0.7 shipped WASM codegen as experimental behind --target wasm32-covenant --unstable. V0.8 stabilizes the target and wires it into covenant build without the unstable flag. Expected migration work:
- Remove
--unstablefrom CI scripts. - Update
covenant.toml[build.target]entries — the stable target name will bewasm32-covenant. - Re-generate client bindings; the ABI layout for
bytesparameters is changing slightly to match the ABI stability guarantees.
2. New @async_action keyword
V0.8 introduces a first-class notion of asynchronous actions — actions that span multiple blocks, receive callbacks from cross-chain messages, or await off-chain computation such as ZK proofs or FHE decryption results. Today these patterns are expressed by hand using state machines; V0.8 replaces them with:
@async_action
action redeem(id: u64) {
let proof = await zk_prover.verify(id)
given proof.valid or revert_with InvalidProof()
_settle(id)
}
Code that currently implements the state-machine-by-hand pattern will be convertible via covenant migrate --rewrite async_pattern.
3. Revised FHE API for BFV parameter selection
V0.7 requires BFV parameter selection (polynomial degree, modulus chain, plaintext modulus) to be specified up-front per contract. V0.8 introduces:
- A
fhe_paramslanguage-level declaration that the compiler validates against the set of operations the contract performs. - Automatic parameter upgrade paths when a contract adds an operation that exceeds the current depth budget.
- Deprecation of the
fhe::bfv::manual_params(...)intrinsic in favor of the declarative form.
Contracts that use only the standard encrypted<T> operators and do not call manual_params(...) will migrate without changes.
4. Compiler diagnostic format changes
V0.8 replaces V0.7’s plain-text diagnostic output with a structured format compatible with the Language Server Protocol, and emits machine-readable JSON under --message-format=json. CI pipelines parsing compiler output will need updates — the covenant migrate tool will emit a hint whenever it detects the legacy format being grepped.
Placeholder: likely breaking changes
The following table is indicative, not final. Treat it as the shape of things to expect.
| Area | V0.7 | V0.8 (planned) | Notes |
|---|---|---|---|
| WASM build target | wasm32-covenant-experimental | wasm32-covenant | Flag rename; same binary layout |
| Async patterns | hand-written state machine | @async_action + await | Auto-rewriter in covenant migrate |
| FHE param selection | fhe::bfv::manual_params(...) | fhe_params { ... } declaration | Manual form deprecated, not removed |
| Compiler output | plain text | structured JSON via --message-format | CI grep will need updating |
What is not changing
To set expectations for existing V0.7 code:
- Core syntax —
contract,action,field,guard,given,revert_with— is stable. - The ERC-20
token { ... }block shape is stable. - Decorators (
@nonreentrant,@pausable,@upgradeable) are stable. amount,u256,timestamp,encrypted<T>remain first-class and source-compatible.
In practice, most V0.7 contracts will compile on V0.8 unchanged. The migration work is concentrated in CI scripts, build configs, and FHE-heavy contracts that opted out of the default parameter path.
What you can do now
- Pin
language = "0.7"incovenant.tomlif you want to freeze behavior while V0.8 stabilizes. - Avoid
fhe::bfv::manual_params(...)for new code — use the defaultencrypted<T>operators. - Keep custom async/state-machine code isolated so the V0.8 rewriter can find it.
- Subscribe to the V0.8 milestone (link above) for RC announcements.
This page will be fully rewritten with concrete steps and a covenant migrate --target 0.8 walkthrough when V0.8 RC1 ships. Check back then, or watch the milestone for the migration-guide label.