As of Clarinet 2.8.0, devnet can run
the blockchain in Nakamoto mode and support Clarity 3 contracts.
Once the devnet reaches the right block height, (Bitcoin block #108 by default), it will deploy the
pox-4.clar contract and run in Epoch 2.5. From there, Clarinet will send stack-stx and
stack-extend requests to the new PoX contract. In Nakamoto mode, devnet has 2 signers. Eventually,
you can observe the vote-for-aggregate-public-key transactions that they send.
By default, the Devnet will not get to Epoch 3.0 ("Nakamoto activation" with fast blocks). For that,
the epoch_3_0 height as to be set manually in the Devnet.toml file. Using one of your Clarinet
projects, or a new one (with $ clarinet new <project-name>), update the settings/Devnet.toml
with the following settings:
At the end of the Devnet.toml file, you must make sure that the pox_stacking_orders are properly
set. You should have 3 stacking orders from 3 different accounts. All should start at cycle 1
and take at least 2 slots. You also need to enable the auto-extends property. Becasue Nakamoto
relies on the Stackers to sign blocks, these settings ensure that there are engouh stacked STX for
each cycles. Here is what it looks like by default in new projects:
Set a contract to be deployed in epoch 3.0 with Clarity 3. You can create a new one with
$ clarinet contract new <contract-name>). It needs to be manually update in the project manifest
(Clarinet.toml)
Start devnet with clarinet devnet start, you should see epoch 3.0 and fast blocks at Bitcoin
block 144.