Stacks 4.1 and Clarity 7: A Guide to the Proposed SIP
A new draft SIP proposes Stacks epoch 4.1, a hard fork with three parts: Clarity 7, a new sBTC deposit address for miners, and the removal of stacks-on-Bitcoin operations. Clarity 7 would address known issues in how Clarity analyzes and runs contracts. The deposit change would move miner BTC deposits to the pox-5 contract onto a pay-to-taproot multisig address. The third change would remove legacy operations that let users act on Stacks by sending Bitcoin transactions.

The SIP describes most of the Clarity changes as fixes to the implementation, not changes to the language’s intended behavior. Because they would affect which contracts can deploy and how some transactions resolve, they could only take effect at an epoch boundary. Like any consensus change, the proposal goes through Community Advisory Board review and a community vote before it can be activated.
Proposed Clarity 7 Changes
Clarity’s type checker is meant to ensure that a value’s type at analysis matches its type at runtime. The SIP identifies edge cases where that did not hold and proposes fixes in four areas.

Type-checking soundness. According to the SIP, the checker accepted some code whose runtime values didn’t match their declared types. Examples:
  • Two tuples with different fields could merge into a narrower type, letting a hidden field travel through merge, is-eq and lists.
  • fold over an empty sequence could return a value of a type the checker never accounted for.
  • Extra arguments passed to a function were never type-checked but were still evaluated, which could trigger an early return. Under the proposal, extra arguments would fail analysis for user-defined and native functions alike.
Analysis and runtime agreement. The analyzer and the runtime sometimes read the same code differently. The proposal would align them:
  • let names would be checked against every global name, not only function names.
  • A contract could call its own traits during deployment, which currently fails with NoSuchContract.
Consistent value limits. Rules that apply to values built in Clarity would apply to values from any source:
  • from-consensus-buff? would return none for tuples with missing, extra or duplicate fields.
  • Contract names over 40 bytes would be rejected everywhere, including transaction arguments and NFT post-conditions.
Errors and costs. Some failures cause a transaction to be rejected outright when, per the SIP, it should be included in a block as a failed, fee-paying transaction. The proposal would continue the conversion started in SIP-039. It would also charge costs for all work performed, including type checking of contracts that fail analysis and the identifiers carried by trait and contract principal values.

Under the proposal, analysis changes would apply only to contracts deployed after activation. Runtime changes, such as the new cost charges, would apply to all contracts.
Proposed latest-version-only contract deploys
Today, a developer can choose which Clarity version a new contract uses. The SIP proposes removing that choice: after activation, every new contract would deploy with the latest version, starting with Clarity 7.

The SIP’s stated rationale is more consistent type checking and runtime behavior across new contracts. Existing contracts would keep the version they were deployed with.
Proposed sBTC deposit address for miners
Since epoch 4.0, miners send BTC to the pox-5 contract through an sBTC deposit address built from the sBTC signers’ aggregate key. The SIP proposes a new address that requires a set number of sBTC signers to approve, built from each signer’s own key instead of one shared key.

If adopted, the switch would happen in the first reward cycle that starts after epoch 4.1 activates. Technical details are in sbtc#2142.
Proposed removal of stacks-on-Bitcoin operations
Since Stacks 2.0, some Stacks actions, such as transferring or stacking STX, could be done by sending a Bitcoin transaction. These operations were never implemented for PoX-5, so there is no way to stake through a Bitcoin transaction today, and the versions built for PoX-4 no longer work. The SIP proposes removing these operations in epoch 4.1.

If you currently rely on any stacks-on-Bitcoin operation, please say so in the discussion so it can be considered during review.
Who would be affected
Group
Proposed Change
What to Review
Contract Developers
New deploys would use Clarity 7 only; some edge-case code that passes analysis today would fail
Test contracts against Clarity 7
Wallets and dev tools
Versioned contract deploys would be removed
Deploy flows that set a Clarity version
Tools that watch PoX-5 deposits
Miners would move to the v2 P2TR multisig deposit address
Monitoring for the new address format
Anyone using stacks-on-Bitcoin operations
These operations would be removed
Any flow that sends Stacks actions via Bitcoin transactions
Node operators and miners
Hard fork
Upgrade path to a 4.1-ready release if the SIP activates
Users and existing contracts
Mostly unaffected; updated cost accounting would apply to all contracts
No action expected
What's Next
The SIP is in draft and open for review at github.com/stacksgov/sips/pull/284. Before it can activate, it goes through Community Advisory Board review and a community vote. The reference implementation is in progress in the main branch of stacks-core.

Voting dates and the discussion link are not yet set. Questions and feedback are highly encouraged via the SIP's pull request.