Closed mkoura closed 2 months ago
@Jimbo4350> I need your wisdom here.
In transaction view
, the era passed on the command line is ignored:
era
is chosen when reading the transaction from disk: https://github.com/IntersectMBO/cardano-cli/blob/0e085e6ebd5ede10e9c84c1cb106bd9639aab3e8/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs#L1437With my example transaction, reading from disk returns the babbage
era, which means that, if we condition the behavior of transaction view
on the era; the output will be tailored for babbage
(for example ignoring the voters
field). Which is weird if the user called cardano-cli conway transaction
.
How should I settle this conflict between the era specified by the user and the one inferred from the file on disk?
cc @CarlosLopezDeLara , because this explains the surprising behavior we were observing last Friday.
@Jimbo4350> I need your wisdom here.
In
transaction view
, the era passed on the command line is ignored:1. The commmand's datatype doesn't keep track of the era specified on the command line: https://github.com/IntersectMBO/cardano-cli/blob/0e085e6ebd5ede10e9c84c1cb106bd9639aab3e8/cardano-cli/src/Cardano/CLI/EraBased/Commands/Transaction.hs#L234 2. The `era` is chosen when reading the transaction from disk: https://github.com/IntersectMBO/cardano-cli/blob/0e085e6ebd5ede10e9c84c1cb106bd9639aab3e8/cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs#L1437
With my example transaction, reading from disk returns the
babbage
era, which means that, if we condition the behavior oftransaction view
on the era; the output will be tailored forbabbage
(for example ignoring thevoters
field). Which is weird if the user calledcardano-cli conway transaction
.How should I settle this conflict between the era specified by the user and the one inferred from the file on disk?
cc @CarlosLopezDeLara , because this explains the surprising behavior we were observing last Friday.
I would put it under the debug
command and we can obtain the era from the tx itself and do "the right thing" depending on the era.
I would put it under the debug command
So: transforming transaction view
into debug transaction view
?
and we can obtain the era from the tx itself and do "the right thing" depending on the era.
Right now, we are obtaining the era from the tx. So do you want to keep this behavior? Or do you want to have a different behavior according to whether we use debug transaction view
or transaction view
?
[edit] @Jimbo4350> or should we stop parameterizing transaction view
by the era?
Description
The
transaction view
in Babbage era for Babbage Tx shows"governance actions"
and"voters"
. These are applicable only to Conway era transactions.Steps to Reproduce
cardano-cli babbage transaction view --tx-file babbage_era.tx
Additional Context
Work on-going at https://github.com/IntersectMBO/cardano-cli/commits/smelc/more-era-dependent-in-transaction-view/