From 56d049d6bc4ccf6fefe03ae23c9f66990af24bbf Mon Sep 17 00:00:00 2001 From: Michael Karg Date: Wed, 3 Aug 2022 12:00:22 +0200 Subject: [PATCH] cardano-tools: provide command line options and usage in comments --- .../app/db-analyser.hs | 10 ++++++++ .../app/db-synthesizer.hs | 23 ++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/ouroboros-consensus-cardano-tools/app/db-analyser.hs b/ouroboros-consensus-cardano-tools/app/db-analyser.hs index 2627c4f388e..0516ebfdd72 100644 --- a/ouroboros-consensus-cardano-tools/app/db-analyser.hs +++ b/ouroboros-consensus-cardano-tools/app/db-analyser.hs @@ -3,6 +3,16 @@ {-# LANGUAGE ScopedTypeVariables #-} -- | Database analysis tool. +-- +-- Usage: db-analyser --db PATH [--verbose] +-- [--only-immutable-db [--analyse-from SLOT_NUMBER]] +-- [--validate-all-blocks | --minimum-block-validation] COMMAND +-- [--show-slot-block-no | --count-tx-outputs | +-- --show-block-header-size | --show-block-txs-size | +-- --show-ebbs | --store-ledger SLOT_NUMBER | --count-blocks | +-- --checkThunks BLOCK_COUNT | --trace-ledger | +-- --repro-mempool-and-forge INT] +-- [--num-blocks-to-process INT] module Main (main) where import DBAnalyser.Parsers diff --git a/ouroboros-consensus-cardano-tools/app/db-synthesizer.hs b/ouroboros-consensus-cardano-tools/app/db-synthesizer.hs index 5d06dac67d1..196a23cd269 100644 --- a/ouroboros-consensus-cardano-tools/app/db-synthesizer.hs +++ b/ouroboros-consensus-cardano-tools/app/db-synthesizer.hs @@ -1,4 +1,25 @@ --- | This tool aims to synthesize a valid ChainDB, replicating cardano-node's UX +-- | This tool synthesizes a valid ChainDB, replicating cardano-node's UX +-- +-- Usage: db-synthesizer --config FILE --db PATH +-- [--shelley-operational-certificate FILE] +-- [--shelley-vrf-key FILE] [--shelley-kes-key FILE] +-- [--bulk-credentials-file FILE] +-- ((-s|--slots NUMBER) | (-b|--blocks NUMBER) | +-- (-e|--epochs NUMBER)) [-f] +-- +-- Available options: +-- --config FILE Path to the node's config.json +-- --db PATH Path to the Chain DB +-- --shelley-operational-certificate FILE +-- Path to the delegation certificate +-- --shelley-vrf-key FILE Path to the VRF signing key +-- --shelley-kes-key FILE Path to the KES signing key +-- --bulk-credentials-file FILE +-- Path to the bulk credentials file +-- -s,--slots NUMBER Amount of slots to process +-- -b,--blocks NUMBER Amount of blocks to forge +-- -e,--epochs NUMBER Amount of epochs to process +-- -f Force overwrite an existing Chain DB module Main (main) where import System.Exit