It is strongly recommended to use Nix to run this demo and following description will use Nix setup.
Main entry point of the demo is Seath.Test.Main module.
🎦 Recording of the demo is available here.
Local network capabilities are integrated into current setup. Local network provided by Plutip. Network is started from scratch on each run. Slot length is is to 1 second - see config :: PlutipConfig.
To run the demo with local network do the following.
From the root of the repository start Nix development shell:
nix develop --extra-experimental-features 'flakes nix-command' .#off-chain
Note, that features flakes
and nix-command
are required.
When Nix shell is ready, switch to off-chain
directory and start the execution:
cd off-chain
spago run -m Seath.Test.Main -b plutip
Local network will be started automatically and as soon as all required wallets will be funded, execution of Seath demo will begin. Execution trace will be printed to the terminal.
For preprod testnet cardano transaction library runtime is required. It includes Cardano node, Ogmios and Kupo.
Demo setup has Nix run command to launch everything. Only requirement is Docker
set up and running, and user with appropriate permission. See related Docker docs on isntallation and setting up the user.
To start required services from the root of the repo execute
nix run --extra-experimental-features 'flakes nix-command' .#preprod-ctl-runtime
Then wait till node and rest of the services will sync with the network.
To check node sync process following command can be used
docker exec -ti [container_id/container_name] sh -c "CARDANO_NODE_SOCKET_PATH=/ipc/node.socket cardano-cli query tip --testnet-magic=1"
When you see "syncProgress": "100.00"
it means that node is fully synced and you can start the demo.
E.g.:
{
"block": 753435,
"epoch": 59,
"era": "Babbage",
"hash": "19d39cc47e46b814ccc34a97b84370f72a1e9f65d6408c66d18b54805f3fdf36",
"slot": 23879120,
"syncProgress": "100.00"
}
Usually, if node is synced, demo can be started. The process of starting the demo is the same as with local private network, but with different argument.
From the root of the repository start Nix development shell:
nix develop --extra-experimental-features 'flakes nix-command' .#off-chain
When Nix shell is ready, switch to off-chain
directory and start the execution:
cd off-chain
spago run -m Seath.Test.Main -b preprod
Execution trace will be printed to the terminal.