cardano-foundation / cardano-graphql

GraphQL API for Cardano
Apache License 2.0
263 stars 104 forks source link

Different protocolParams.coinsPerUtxoByte value in preprod and preview #756

Closed kkenHui closed 2 years ago

kkenHui commented 2 years ago

Ask a question

I am receiving a different protocolParams.coinsPerUtxoByte value in preprod than in preview and my own docker image tag v5.5.5_1.35.3.

Preprod:

{
  "data": {
    "epochs": [
      {
        "protocolParams": {
          "a0": 0.1,
          "decentralisationParam": 0,
          "eMax": 18,
          "extraEntropy": null,
          "keyDeposit": 400000,
          "maxBlockBodySize": 65536,
          "maxBlockHeaderSize": 1100,
          "maxTxSize": 16384,
          "minFeeA": 44,
          "minFeeB": 155381,
          "minPoolCost": 0,
          "minUTxOValue": 34482,
          "nOpt": 50,
          "poolDeposit": 500000000,
          "protocolVersion": {
            "major": 6,
            "minor": 6
          },
          "rho": 0.00178650067,
          "tau": 0.1,
          "coinsPerUtxoByte": 34482,
          "collateralPercent": 150,
          "maxCollateralInputs": 3
        }
      }
    ]
  }
}

Preview:

{
  "data": {
    "epochs": [
      {
        "protocolParams": {
          "a0": 0.1,
          "decentralisationParam": 0,
          "eMax": 18,
          "extraEntropy": null,
          "keyDeposit": 400000,
          "maxBlockBodySize": 65536,
          "maxBlockHeaderSize": 1100,
          "maxTxSize": 16384,
          "minFeeA": 44,
          "minFeeB": 155381,
          "minPoolCost": 0,
          "minUTxOValue": 4310,
          "nOpt": 50,
          "poolDeposit": 500000000,
          "protocolVersion": {
            "major": 7,
            "minor": 7
          },
          "rho": 0.00178650067,
          "tau": 0.1,
          "coinsPerUtxoByte": 4310,
          "collateralPercent": 150,
          "maxCollateralInputs": 3
        }
      }
    ]
  }
}

Preprod is returning a coinsPerUtxoByte value of 34482 and preview a coinsPerUtxoByte value of 4310. Are these the 2 values expected from their respective procolParams and why are they different from one another?

Thanks in advance!

rhyslbw commented 2 years ago

Yes, this is a little confusing as the cardano-db-sync schema was changed to reflect the Babbage-era protocol param coinsPerUtxoByte, but the prior values for the equivalent parameter coinsPerUtxoWord is written into the same column. https://github.com/input-output-hk/cardano-db-sync/blob/master/doc/schema.md#epoch_param

image

preprod is currenty in the Alonzo era, whereas, preview is in the Babbage era