Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

query protocol parameters: use ledger instances #455

Merged

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Nov 14, 2023

Changelog

- description: |
    Change output of `conway query protocol-parameters` so that it's consistent with the ledger's JSON output
    
    The output of `conway query protocol-parameters` becomes similar to the one of `cardano-cli conway query gov-state | jq .enactState.curPParams`
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - improvement    # QoL changes e.g. refactoring
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Fixes #438

How to trust this PR

See the comments

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@smelc smelc force-pushed the smelc/protocol-parameters-not-showing-conway-era-parameters branch from 7620690 to 450a0a6 Compare November 14, 2023 15:15
@smelc
Copy link
Contributor Author

smelc commented Nov 14, 2023

Before this PR, cabal run cardano-cli -- conway query protocol-parameters --testnet-magic 4 | jq 'del(.costModels.PlutusV1,.costModels.PlutusV2)' was returning (omitting the Plutus fields, to shorten the output):

{
  "collateralPercentage": 150,
  "costModels": {},
  "decentralization": null,
  "executionUnitPrices": {
    "priceMemory": 0.0577,
    "priceSteps": 7.21e-05
  },
  "extraPraosEntropy": null,
  "maxBlockBodySize": 90112,
  "maxBlockExecutionUnits": {
    "memory": 62000000,
    "steps": 20000000000
  },
  "maxBlockHeaderSize": 1100,
  "maxCollateralInputs": 3,
  "maxTxExecutionUnits": {
    "memory": 14000000,
    "steps": 10000000000
  },
  "maxTxSize": 16384,
  "maxValueSize": 5000,
  "minPoolCost": 340000000,
  "minUTxOValue": null,
  "monetaryExpansion": 0.003,
  "poolPledgeInfluence": 0.3,
  "poolRetireMaxEpoch": 18,
  "protocolVersion": {
    "major": 9,
    "minor": 0
  },
  "stakeAddressDeposit": 2000000,
  "stakePoolDeposit": 500000000,
  "stakePoolTargetNum": 500,
  "treasuryCut": 0.2,
  "txFeeFixed": 155381,
  "txFeePerByte": 44,
  "utxoCostPerByte": 4310
}

@smelc
Copy link
Contributor Author

smelc commented Nov 14, 2023

As of the tip of this branch when I'm writing this (450a0a6), cabal run cardano-cli -- conway query protocol-parameters --testnet-magic 4 | jq 'del(.costmdls.PlutusV1,.costmdls.PlutusV2)' now returns:

{
  "a0": 0.3,
  "coinsPerUTxOByte": 4310,
  "collateralPercentage": 150,
  "committeeMaxTermLength": 200,
  "committeeMinSize": 0,
  "costmdls": {},
  "dRepActivity": 20,
  "dRepDeposit": 2000000,
  "dRepVotingThresholds": {
    "dvtCommitteeNoConfidence": 0.51,
    "dvtCommitteeNormal": 0.51,
    "dvtHardForkInitiation": 0.51,
    "dvtMotionNoConfidence": 0.51,
    "dvtPPEconomicGroup": 0.51,
    "dvtPPGovGroup": 0.51,
    "dvtPPNetworkGroup": 0.51,
    "dvtPPTechnicalGroup": 0.51,
    "dvtTreasuryWithdrawal": 0.51,
    "dvtUpdateToConstitution": 0.51
  },
  "eMax": 18,
  "govActionDeposit": 1000000000,
  "govActionLifetime": 10,
  "keyDeposit": 2000000,
  "maxBlockBodySize": 90112,
  "maxBlockExUnits": {
    "exUnitsMem": 62000000,
    "exUnitsSteps": 20000000000
  },
  "maxBlockHeaderSize": 1100,
  "maxCollateralInputs": 3,
  "maxTxExUnits": {
    "exUnitsMem": 14000000,
    "exUnitsSteps": 10000000000
  },
  "maxTxSize": 16384,
  "maxValSize": 5000,
  "minFeeA": 44,
  "minFeeB": 155381,
  "minPoolCost": 340000000,
  "nOpt": 500,
  "poolDeposit": 500000000,
  "poolVotingThresholds": {
    "pvtCommitteeNoConfidence": 0.51,
    "pvtCommitteeNormal": 0.51,
    "pvtHardForkInitiation": 0.51,
    "pvtMotionNoConfidence": 0.51
  },
  "prices": {
    "prMem": 0.0577,
    "prSteps": 7.21e-05
  },
  "rho": 0.003,
  "tau": 0.2
}

which is exactly what cabal run cardano-cli -- conway query gov-state --testnet-magic 42 | jq .enactState.curPParams | jq 'del(.costmdls.PlutusV1,.costmdls.PlutusV2)' returns.

@smelc
Copy link
Contributor Author

smelc commented Nov 14, 2023

@CarlosLopezDeLara> Is that all you wanted for #438? Or do I need to do something else? cc @gitmachtl

@CarlosLopezDeLara
Copy link
Contributor

@CarlosLopezDeLara> Is that all you wanted for #438? Or do I need to do something else? cc @gitmachtl

This is exactly it, thank you!! Confirmed

@smelc smelc marked this pull request as ready for review November 15, 2023 08:42
@smelc smelc enabled auto-merge November 15, 2023 08:43
@smelc smelc added this pull request to the merge queue Nov 15, 2023
Merged via the queue into main with commit 931ad3f Nov 15, 2023
21 checks passed
@smelc smelc deleted the smelc/protocol-parameters-not-showing-conway-era-parameters branch November 15, 2023 08:57
@gitmachtl
Copy link
Contributor

gitmachtl commented Nov 15, 2023

@smelc So to be clear, do we now also have the same naming for protocol-parameters query using other eras? That was one of the goals too. To make it consistent with same names in babbage and conway era.
Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

query protocol-parameters is not showing conway era parameters
3 participants