Common Commands
Yaci CLI commands are used to create and interact with the local devnet.
create-node
To create a devnet node.
- Usage:
create-node [options]- Example: Create a new node with the default options. 1 sec block time and overwrite the existing node if it exists.
create-node -o --start- Options:
--overwrite or -o boolean: Overwrite the existing node if it exists.--start: Start the node after creation.--block-time or -b double: Set the block time in seconds. Default is 1 sec. New in 0.11.0-beta1: Supports sub-second values like 0.2 for 200ms blocks.--slot-length or -s double: Slot Length in sec. Default is 1 sec. New in 0.11.0-beta1: Supports sub-second values like 0.2 for 200ms slots.--epoch-length or -e int: Epoch Length in slots. Default is 500.--era String: Era (babbage, conway). Default is babbage.--enable-multi-node: Enable multi-node setup for rollback testing. New in 0.11.0-beta1.
Note: There are many other node specific configuration that can be set through env file or node.properties. Please refer to the Node Configuration for more details.
reset
Reset local devnet. Delete data and logs folder and restart.
- Usage:
resetIf the devnet gets stuck or you simply want to reset the data and restart with the same configuration, simply use the command "reset". It will restore your devnet to its initial state, allowing you to continue your development seamlessly.
stop
Stop the local devnet.
- Usage:
stopNote: You can stop the devnet using command "stop". This will stop the devnet and you can start it again using the "start" command.
The devnet will start from the last block it was stopped at. Based on the securityParam configuration in devnet node,
the node may get stuck if it is stopped for a long time. Please refer to the Node Configuration to
know how to provide a custom value for securityParam.
cluster
To switch to devnet mode for an existing devnet node when Yaci CLI is not in devnet mode.
- Usage:
yaci-cli:> clusterexit
To stop the node and other running services and exit from devnet node.
- Usage:
devnet:default>exitSimilarly, you can use the exit command in non-devnet mode to exit from the Yaci CLI.
topup
To top up the address with the given ada amount.
- Usage:
topup [--address String] [--value double]- Example: To fund address with 45k ada.
topup addr_test1qrzufj3g0ua489yt235wtc3mrjrlucww2tqdnt7kt5rs09grsag6vxw5v053atks5a6whke03cf2qx3h3g2nhsmzwv3sgml3ed 45000default-addresses
To show the default addresses.
- Usage:
default-addressesBy default, the devnet is created with 20 default addresses at different derivation path from a test 24 words mnemonic and each address is funded with 10k ada. This is useful if you want to write your tests or tools using DevKit and you need some addresses to work with. So, you know that these addresses are always available in the devnet.
24 words mnemonic for the default addresses is:
test test test test test test test test test test test test test test test test test test test test test test test sauceshow-faucet-addresses
To show the faucet addresses.
- Usage:
show-faucet-addressesThe faucet addresses are the addresses that are used to fund the default addresses in the devnet and also used to top up the addresses using the topup command.
utxos
To show the UTXOs of the given address.
- Usage:
utxos [address] [--pretty-print-inline-datum]Example:
utxos addr_test1qrzufj3g0ua489yt235wtc3mrjrlucww2tqdnt7kt5rs09grsag6vxw5v053atks5a6whke03cf2qx3h3g2nhsmzwv3sgml3edutxos addr_test1qrzufj3g0ua489yt235wtc3mrjrlucww2tqdnt7kt5rs09grsag6vxw5v053atks5a6whke03cf2qx3h3g2nhsmzwv3sgml3ed --pretty-print-inline-datumtip
To show the tip of the node. New in 0.11.0-beta1: Shows tips for all nodes when multi-node mode is enabled.
- Usage:
tipinfo
To show the info of the node.
- Usage:
infoLog Commands
logs
To show the logs of the node.
- Usage:
logsyaci-store-logs
To show the logs of the yaci-store (if enabled).
- Usage:
yaci-store-logsogmios-logs
To show the logs of the ogmios (if enabled).
- Usage:
ogmios-logskupo-logs
To show the logs of the kupo (if enabled).
- Usage:
kupo-logsRollback Commands (0.11.0-beta1+)
Rollback testing commands for simulating blockchain rollbacks. For detailed rollback testing guide, see Rollback Testing.
create-forks
Creates network forks by isolating nodes through TCP proxy. Goes through Ouroboros consensus.
- Usage:
create-forksNote: Requires --enable-multi-node flag when creating the devnet.
join-forks
Reconnects forked nodes, triggering consensus-based rollback.
- Usage:
join-forkstake-db-snapshot
Take a database snapshot at rollback point (non-consensus).
- Usage:
take-db-snapshotrollback-to-db-snapshot
Restores database to the previously taken db snapshot to simulate rollback (non-consensus).
- Usage:
rollback-to-db-snapshot