diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Commands/Query.hs b/cardano-cli/src/Cardano/CLI/EraBased/Commands/Query.hs index f0d86dc270..543474c849 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Commands/Query.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Commands/Query.hs @@ -21,6 +21,7 @@ module Cardano.CLI.EraBased.Commands.Query , QueryPoolStateCmdArgs(..) , QueryTxMempoolCmdArgs(..) , QuerySlotNumberCmdArgs(..) + , QueryRefScriptSizeCmdArgs(..) , QueryNoArgCmdArgs(..) , QueryDRepStateCmdArgs(..) , QueryDRepStakeDistributionCmdArgs(..) @@ -34,6 +35,7 @@ import Cardano.CLI.Types.Common import Cardano.CLI.Types.Key import qualified Ouroboros.Network.Protocol.LocalStateQuery.Type as Consensus +import Data.Set (Set) import Data.Text (Text) import Data.Time.Clock import GHC.Generics @@ -54,6 +56,7 @@ data QueryCmds era | QueryPoolStateCmd !QueryPoolStateCmdArgs | QueryTxMempoolCmd !QueryTxMempoolCmdArgs | QuerySlotNumberCmd !QuerySlotNumberCmdArgs + | QueryRefScriptSizeCmd !QueryRefScriptSizeCmdArgs | QueryConstitutionCmd !(QueryNoArgCmdArgs era) | QueryGovStateCmd !(QueryNoArgCmdArgs era) | QueryDRepStateCmd !(QueryDRepStateCmdArgs era) @@ -193,6 +196,16 @@ data QuerySlotNumberCmdArgs = QuerySlotNumberCmdArgs , utcTime :: !UTCTime } deriving (Generic, Show) +data QueryRefScriptSizeCmdArgs = QueryRefScriptSizeCmdArgs + { nodeSocketPath :: !SocketPath + , consensusModeParams :: !ConsensusModeParams + , transactionInputs :: !(Set TxIn) + , networkId :: !NetworkId + , target :: !(Consensus.Target ChainPoint) + , format :: Maybe QueryOutputFormat + , mOutFile :: !(Maybe (File () Out)) + } deriving (Generic, Show) + data QueryNoArgCmdArgs era = QueryNoArgCmdArgs { eon :: !(ConwayEraOnwards era) , nodeSocketPath :: !SocketPath @@ -272,6 +285,8 @@ renderQueryCmds = \case "query tx-mempool" <> renderTxMempoolQuery q QuerySlotNumberCmd {} -> "query slot-number" + QueryRefScriptSizeCmd {} -> + "query ref-script-size" QueryConstitutionCmd {} -> "constitution" QueryGovStateCmd {} -> diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Options/Query.hs b/cardano-cli/src/Cardano/CLI/EraBased/Options/Query.hs index 1c8341f9bb..5e6d9202f1 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Options/Query.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Options/Query.hs @@ -18,6 +18,7 @@ import Cardano.CLI.Types.Common import Cardano.CLI.Types.Key import Data.Foldable +import GHC.Exts (IsList (..)) import Options.Applicative hiding (help, str) import qualified Options.Applicative as Opt @@ -109,6 +110,10 @@ pQueryCmds era envCli = $ subParser "slot-number" $ Opt.info (pQuerySlotNumberCmd era envCli) $ Opt.progDesc "Query slot number for UTC timestamp" + , Just + . subParser "ref-script-size" + . Opt.info (pQueryRefScriptSizeCmd era envCli) + $ Opt.progDesc "Calculate the reference input scripts size in bytes for provided transaction ids" , pQueryGetConstitutionCmd era envCli , pQueryGetGovStateCmd era envCli , pQueryDRepStateCmd era envCli @@ -295,6 +300,26 @@ pQuerySlotNumberCmd era envCli = , Opt.help "UTC timestamp in YYYY-MM-DDThh:mm:ssZ format" ] +pQueryRefScriptSizeCmd :: CardanoEra era -> EnvCli -> Parser (QueryCmds era) +pQueryRefScriptSizeCmd era envCli = + fmap QueryRefScriptSizeCmd $ + QueryRefScriptSizeCmdArgs + <$> pSocketPath envCli + <*> pConsensusModeParams + <*> (fromList <$> some pByTxIn) + <*> pNetworkId envCli + <*> pTarget era + <*> (optional $ pQueryOutputFormat "reference inputs") + <*> pMaybeOutputFile + where + pByTxIn :: Parser TxIn + pByTxIn = + Opt.option (readerFromParsecParser parseTxIn) $ mconcat + [ Opt.long "tx-in" + , Opt.metavar "TX-IN" + , Opt.help "Transaction input (TxId#TxIx)." + ] + pQueryGetConstitutionCmd :: () => CardanoEra era -> EnvCli diff --git a/cardano-cli/test/cardano-cli-golden/Test/Golden/Help.hs b/cardano-cli/test/cardano-cli-golden/Test/Golden/Help.hs index daf04b18ad..eb4bdbd685 100644 --- a/cardano-cli/test/cardano-cli-golden/Test/Golden/Help.hs +++ b/cardano-cli/test/cardano-cli-golden/Test/Golden/Help.hs @@ -97,6 +97,7 @@ hprop_golden_HelpCmds = let usages = List.filter (not . null) $ fmap extractCmd $ maybeToList . selectCmd =<< lines forM_ usages $ \usage -> do + -- FIXME: this is sloow H.noteShow_ usage let expectedCmdHelpFp = "test/cardano-cli-golden/files/golden/help" Text.unpack (Text.intercalate "_" usage) <> ".cli" diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help.cli index 0a414b22e3..056df0bc9b 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help.cli @@ -452,6 +452,7 @@ Usage: cardano-cli shelley query | pool-state | tx-mempool | slot-number + | ref-script-size ) Node query commands. Will query the local node whose Unix domain socket is @@ -647,6 +648,21 @@ Usage: cardano-cli shelley query slot-number --socket-path SOCKET_PATH Query slot number for UTC timestamp +Usage: cardano-cli shelley query ref-script-size --socket-path SOCKET_PATH + [--cardano-mode + [--epoch-slots SLOTS]] + (--tx-in TX-IN) + ( --mainnet + | --testnet-magic NATURAL + ) + [ --output-json + | --output-text + ] + [--out-file FILE] + + Calculate the reference input scripts size in bytes for provided transaction + ids + Usage: cardano-cli shelley stake-address ( key-gen | key-hash @@ -1624,6 +1640,7 @@ Usage: cardano-cli allegra query | pool-state | tx-mempool | slot-number + | ref-script-size ) Node query commands. Will query the local node whose Unix domain socket is @@ -1819,6 +1836,21 @@ Usage: cardano-cli allegra query slot-number --socket-path SOCKET_PATH Query slot number for UTC timestamp +Usage: cardano-cli allegra query ref-script-size --socket-path SOCKET_PATH + [--cardano-mode + [--epoch-slots SLOTS]] + (--tx-in TX-IN) + ( --mainnet + | --testnet-magic NATURAL + ) + [ --output-json + | --output-text + ] + [--out-file FILE] + + Calculate the reference input scripts size in bytes for provided transaction + ids + Usage: cardano-cli allegra stake-address ( key-gen | key-hash @@ -2794,6 +2826,7 @@ Usage: cardano-cli mary query | pool-state | tx-mempool | slot-number + | ref-script-size ) Node query commands. Will query the local node whose Unix domain socket is @@ -2985,6 +3018,19 @@ Usage: cardano-cli mary query slot-number --socket-path SOCKET_PATH Query slot number for UTC timestamp +Usage: cardano-cli mary query ref-script-size --socket-path SOCKET_PATH + [--cardano-mode + [--epoch-slots SLOTS]] + (--tx-in TX-IN) + ( --mainnet + | --testnet-magic NATURAL + ) + [--output-json | --output-text] + [--out-file FILE] + + Calculate the reference input scripts size in bytes for provided transaction + ids + Usage: cardano-cli mary stake-address ( key-gen | key-hash @@ -3956,6 +4002,7 @@ Usage: cardano-cli alonzo query | pool-state | tx-mempool | slot-number + | ref-script-size ) Node query commands. Will query the local node whose Unix domain socket is @@ -4151,6 +4198,21 @@ Usage: cardano-cli alonzo query slot-number --socket-path SOCKET_PATH Query slot number for UTC timestamp +Usage: cardano-cli alonzo query ref-script-size --socket-path SOCKET_PATH + [--cardano-mode + [--epoch-slots SLOTS]] + (--tx-in TX-IN) + ( --mainnet + | --testnet-magic NATURAL + ) + [ --output-json + | --output-text + ] + [--out-file FILE] + + Calculate the reference input scripts size in bytes for provided transaction + ids + Usage: cardano-cli alonzo stake-address ( key-gen | key-hash @@ -5153,6 +5215,7 @@ Usage: cardano-cli babbage query | pool-state | tx-mempool | slot-number + | ref-script-size ) Node query commands. Will query the local node whose Unix domain socket is @@ -5348,6 +5411,21 @@ Usage: cardano-cli babbage query slot-number --socket-path SOCKET_PATH Query slot number for UTC timestamp +Usage: cardano-cli babbage query ref-script-size --socket-path SOCKET_PATH + [--cardano-mode + [--epoch-slots SLOTS]] + (--tx-in TX-IN) + ( --mainnet + | --testnet-magic NATURAL + ) + [ --output-json + | --output-text + ] + [--out-file FILE] + + Calculate the reference input scripts size in bytes for provided transaction + ids + Usage: cardano-cli babbage stake-address ( key-gen | key-hash @@ -6601,6 +6679,7 @@ Usage: cardano-cli conway query | pool-state | tx-mempool | slot-number + | ref-script-size | constitution | gov-state | drep-state @@ -6828,6 +6907,24 @@ Usage: cardano-cli conway query slot-number --socket-path SOCKET_PATH Query slot number for UTC timestamp +Usage: cardano-cli conway query ref-script-size --socket-path SOCKET_PATH + [--cardano-mode + [--epoch-slots SLOTS]] + (--tx-in TX-IN) + ( --mainnet + | --testnet-magic NATURAL + ) + [ --volatile-tip + | --immutable-tip + ] + [ --output-json + | --output-text + ] + [--out-file FILE] + + Calculate the reference input scripts size in bytes for provided transaction + ids + Usage: cardano-cli conway query constitution --socket-path SOCKET_PATH [--cardano-mode [--epoch-slots SLOTS]] @@ -7991,6 +8088,7 @@ Usage: cardano-cli latest query | pool-state | tx-mempool | slot-number + | ref-script-size ) Node query commands. Will query the local node whose Unix domain socket is @@ -8186,6 +8284,21 @@ Usage: cardano-cli latest query slot-number --socket-path SOCKET_PATH Query slot number for UTC timestamp +Usage: cardano-cli latest query ref-script-size --socket-path SOCKET_PATH + [--cardano-mode + [--epoch-slots SLOTS]] + (--tx-in TX-IN) + ( --mainnet + | --testnet-magic NATURAL + ) + [ --output-json + | --output-text + ] + [--out-file FILE] + + Calculate the reference input scripts size in bytes for provided transaction + ids + Usage: cardano-cli latest stake-address ( key-gen | key-hash diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_query.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_query.cli index 96755ee947..65748d934b 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_query.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_query.cli @@ -13,6 +13,7 @@ Usage: cardano-cli allegra query | pool-state | tx-mempool | slot-number + | ref-script-size ) Node query commands. Will query the local node whose Unix domain socket is @@ -47,3 +48,5 @@ Available commands: pool-state Dump the pool state tx-mempool Local Mempool info slot-number Query slot number for UTC timestamp + ref-script-size Calculate the reference input scripts size in bytes + for provided transaction ids diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_query_ref-script-size.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_query_ref-script-size.cli new file mode 100644 index 0000000000..34657bb1e6 --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/allegra_query_ref-script-size.cli @@ -0,0 +1,36 @@ +Usage: cardano-cli allegra query ref-script-size --socket-path SOCKET_PATH + [--cardano-mode + [--epoch-slots SLOTS]] + (--tx-in TX-IN) + ( --mainnet + | --testnet-magic NATURAL + ) + [ --output-json + | --output-text + ] + [--out-file FILE] + + Calculate the reference input scripts size in bytes for provided transaction + ids + +Available options: + --socket-path SOCKET_PATH + Path to the node socket. This overrides the + CARDANO_NODE_SOCKET_PATH environment variable. The + argument is optional if CARDANO_NODE_SOCKET_PATH is + defined and mandatory otherwise. + --cardano-mode For talking to a node running in full Cardano mode + (default). + --epoch-slots SLOTS The number of slots per epoch for the Byron era. + (default: 21600) + --tx-in TX-IN Transaction input (TxId#TxIx). + --mainnet Use the mainnet magic id. This overrides the + CARDANO_NODE_NETWORK_ID environment variable + --testnet-magic NATURAL Specify a testnet magic id. This overrides the + CARDANO_NODE_NETWORK_ID environment variable + --output-json Format reference inputs query output to JSON. Default + format when writing to a file + --output-text Format reference inputs query output to TEXT. Default + format when writing to stdout + --out-file FILE Optional output file. Default is to write to stdout. + -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_query.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_query.cli index 6f512f5f29..a42c8f5542 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_query.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_query.cli @@ -13,6 +13,7 @@ Usage: cardano-cli alonzo query | pool-state | tx-mempool | slot-number + | ref-script-size ) Node query commands. Will query the local node whose Unix domain socket is @@ -47,3 +48,5 @@ Available commands: pool-state Dump the pool state tx-mempool Local Mempool info slot-number Query slot number for UTC timestamp + ref-script-size Calculate the reference input scripts size in bytes + for provided transaction ids diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_query_ref-script-size.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_query_ref-script-size.cli new file mode 100644 index 0000000000..ddf7f51ded --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/alonzo_query_ref-script-size.cli @@ -0,0 +1,36 @@ +Usage: cardano-cli alonzo query ref-script-size --socket-path SOCKET_PATH + [--cardano-mode + [--epoch-slots SLOTS]] + (--tx-in TX-IN) + ( --mainnet + | --testnet-magic NATURAL + ) + [ --output-json + | --output-text + ] + [--out-file FILE] + + Calculate the reference input scripts size in bytes for provided transaction + ids + +Available options: + --socket-path SOCKET_PATH + Path to the node socket. This overrides the + CARDANO_NODE_SOCKET_PATH environment variable. The + argument is optional if CARDANO_NODE_SOCKET_PATH is + defined and mandatory otherwise. + --cardano-mode For talking to a node running in full Cardano mode + (default). + --epoch-slots SLOTS The number of slots per epoch for the Byron era. + (default: 21600) + --tx-in TX-IN Transaction input (TxId#TxIx). + --mainnet Use the mainnet magic id. This overrides the + CARDANO_NODE_NETWORK_ID environment variable + --testnet-magic NATURAL Specify a testnet magic id. This overrides the + CARDANO_NODE_NETWORK_ID environment variable + --output-json Format reference inputs query output to JSON. Default + format when writing to a file + --output-text Format reference inputs query output to TEXT. Default + format when writing to stdout + --out-file FILE Optional output file. Default is to write to stdout. + -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_query.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_query.cli index 38b72073ed..a9e23749bc 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_query.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_query.cli @@ -13,6 +13,7 @@ Usage: cardano-cli babbage query | pool-state | tx-mempool | slot-number + | ref-script-size ) Node query commands. Will query the local node whose Unix domain socket is @@ -47,3 +48,5 @@ Available commands: pool-state Dump the pool state tx-mempool Local Mempool info slot-number Query slot number for UTC timestamp + ref-script-size Calculate the reference input scripts size in bytes + for provided transaction ids diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_query_ref-script-size.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_query_ref-script-size.cli new file mode 100644 index 0000000000..26dd932bf2 --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/babbage_query_ref-script-size.cli @@ -0,0 +1,36 @@ +Usage: cardano-cli babbage query ref-script-size --socket-path SOCKET_PATH + [--cardano-mode + [--epoch-slots SLOTS]] + (--tx-in TX-IN) + ( --mainnet + | --testnet-magic NATURAL + ) + [ --output-json + | --output-text + ] + [--out-file FILE] + + Calculate the reference input scripts size in bytes for provided transaction + ids + +Available options: + --socket-path SOCKET_PATH + Path to the node socket. This overrides the + CARDANO_NODE_SOCKET_PATH environment variable. The + argument is optional if CARDANO_NODE_SOCKET_PATH is + defined and mandatory otherwise. + --cardano-mode For talking to a node running in full Cardano mode + (default). + --epoch-slots SLOTS The number of slots per epoch for the Byron era. + (default: 21600) + --tx-in TX-IN Transaction input (TxId#TxIx). + --mainnet Use the mainnet magic id. This overrides the + CARDANO_NODE_NETWORK_ID environment variable + --testnet-magic NATURAL Specify a testnet magic id. This overrides the + CARDANO_NODE_NETWORK_ID environment variable + --output-json Format reference inputs query output to JSON. Default + format when writing to a file + --output-text Format reference inputs query output to TEXT. Default + format when writing to stdout + --out-file FILE Optional output file. Default is to write to stdout. + -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query.cli index 6f10067656..2549bb1237 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query.cli @@ -13,6 +13,7 @@ Usage: cardano-cli conway query | pool-state | tx-mempool | slot-number + | ref-script-size | constitution | gov-state | drep-state @@ -52,6 +53,8 @@ Available commands: pool-state Dump the pool state tx-mempool Local Mempool info slot-number Query slot number for UTC timestamp + ref-script-size Calculate the reference input scripts size in bytes + for provided transaction ids constitution Get the constitution gov-state Get the governance state drep-state Get the DRep state. diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_ref-script-size.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_ref-script-size.cli new file mode 100644 index 0000000000..2da6ec2194 --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_query_ref-script-size.cli @@ -0,0 +1,42 @@ +Usage: cardano-cli conway query ref-script-size --socket-path SOCKET_PATH + [--cardano-mode + [--epoch-slots SLOTS]] + (--tx-in TX-IN) + ( --mainnet + | --testnet-magic NATURAL + ) + [ --volatile-tip + | --immutable-tip + ] + [ --output-json + | --output-text + ] + [--out-file FILE] + + Calculate the reference input scripts size in bytes for provided transaction + ids + +Available options: + --socket-path SOCKET_PATH + Path to the node socket. This overrides the + CARDANO_NODE_SOCKET_PATH environment variable. The + argument is optional if CARDANO_NODE_SOCKET_PATH is + defined and mandatory otherwise. + --cardano-mode For talking to a node running in full Cardano mode + (default). + --epoch-slots SLOTS The number of slots per epoch for the Byron era. + (default: 21600) + --tx-in TX-IN Transaction input (TxId#TxIx). + --mainnet Use the mainnet magic id. This overrides the + CARDANO_NODE_NETWORK_ID environment variable + --testnet-magic NATURAL Specify a testnet magic id. This overrides the + CARDANO_NODE_NETWORK_ID environment variable + --volatile-tip Use the volatile tip as a target. (This is the + default) + --immutable-tip Use the immutable tip as a target. + --output-json Format reference inputs query output to JSON. Default + format when writing to a file + --output-text Format reference inputs query output to TEXT. Default + format when writing to stdout + --out-file FILE Optional output file. Default is to write to stdout. + -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query.cli index ac7d1d7624..738199d088 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query.cli @@ -13,6 +13,7 @@ Usage: cardano-cli latest query | pool-state | tx-mempool | slot-number + | ref-script-size ) Node query commands. Will query the local node whose Unix domain socket is @@ -47,3 +48,5 @@ Available commands: pool-state Dump the pool state tx-mempool Local Mempool info slot-number Query slot number for UTC timestamp + ref-script-size Calculate the reference input scripts size in bytes + for provided transaction ids diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_ref-script-size.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_ref-script-size.cli new file mode 100644 index 0000000000..6c3d5fce5c --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/latest_query_ref-script-size.cli @@ -0,0 +1,36 @@ +Usage: cardano-cli latest query ref-script-size --socket-path SOCKET_PATH + [--cardano-mode + [--epoch-slots SLOTS]] + (--tx-in TX-IN) + ( --mainnet + | --testnet-magic NATURAL + ) + [ --output-json + | --output-text + ] + [--out-file FILE] + + Calculate the reference input scripts size in bytes for provided transaction + ids + +Available options: + --socket-path SOCKET_PATH + Path to the node socket. This overrides the + CARDANO_NODE_SOCKET_PATH environment variable. The + argument is optional if CARDANO_NODE_SOCKET_PATH is + defined and mandatory otherwise. + --cardano-mode For talking to a node running in full Cardano mode + (default). + --epoch-slots SLOTS The number of slots per epoch for the Byron era. + (default: 21600) + --tx-in TX-IN Transaction input (TxId#TxIx). + --mainnet Use the mainnet magic id. This overrides the + CARDANO_NODE_NETWORK_ID environment variable + --testnet-magic NATURAL Specify a testnet magic id. This overrides the + CARDANO_NODE_NETWORK_ID environment variable + --output-json Format reference inputs query output to JSON. Default + format when writing to a file + --output-text Format reference inputs query output to TEXT. Default + format when writing to stdout + --out-file FILE Optional output file. Default is to write to stdout. + -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_query.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_query.cli index 19c6ea0e20..af12e067bf 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_query.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_query.cli @@ -13,6 +13,7 @@ Usage: cardano-cli mary query | pool-state | tx-mempool | slot-number + | ref-script-size ) Node query commands. Will query the local node whose Unix domain socket is @@ -47,3 +48,5 @@ Available commands: pool-state Dump the pool state tx-mempool Local Mempool info slot-number Query slot number for UTC timestamp + ref-script-size Calculate the reference input scripts size in bytes + for provided transaction ids diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_query_ref-script-size.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_query_ref-script-size.cli new file mode 100644 index 0000000000..b77247cf5b --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/mary_query_ref-script-size.cli @@ -0,0 +1,34 @@ +Usage: cardano-cli mary query ref-script-size --socket-path SOCKET_PATH + [--cardano-mode + [--epoch-slots SLOTS]] + (--tx-in TX-IN) + ( --mainnet + | --testnet-magic NATURAL + ) + [--output-json | --output-text] + [--out-file FILE] + + Calculate the reference input scripts size in bytes for provided transaction + ids + +Available options: + --socket-path SOCKET_PATH + Path to the node socket. This overrides the + CARDANO_NODE_SOCKET_PATH environment variable. The + argument is optional if CARDANO_NODE_SOCKET_PATH is + defined and mandatory otherwise. + --cardano-mode For talking to a node running in full Cardano mode + (default). + --epoch-slots SLOTS The number of slots per epoch for the Byron era. + (default: 21600) + --tx-in TX-IN Transaction input (TxId#TxIx). + --mainnet Use the mainnet magic id. This overrides the + CARDANO_NODE_NETWORK_ID environment variable + --testnet-magic NATURAL Specify a testnet magic id. This overrides the + CARDANO_NODE_NETWORK_ID environment variable + --output-json Format reference inputs query output to JSON. Default + format when writing to a file + --output-text Format reference inputs query output to TEXT. Default + format when writing to stdout + --out-file FILE Optional output file. Default is to write to stdout. + -h,--help Show this help text diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_query.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_query.cli index b79366e2d7..25aed568f9 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_query.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_query.cli @@ -13,6 +13,7 @@ Usage: cardano-cli shelley query | pool-state | tx-mempool | slot-number + | ref-script-size ) Node query commands. Will query the local node whose Unix domain socket is @@ -47,3 +48,5 @@ Available commands: pool-state Dump the pool state tx-mempool Local Mempool info slot-number Query slot number for UTC timestamp + ref-script-size Calculate the reference input scripts size in bytes + for provided transaction ids diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_query_ref-script-size.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_query_ref-script-size.cli new file mode 100644 index 0000000000..1921bd2f70 --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/shelley_query_ref-script-size.cli @@ -0,0 +1,36 @@ +Usage: cardano-cli shelley query ref-script-size --socket-path SOCKET_PATH + [--cardano-mode + [--epoch-slots SLOTS]] + (--tx-in TX-IN) + ( --mainnet + | --testnet-magic NATURAL + ) + [ --output-json + | --output-text + ] + [--out-file FILE] + + Calculate the reference input scripts size in bytes for provided transaction + ids + +Available options: + --socket-path SOCKET_PATH + Path to the node socket. This overrides the + CARDANO_NODE_SOCKET_PATH environment variable. The + argument is optional if CARDANO_NODE_SOCKET_PATH is + defined and mandatory otherwise. + --cardano-mode For talking to a node running in full Cardano mode + (default). + --epoch-slots SLOTS The number of slots per epoch for the Byron era. + (default: 21600) + --tx-in TX-IN Transaction input (TxId#TxIx). + --mainnet Use the mainnet magic id. This overrides the + CARDANO_NODE_NETWORK_ID environment variable + --testnet-magic NATURAL Specify a testnet magic id. This overrides the + CARDANO_NODE_NETWORK_ID environment variable + --output-json Format reference inputs query output to JSON. Default + format when writing to a file + --output-text Format reference inputs query output to TEXT. Default + format when writing to stdout + --out-file FILE Optional output file. Default is to write to stdout. + -h,--help Show this help text