Hirosystems Clarinet Versions Save

Write, test and deploy high-quality smart contracts to the Stacks blockchain and Bitcoin.

v2.6.0

1 month ago

โœจ Features

  • Devnet in 2.5 by default (#1422) (664b4e82)

๐Ÿงน Chores

  • Update 2.5 constants (#1433) (e2295e11)

๐Ÿ”ง Continuous Integration

  • Use workspace version (#1431) (9440f583)
  • Fix homebrew release (#1425) (887b7a64)

Credits

@hugocaillard @MicaiahReid

v2.5.1

1 month ago

v2.5.0

1 month ago

โœจ Features

  • Improved epoch 2.5 support (#1418) (397d8a49)
  • Enable boot contracts coverage (#1412) (c5709640)
  • Introduce the stacks-codec component (#1399) (83e13831)

๐Ÿž Bug fixes

  • Improve error message in sdk custom matchers (#1417) (a7bd0738)
  • Allow epoch 2.5 in clarinet-sdk (#1414) (19747e38)
  • Allow requirements for contracts deployed with multisig (807c738d)

๐Ÿงน Chores

  • Update dependencies (#1415) (38824a8b)
  • Update pox-4.clar (#1409) (a5b3ffbd)

Credits

@hugocaillard @MicaiahReid

Special thanks to @friedger and @obycode for the bug reports and the great suggestions

v2.4.1

2 months ago

Credits

@friedger

v2.4.0

2 months ago

โœจ Features

  • Upgrade devnet to improve epoch 2.5 handling (7c201d44)
  • Add signers and signers-voting boot contracts (#1386) (05c6a570)
  • Call private function in simnet (#1380) (0288a261)

๐Ÿงน Chores

  • Update pox contracts (#1387) (9adb0f0f)
  • Handle pox-locking in simnet (#1375) (dbc0178a)
  • Update clarity and clarity-wasm (#1372) (ae47f28a)

Credits

@hugocaillard @MicaiahReid

v2.3.1

2 months ago

v2.3.0

3 months ago

โœจ Features

  • Handle deployment plans in simnet (clarinet-sdk only) (#1360) (a340d48a)
  • Improve clarity-wasm results comparison (#1358) (0f9e612a)
  • Enable clarity-wasm in clarity check (#1355) (abc34585)

๐Ÿž Bug fixes

  • Log to devnet.log file when running js devnet (#1363) (388c5018)
  • Remove errors on exit when running devnet with --no-dashboard (#1357) (fad5c763)

๐Ÿงน Chores

  • Update clarinet new project template (#1367) (80be7030)
  • Remove chainhook subcommands (#1328) (1d084ef3)

๐Ÿ”ง Refactors

  • Let @stacks/transactions handle tuple items sorting in tests diff (#1362) (d3138915)

Credits

@diempi @hugocaillard @MicaiahReid @tippenein

v2.2.1

3 months ago

๐Ÿž Bug fixes

  • Devnet pox and stacking (#1350) (bc74e5a6)
  • Wasm build (#1343) (8789d10d)

๐Ÿ”ง Refactors

  • Clippy warnings (#1351) (2497b4c9)

v2.2.0

4 months ago

โœจ Features

  • Upgrade clarity-vm to the Nakamoto version including epoch 2.5 and epoch 3.0 (#1266) (e3ce0c2d)
  • Run clarity-wasm in a separate session in clarinet console (#1330) (fdf400b7)
  • Improved stacking orders (#1331) (b05d453b)

๐Ÿงน Chores

  • Update bitcoin image to 26.0 (#1315) (39c536a4)

๐Ÿ“š Documentation

  • Fix docs url in messaging (#1335) (763f6f99)
  • Update GitHub action format for Clarinet 2.x (#1332) (b3feafbf)

Credits

  • @csgui
  • @hugocaillard
  • @lgalabru
  • @MicaiahReid
  • @obycode
  • @ryanwaits
  • @whoabuddy

nakamoto-preview-1

5 months ago

Running Nakamoto Devnet

The Nakamoto Preview version of Clarinet can be used to run Nakamoto Neon in the Devnet.

Download the right clarinet-cli binary for your OS in the GitHub release, or build from the chore/upgrade-clarity-vm branch.

In a Clarinet project (it can be freshly created with clarinet new <project>), the use_nakamoto option can be set to true:

# settings/Devnet.toml
# [networks]
# ...

[devnet]
use_nakamoto = true

# ...

The use_nakamoto setting will use Nakamoto Docker images for stacks-node and stacks-api.

Make sure that the stacking orders setting at the end of this file are set to start at cycle 2. This will ensure that there are some stacked STXs in pox-4 before the switch to epoch-3.0. Which will happen, by default, at Bitcoin block 121. If the stacking orders are not received before the prepare phase of epoch 3.0's first reward cycle, then 3.0 blocks will not be able to be mined.

# settings/Devnet.toml
# [networks]
# ...

[[devnet.pox_stacking_orders]]
start_at_cycle = 2 # stack some stx in cycle 2
duration = 12
wallet = "wallet_1"
slots = 2
btc_address = "mr1iPkD9N3RJZZxXRk7xF9d36gffa6exNC"

[[devnet.pox_stacking_orders]]
start_at_cycle = 2
duration = 12
wallet = "wallet_2"
slots = 2
btc_address = "muYdXKmX9bByAueDe6KFfHd5Ff1gdN9ErG"

[[devnet.pox_stacking_orders]]
start_at_cycle = 2
duration = 12
wallet = "wallet_3"
slots = 1
btc_address = "mvZtbibDAAA3WLpY7zXXFqRa3T4XSknBX7"

Start the devnet

Start the devnet with clarinet devnet start (or just clarinet integrate which is the "old" alias). The blockchain will do its things and begin to produce Stacks blocks. At Bitcoin block #114, you should see the pox-4 stacking transactions. At Bitcoin block #121, allow some time for the miner to switch to epoch 3.0.0. This is where Nakamoto Neon starts. Note that you will see several Bitcoin blocks with no Stacks blocks during this switchover. Also note that these block numbers could change if you manually modify the configuration.

From there, enjoy the "tenure change" transactions and the fast Stacks blocks. It will basically mine a new Stacks block everytime there's a transaction in the mempool.

Clarity Wasm

This new Clarinet release preview also handles Clarity Wasm in both the Devnet and with the clarinet console

Devnet

Another stacks-node Docker image is available to use Clarity Wasm in the Devnet. You can set this image in the Devnet config. This version of the node will automatically compile and execute Smart Contract deployed after epoch 3.0 with clarity-wasm.

# settings/Devnet.toml
# [networks]
# ...

[devnet]
use_nakamoto = true
stacks_node_image_url = "blockstack/stacks-blockchain:feat-clarity-wasm-next-devnet"

# ...

In your project's manifest (Clarinet.toml), make sure to have a countract that is deployed in epoch 3.0, for example:

[contracts.counter]
path = 'contracts/counter.clar'
clarity_version = 2
epoch = 3.0

clarinet console

The clarinet console will always run the current Clarity interpreter and the new Clarity Wasm runtime side by side, and print the the execution time. It will also print a warning if the results are different. If you see a case where the results are different, please report it to the Clarity-Wasm repo Expect more optimization in Clarity-Wasm soon, but the benefits can already be seen on large transactions. In its current state, it is not unexpected for simple contract calls to be slower in Clarity-Wasm than in the interpreter.

Troubleshooting

This is a preview release, so please keep in mind that it can lack optimization and stability at many levels.

If you occasionally see that you Devnet gets stuck at Bitcoin block #121 for multiple minutes, just stop it and give it another try.

It may happen that Docker doesn't properly stop the containers for some reason. In this case, you'll need to manually make sure to stop them if your next run of the devnet doesn't start. Running docker network prune can also help when the network is not properly cleaned up.