Closed CarlosLopezDeLara closed 10 months ago
For the record, as of 4def5e68f02b6f74f95c82bdb2a04a35ad352a7e, the cli for conway governance action create-protocol-parameters-update
is:
cabal run cardano-cli -- conway governance action create-protocol-parameters-update
Usage: cardano-cli conway governance action create-protocol-parameters-update --epoch NATURAL
[--min-fee-constant LOVELACE]
[--min-fee-linear LOVELACE]
[--max-block-body-size NATURAL]
[--max-tx-size NATURAL]
[--max-block-header-size NATURAL]
[--key-reg-deposit-amt NATURAL]
[--pool-reg-deposit NATURAL]
[--pool-retirement-epoch-boundary EPOCH_BOUNDARY]
[--number-of-pools NATURAL]
[--pool-influence RATIONAL]
[--treasury-expansion RATIONAL]
[--monetary-expansion RATIONAL]
[--protocol-major-version NATURAL
--protocol-minor-version NATURAL]
[--min-pool-cost NATURAL]
[--price-execution-steps RATIONAL
--price-execution-memory RATIONAL]
[--max-tx-execution-units (INT, INT)]
[--max-block-execution-units (INT, INT)]
[--max-value-size INT]
[--collateral-percent INT]
[--max-collateral-inputs INT]
[--utxo-cost-per-byte LOVELACE]
[--pool-voting-threshold-motion-no-confidence RATIONAL
--pool-voting-threshold-committee-normal RATIONAL
--pool-voting-threshold-committee-no-confidence RATIONAL
--pool-voting-threshold-hard-fork-initiation RATIONAL]
[--drep-voting-threshold-motion-no-confidence RATIONAL
--drep-voting-threshold-committee-normal RATIONAL
--drep-voting-threshold-committee-no-confidence RATIONAL
--drep-voting-threshold-update-to-constitution RATIONAL
--drep-voting-threshold-hard-fork-initiation RATIONAL
--drep-voting-threshold-pp-network-group RATIONAL
--drep-voting-threshold-pp-economic-group RATIONAL
--drep-voting-threshold-pp-technical-group RATIONAL
--drep-voting-threshold-pp-governance-group RATIONAL
--drep-voting-threshold-treasury-withdrawal RATIONAL]
[--min-committee-size INT]
[--committee-term-length INT]
[--governance-action-lifetime NATURAL]
[--governance-action-deposit NATURAL]
[--drep-deposit LOVELACE]
[--drep-activity NATURAL]
--out-file FILE
Create a protocol parameters update.
Available options:
--epoch NATURAL The epoch number in which the update proposal is
valid.
--min-fee-constant LOVELACE
The constant factor for the minimum fee calculation.
--min-fee-linear LOVELACE
The linear factor per byte for the minimum fee
calculation.
--max-block-body-size NATURAL
Maximal block body size.
--max-tx-size NATURAL Maximum transaction size.
--max-block-header-size NATURAL
Maximum block header size.
--key-reg-deposit-amt NATURAL
Key registration deposit amount.
--pool-reg-deposit NATURAL
The amount of a pool registration deposit.
--pool-retirement-epoch-boundary EPOCH_BOUNDARY
Epoch bound on pool retirement.
--number-of-pools NATURAL
Desired number of pools.
--pool-influence RATIONAL
Pool influence.
--treasury-expansion RATIONAL
Treasury expansion.
--monetary-expansion RATIONAL
Monetary expansion.
--protocol-major-version NATURAL
Major protocol version. An increase indicates a hard
fork.
--protocol-minor-version NATURAL
Minor protocol version. An increase indicates a soft
fork (old software canvalidate but not produce new
blocks).
--min-pool-cost NATURAL The minimum allowed cost parameter for stake pools.
--price-execution-steps RATIONAL
Step price of execution units for script languages
that use them (from Alonzo era). (Examples: '1.1',
'11/10')
--price-execution-memory RATIONAL
Memory price of execution units for script languages
that use them (from Alonzo era). (Examples: '1.1',
'11/10')
--max-tx-execution-units (INT, INT)
Max total script execution resources units allowed
per tx (from Alonzo era). They are denominated as
follows (steps, memory).
--max-block-execution-units (INT, INT)
Max total script execution resources units allowed
per block (from Alonzo era). They are denominated as
follows (steps, memory).
--max-value-size INT Max size of a multi-asset value in a tx output (from
Alonzo era).
--collateral-percent INT The percentage of the script contribution to the
txfee that must be provided as collateral inputs when
including Plutus scripts (from Alonzo era).
--max-collateral-inputs INT
The maximum number of collateral inputs allowed in a
transaction (from Alonzo era).
--utxo-cost-per-byte LOVELACE
Cost in lovelace per unit of UTxO storage (from
Babbage era).
--pool-voting-threshold-motion-no-confidence RATIONAL
TODO
--pool-voting-threshold-committee-normal RATIONAL
TODO
--pool-voting-threshold-committee-no-confidence RATIONAL
TODO
--pool-voting-threshold-hard-fork-initiation RATIONAL
TODO
--drep-voting-threshold-motion-no-confidence RATIONAL
TODO
--drep-voting-threshold-committee-normal RATIONAL
TODO
--drep-voting-threshold-committee-no-confidence RATIONAL
TODO
--drep-voting-threshold-update-to-constitution RATIONAL
TODO
--drep-voting-threshold-hard-fork-initiation RATIONAL
TODO
--drep-voting-threshold-pp-network-group RATIONAL
TODO
--drep-voting-threshold-pp-economic-group RATIONAL
TODO
--drep-voting-threshold-pp-technical-group RATIONAL
TODO
--drep-voting-threshold-pp-governance-group RATIONAL
TODO
--drep-voting-threshold-treasury-withdrawal RATIONAL
TODO
--min-committee-size INT TODO
--committee-term-length INT
TODO
--governance-action-lifetime NATURAL
TODO
--governance-action-deposit NATURAL
Deposit required to submit a governance action.
--drep-deposit LOVELACE TODO
--drep-activity NATURAL TODO
--out-file FILE The output file.
-h,--help Show this help text
As I'm about to log off for one week, I'm dumping the info I gathered here. As we would say in French, this is a bit zucchini tartlet (i.e. you can do it, but it doesn't taste great :smile:).
The presence of [--protocol-major-version NATURAL | --protocol-minor-version NATURAL]
in the parser comes from:
cardano-cli
, in dpGovActionProtocolParametersUpdate
, the conway
case has pCommonProtocolParameters
CommonProtocolParametersUpdate
instance (who lives in cardano-api
), that has a Ledger.ProtVer
fieldProtVer
has the two fields pvMajor
and pvMinor
.So at first sight, it would be a bit complicated to remove those two fields from the parser. Note that this difficulty is not conway specific, it would be the same for all eras, since the concerned parameters are shared for all eras.
On a second thought, there is a possible way that doesn't require changes nor in the ledger, nor in cardano-api:
CommonProtocolParametersUpdate
in cardano-cli, but make the type of field cppProtocolVersion
a parameter of CommonProtocolParametersUpdate
Maybe Ledger.ProtVer
.()
@Jimbo4350, @newhoggy> any opinion on this?
If I understand correctly @teodanciu's PR https://github.com/input-output-hk/cardano-api/pull/321, I believe it's anyway impossible to change the protocol's minor and major version in the ledger. But it's our parser that is off, as my previous message shows. Need to confirm on a more recent HEAD, in case I tested before Teodora's change.
Confirming that the parser is still off after the integration of @teodanciu's PR, i.e. --protocol-major-version
and --protocol-minor-version
still show up in the help on d32fce056c2a0dcfe827d051d7d0767d12e58fa1. So there is something to do on the cardano-cli side. I'm investigating it.
Following-up on my "On a second thought" message from above, I tried it and it doesn't work, because ultimately we want a single parser for CommonProtocolParametersUpdate
(function pCommonProtocolParameters).
However, while doing this, I found EraBasedProtocolParametersUpdate which is exactly designed to deal with different eras having different parameters. So I could:
DeprecatedAfterBabbage
type, whose only field would be cppProtocolVersion :: StrictMaybe Ledger.ProtVer
DeprecatedAfterBababbge
value to all eras before Conway
Currently,
cardano-cli conway governance action create-protocol-parameters-update
gives the option of creating a proposal to change:protocol-major is used to trigger a hardfork See CDDL This kind of protocol parameter change is reserved to different type of governance action (Hardfork initiation), thus it makes no sense to have the option available under create-protocol-parameters-update
Reference from CIP1694
`