|
| 1 | +# How to run the Leios Octoboer demo |
| 2 | + |
| 3 | +See https://github.com/IntersectMBO/ouroboros-consensus/issues/1701 for context. |
| 4 | + |
| 5 | +## Prepare the shell environment |
| 6 | + |
| 7 | +- If your environment can successfully execute `cabal build exe:cardano-node` from this commit, then it can build this demo's exes. |
| 8 | + ```` |
| 9 | + $ git log -1 10.5.1 |
| 10 | + commit ca1ec278070baf4481564a6ba7b4a5b9e3d9f366 (tag: 10.5.1, origin/release/10.5.1, nfrisby/leiosdemo2025-anchor) |
| 11 | + Author: Jordan Millar <[email protected]> |
| 12 | + Date: Wed Jul 2 08:24:11 2025 -0400 |
| 13 | + |
| 14 | + Bump node version to 10.5.1 |
| 15 | + ``` |
| 16 | +- The Python script also needs `pandas` and `matplotlib`. |
| 17 | +- The bash script also needs `ps` (which on a `nix-shell` might require the `procps` package for matching CLIB, eg), and so on. |
| 18 | +- Set `CONSENSUS_BUILD_DIR` to the absolute path of a directory in which `cabal build exe:immdb-server` will succeed. |
| 19 | +- Set `NODE_BUILD_DIR` to the absolute path of a directory in which `cabal build exe:cardano-node` will succeed. |
| 20 | +- Set `CONSENSUS_REPO_DIR` to the absolute path of the `ouroboros-consensus` repo. |
| 21 | +
|
| 22 | +- Checkout a patched version of the `cardano-node` repository, something like the following, eg. |
| 23 | +
|
| 24 | +``` |
| 25 | +6119c5cff0 - (HEAD -> nfrisby/leiosdemo2025, origin/nfrisby/leiosdemo2025) WIP add Leios demo Consensus s-r-p (25 hours ago) <Nicolas Frisby> |
| 26 | +``` |
| 27 | +
|
| 28 | +- If you're using a `source-repository-package` stanza for the `cabal build exe:cardano-node` command in the `NODE_BUILD_DIR`, confirm that it identifies the `ouroboros-consensus` commit you want to use (eg the one you're reading this file in). |
| 29 | +
|
| 30 | +## Build the exes |
| 31 | +
|
| 32 | +``` |
| 33 | +$ (cd $CONSENSUS_BUILD_DIR; cabal build exe:immdb-server exe:leiosdemo202510) |
| 34 | +$ IMMDB_SERVER="$(cd $CONSENSUS_BUILD_DIR; cabal list-bin exe:immdb-server)" |
| 35 | +$ DEMO_TOOL="$(cd $CONSENSUS_BUILD_DIR; cabal list-bin exe:leiosdemo202510)" |
| 36 | +$ (cd $CONSENSUS_BUILD_DIR; cabal build exe:cardano-node) |
| 37 | +$ CARDANO_NODE="$(cd $CONSENSUS_BUILD_DIR; cabal list-bin exe:cardano-node)" |
| 38 | +``` |
| 39 | +
|
| 40 | +## Prepare the input data files |
| 41 | +
|
| 42 | +``` |
| 43 | +$ (cd $CONSENSUS_BUILD_DIR; $DEMO_TOOL generate demoUpstream.db "${CONSENSUS_REPO_DIR}/demoManifest.json" demoBaseSchedule.json) |
| 44 | +$ cp demoBaseSchedule.json demoSchedule.json |
| 45 | +$ # You must now edit demoSchedule.json so that the first number in each array is 182.9 |
| 46 | +$ echo '[]' >emptySchedule.json |
| 47 | +$ $ create the following symlinks |
| 48 | +$ (cd $CONSENSUS_REPO_DIR; ls -l $(find nix/ -name genesis-*.json)) |
| 49 | +lrwxrwxrwx 1 nfrisby nifr 30 Oct 24 16:27 nix/leios-mvd/immdb-node/genesis-alonzo.json -> ../genesis/genesis.alonzo.json |
| 50 | +lrwxrwxrwx 1 nfrisby nifr 29 Oct 24 16:27 nix/leios-mvd/immdb-node/genesis-byron.json -> ../genesis/genesis.byron.json |
| 51 | +lrwxrwxrwx 1 nfrisby nifr 30 Oct 24 16:27 nix/leios-mvd/immdb-node/genesis-conway.json -> ../genesis/genesis.conway.json |
| 52 | +lrwxrwxrwx 1 nfrisby nifr 31 Oct 24 16:27 nix/leios-mvd/immdb-node/genesis-shelley.json -> ../genesis/genesis.shelley.json |
| 53 | +lrwxrwxrwx 1 nfrisby nifr 30 Oct 24 16:27 nix/leios-mvd/leios-node/genesis-alonzo.json -> ../genesis/genesis.alonzo.json |
| 54 | +lrwxrwxrwx 1 nfrisby nifr 29 Oct 24 16:27 nix/leios-mvd/leios-node/genesis-byron.json -> ../genesis/genesis.byron.json |
| 55 | +lrwxrwxrwx 1 nfrisby nifr 30 Oct 24 16:27 nix/leios-mvd/leios-node/genesis-conway.json -> ../genesis/genesis.conway.json |
| 56 | +lrwxrwxrwx 1 nfrisby nifr 31 Oct 24 16:27 nix/leios-mvd/leios-node/genesis-shelley.json -> ../genesis/genesis.shelley.json |
| 57 | +``` |
| 58 | +
|
| 59 | +## Run the scenario with `emptySchedule.json`, ie no Leios traffic |
| 60 | +
|
| 61 | +``` |
| 62 | +$ LEIOS_UPSTREAM_DB_PATH="$(pwd)/demoUpstream.db" LEIOS_SCHEDULE="$(pwd)/emptySchedule.json" SECONDS_UNTIL_REF_SLOT=5 REF_SLOT=182 CLUSTER_RUN_DATA="${CONSENSUS_REPO_DIR}/nix/leios-mvd" CARDANO_NODE=$CARDANO_NODE IMMDB_SERVER=$IMMDB_SERVER ${CONSENSUS_REPO_DIR}/scripts/leios-demo/leios-october-demo.sh |
| 63 | +$ # wait about ~20 seconds before stopping the execution by pressing any key |
| 64 | +``` |
| 65 | +
|
| 66 | +## Run the scenario with `demoSchedule.json` |
| 67 | +
|
| 68 | +``` |
| 69 | +$ LEIOS_UPSTREAM_DB_PATH="$(pwd)/demoUpstream.db" LEIOS_SCHEDULE="$(pwd)/demoSchedule.json" SECONDS_UNTIL_REF_SLOT=5 REF_SLOT=182 CLUSTER_RUN_DATA="${CONSENSUS_REPO_DIR}/nix/leios-mvd" CARDANO_NODE=$CARDANO_NODE IMMDB_SERVER=$IMMDB_SERVER ${CONSENSUS_REPO_DIR}/scripts/leios-demo/leios-october-demo.sh |
| 70 | +$ # wait about ~20 seconds before stopping the execution by pressing any key |
| 71 | +``` |
| 72 | +
|
| 73 | +## Analysis |
| 74 | +
|
| 75 | +Compare and contrast the cell that is in the column for `latency_ms` and the row for the Praos block in slot 183. |
| 76 | +
|
| 77 | +**WARNING**. |
| 78 | +Each execution consumes about 0.5 gigabytes of disk. |
| 79 | +The script announces where (eg `Temporary data stored at: /run/user/1000/leios-october-demo.c5Wmxc`), so you can delete each run's data when necessary. |
| 80 | +
|
| 81 | +**INFO**. |
| 82 | +If you don't see any data in the 'Extracted and Merged Data Summary' table, then check the log files in the run's temporary directory. |
| 83 | +This is where you might see messages about, eg, the missing `genesis-*.json` files, back syntax in the `demoSchedule.json` file, etc. |
0 commit comments