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 does not show params introduced in Conway #729

Closed
CarlosLopezDeLara opened this issue Apr 18, 2024 · 15 comments · Fixed by #758
Closed

query protocol-parameters does not show params introduced in Conway #729

CarlosLopezDeLara opened this issue Apr 18, 2024 · 15 comments · Fixed by #758

Comments

@CarlosLopezDeLara
Copy link
Contributor

CarlosLopezDeLara commented Apr 18, 2024

Description

We are missing the parameters introduced in conway in the output of query protocol-parameters

cardano-cli conway query protocol-parameters 
{
    "collateralPercentage": 150,
    "costModels": {
        "PlutusV1": [
        ],
        "PlutusV2": [
        ]
    },
    "decentralization": null,
    "executionUnitPrices": {
        "priceMemory": 5.77e-2,
        "priceSteps": 7.21e-5
    },
    "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": 3.0e-3,
    "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

Desired behavior

query protocol parameters output should be similar to

cardano-cli conway query gov-state | jq .currentPParams
{
  "collateralPercentage": 150,
  "committeeMaxTermLength": 73,
  "committeeMinSize": 7,
  "costModels": {
    "PlutusV1": [
    ],
    "PlutusV2": [
    ]
  },
  "dRepActivity": 20,
  "dRepDeposit": 500000000,
  "dRepVotingThresholds": {
    "committeeNoConfidence": 0.6,
    "committeeNormal": 0.67,
    "hardForkInitiation": 0.6,
    "motionNoConfidence": 0.67,
    "ppEconomicGroup": 0.67,
    "ppGovGroup": 0.75,
    "ppNetworkGroup": 0.67,
    "ppTechnicalGroup": 0.67,
    "treasuryWithdrawal": 0.67,
    "updateToConstitution": 0.75
  },
  "executionUnitPrices": {
    "priceMemory": 0.0577,
    "priceSteps": 7.21e-05
  },
  "govActionDeposit": 50000000000,
  "govActionLifetime": 6,
  "maxBlockBodySize": 90112,
  "maxBlockExecutionUnits": {
    "memory": 62000000,
    "steps": 20000000000
  },
  "maxBlockHeaderSize": 1100,
  "maxCollateralInputs": 3,
  "maxTxExecutionUnits": {
    "memory": 14000000,
    "steps": 10000000000
  },
  "maxTxSize": 16384,
  "maxValueSize": 5000,
  "minFeeRefScriptCostPerByte": 44,
  "minPoolCost": 340000000,
  "monetaryExpansion": 0.003,
  "poolPledgeInfluence": 0.3,
  "poolRetireMaxEpoch": 18,
  "poolVotingThresholds": {
    "committeeNoConfidence": 0.51,
    "committeeNormal": 0.6,
    "hardForkInitiation": 0.51,
    "motionNoConfidence": 0.6,
    "ppSecurityGroup": 0.6
  },
  "protocolVersion": {
    "major": 9,
    "minor": 0
  },
  "stakeAddressDeposit": 2000000,
  "stakePoolDeposit": 500000000,
  "stakePoolTargetNum": 500,
  "treasuryCut": 0.2,
  "txFeeFixed": 155381,
  "txFeePerByte": 44,
  "utxoCostPerByte": 4310
}

Steps to Reproduce

  1. Connect to SanchoNet or a local cluster running Conway era
  2. query the protocol parameters with cardano-cli conway query protocol-parameters
  3. the output only includes pre-conway era prototol parameters

Additional Context

Possible Solution

We need to return all parameters.

@CarlosLopezDeLara CarlosLopezDeLara changed the title query protocol parameters does not show params introduced in Conway query protocol-parameters does not show params introduced in Conway Apr 18, 2024
@smelc
Copy link
Contributor

smelc commented May 3, 2024

This should probably be done like this, by adding the selected lines:

image

In this manner, we will:

  • Keep the existing output format, and
  • extend it with new data

which will make people involved in this discussion happy: #569 (comment)

@gitmachtl
Copy link
Contributor

Do you think this will make it into 8.23.0.0 release?

@smelc
Copy link
Contributor

smelc commented May 6, 2024

@gitmachtl> No it won't make it to 8.23.0.0, but we can probably prioritize it for the next one. Would that be useful to you?

@gitmachtl
Copy link
Contributor

gitmachtl commented May 6, 2024

@smelc hi, yes please. because if every change we have to adjust all the external tooling. and at some point it would be good to come to a solution that will stay for a while. but have i read this correct, the outcome protocol parameters json will simply be like a merged output of the existing one and the extra parameters related to governance?

like:

{
  "collateralPercentage": 150,
  "costModels": {
    "PlutusV1": [
      205665,
      812,
      1,
      ...
    ],
    "PlutusV2": [
      205665,
      812,
      1,
      ...
    ],
    "PlutusV3": [
      205665,
      812,
      1,
      1,
      ...
    ]
  },
  "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,
  "committeeMaxTermLength": 73,
  "committeeMinSize": 7,
  "dRepActivity": 20,
  "dRepDeposit": 500000000,
  "dRepVotingThresholds": {
    "committeeNoConfidence": 0.6,
    "committeeNormal": 0.67,
    "hardForkInitiation": 0.6,
    "motionNoConfidence": 0.67,
    "ppEconomicGroup": 0.67,
    "ppGovGroup": 0.75,
    "ppNetworkGroup": 0.67,
    "ppTechnicalGroup": 0.67,
    "treasuryWithdrawal": 0.67,
    "updateToConstitution": 0.75
  },
  "govActionDeposit": 50000000000,
  "govActionLifetime": 6,
  "minFeeRefScriptCostPerByte": 44,
  "poolVotingThresholds": {
    "committeeNoConfidence": 0.51,
    "committeeNormal": 0.6,
    "hardForkInitiation": 0.51,
    "motionNoConfidence": 0.6,
    "ppSecurityGroup": 0.6
  }
}

@smelc
Copy link
Contributor

smelc commented May 6, 2024

the outcome protocol parameters json will simply be like a merged output of the existing one and the extra parameters related to governance?

Yes this is the plan 👍 but to be confirmed when I deep dive on it 😆

hi, yes please

Noted, will do this one soon 👍

@smelc smelc self-assigned this May 6, 2024
@smelc
Copy link
Contributor

smelc commented May 7, 2024

@gitmachtl> current state vs new state looking like this in my PoC (costModels removed for brevity):

image

I think this matches your expectations, right?

@gitmachtl
Copy link
Contributor

yea, nice. 👍

@smelc
Copy link
Contributor

smelc commented May 13, 2024

@gitmachtl> final version trims some fields that were null (this is a result of using one source of truth for the JSON encoding, the one from the ledger)(showing here diff of old format to new format):

image

Is that fine?

@gitmachtl
Copy link
Contributor

null is fine

@smelc
Copy link
Contributor

smelc commented May 13, 2024

@gitmachtl> to be explicit, the new version removes some null fields.

@gitmachtl
Copy link
Contributor

@gitmachtl> to be explicit, the new version removes some null fields.

yea, all good. a jq query would also report back a null if absent.

@gitmachtl
Copy link
Contributor

@smelc will the governance parameters still be there via the query gov-state command? or will that section in the output be removed?

@smelc
Copy link
Contributor

smelc commented May 13, 2024

@smelc will the governance parameters still be there via the query gov-state command? or will that section in the output be removed?

@gitmachtl> I only change query protocol-parameters, so query gov-state's behavior should remain the same (if not, that would be a bug of my PR).

@gitmachtl
Copy link
Contributor

@smelc please notice #758 (comment)

@gitmachtl
Copy link
Contributor

@smelc , posted you some test lines #758 (comment)

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

Successfully merging a pull request may close this issue.

3 participants