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

"info":{"error":"Fee calculation not supported for 9190#westend"} #899

Closed
lcovar opened this issue Apr 19, 2022 · 4 comments · Fixed by #900
Closed

"info":{"error":"Fee calculation not supported for 9190#westend"} #899

lcovar opened this issue Apr 19, 2022 · 4 comments · Fixed by #900

Comments

@lcovar
Copy link

lcovar commented Apr 19, 2022

Description

Polkadot v0.9.18
substrate-api-sidecar v11.3.16

Fees not calculate for westend transactions.

Block Example
blocks/10481441

{
  "number": "10481441",
  "hash": "0xcead389ee2e4a75c638daf2daa3b167343b850a67fe1835e34b3ccd14fe87914",
  "parentHash": "0x222f2b9be4ea0b6f42a2c1bdc124c52384a26ebf18384597b9bff739b54eabb2",
  "stateRoot": "0x8de408501568f1f232e2804ed6695c766fd08c8b553a4037794fabf6de015cf6",
  "extrinsicsRoot": "0x4295c355faab7120db43ba7edeab45e4cbf174212efd68abea8f3b4fe267a4cf",
  "authorId": "5Ft3J6iqSQPWX2S9jERXcMpevt8JDUPWjec5uGierfVGXisE",
  "logs": [
    {
      "type": "PreRuntime",
      "index": "6",
      "value": [
        "0x42414245",
        "0x030b000000b31e651000000000b61885a4583fe8be225de18e55b239ede42cbc600e52af249149673fc3ca19352106fe4887d2af5185bf550cbe83744134a00112a9a12142ccef8b273c0bf40763c69dc44ccdbaee9ea10d5e77368c509437ad7551111f4fd9edc85f0b36c80f"
      ]
    },
    {
      "type": "Seal",
      "index": "5",
      "value": [
        "0x42414245",
        "0x3e27b9a1e300c366daeda94ae50e97885249f45e7b584f355f01e265fc3bd95113dad2ba513955d91e379a4b75bd52cbdd15d245495a2624e522d2f040303d84"
      ]
    }
  ],
  "onInitialize": {
    "events": []
  },
  "extrinsics": [
    {
      "method": {
        "pallet": "timestamp",
        "method": "set"
      },
      "signature": null,
      "nonce": null,
      "args": {
        "now": "1650374706004"
      },
      "tip": null,
      "hash": "0xacdec955f92601b24e6082abd094b35203b753d4a0f10953be1a2e427b6c896f",
      "info": {},
      "era": {
        "immortalEra": "0x00"
      },
      "events": [
        {
          "method": {
            "pallet": "system",
            "method": "ExtrinsicSuccess"
          },
          "data": [
            {
              "weight": "154704000",
              "class": "Mandatory",
              "paysFee": "Yes"
            }
          ]
        }
      ],
      "success": true,
      "paysFee": false
    },
    {
      "method": {
        "pallet": "paraInherent",
        "method": "enter"
      },
      "signature": null,
      "nonce": null,
      "args": {
        "data": {
          "bitfields": [
            {
              "payload": "0x01",
              "validatorIndex": "0",
              "signature": "0x62489d4efca49ff3ef08602d8ba6afdd4d80db39fe74d83f9a5e7b01bb968c3201f9c06e30401bff9cd0554babe92c96e0146f69e0824c31e21196e90dcf4883"
            },
            {
              "payload": "0x01",
              "validatorIndex": "1",
              "signature": "0xb290d3b5b3cd86f2702bd713a8d04405f4af65bc736e4e80428e1ac2008fc45c366f95ae7be8a5f947159f23f25b70c39ba8492009e494bc5e17b070cd635e81"
            },
            {
              "payload": "0x01",
              "validatorIndex": "2",
              "signature": "0x168406625ac56a8ec9bac023a3100a9b9b0a15b82f7dd67f9f08ab48708dff5259f9a5003ed2b6ea912a1ce087d4d6b84a54c7a68d86fe2364b1e8e3ea2d7389"
            },
            {
              "payload": "0x01",
              "validatorIndex": "3",
              "signature": "0x488595245a3664b790b1bc53604d9c73078c6be8dede6d1df65726620439ee5572694188e9e631380eda5e6f7b76b172e57f71a643902b77763c63572b7e018e"
            },
            {
              "payload": "0x01",
              "validatorIndex": "4",
              "signature": "0x7c59e017f3e159c033809cd10a087a78197960bc9f5363a8637fd391c9c8a71da308dc835193aa8b116e9e31479d94a7c61aa8dddb7debe420fe81ee8c14ad8a"
            },
            {
              "payload": "0x01",
              "validatorIndex": "5",
              "signature": "0xda96a53095efcff7b2bb4959409ba14baa0b776177b7a70cc566d6cbc8e807101550a754ff7fd7906026d4d451b0b10acbedcbe263a4ef308c99bc5763581681"
            },
            {
              "payload": "0x01",
              "validatorIndex": "6",
              "signature": "0x1cb73a7480a2457e6c4d5b890eb3973ff17687bd130194ee49c1b83a25247545c197cd9728ad2e7e709bd7e044017ecddc16619ab00e0f74de60d36d0eb27781"
            },
            {
              "payload": "0x01",
              "validatorIndex": "7",
              "signature": "0xbcf8cdc9c1e0ffc417894a1ebdcfd0c58ddf21cc97430649543425c5cd3b2e71fabdbc06a4356879c069815e2d898c8ab26818a4adeca906d8e4038ef3a6218e"
            },
            {
              "payload": "0x00",
              "validatorIndex": "8",
              "signature": "0x7eac3420449f9b0197fdb506e9313033f5672c9b3c1658e7f34362e97c1e5a04ec72b7b365a020a0319af6df917d56e92cc8869994dc7e18c6ceb1e049010d8e"
            },
            {
              "payload": "0x01",
              "validatorIndex": "9",
              "signature": "0xb6f5ba83a56e2bd546560ce0ebec749e67fecd38a62f68e4d2aa5f7bc49bff185ef03a1fbc5f58dde5763bc285d4cc8fbe069511ee7658e44dedae72d77f9d8f"
            },
            {
              "payload": "0x01",
              "validatorIndex": "10",
              "signature": "0x7e5dc1a59a1ddb519f467232296658326401f05821c17e3f351ffc89864577374b2dc42bf3602a4213c66385663d23d55333a6c603fc942e2fbbc21f2cef4a81"
            },
            {
              "payload": "0x01",
              "validatorIndex": "11",
              "signature": "0x46a836622c957f3269466200e1750c9c24da195182f3e92aaf36c8157ac6e13e2cfa0bb7a4546020a83769e3683ac544c315cb76e59f86d342c7569c2a9b868e"
            },
            {
              "payload": "0x01",
              "validatorIndex": "12",
              "signature": "0x4217a8df37018bc9f087779367cb28e210c85bf7a55997f3059f57949c02e51c49c19d259b0b74991bab1d737f79db304c67ba0333f8842e793dbbbaa8d11383"
            },
            {
              "payload": "0x01",
              "validatorIndex": "13",
              "signature": "0xde7560d7c65d596ead8b5f186ac52e71df819aacd30746ca580cb1fdbb12021de5681f142f2963300d2aabfc71923b3bce6a2710977fd68153ab4e83f1ebeb8e"
            },
            {
              "payload": "0x01",
              "validatorIndex": "14",
              "signature": "0x42718adc45175d4078571d0997e4bba78982eebb19e1c09c162660fbe97dc352bf0c22831cd3c71acd33912078272ad746d766b61c3782690ac6a993751c058e"
            },
            {
              "payload": "0x01",
              "validatorIndex": "15",
              "signature": "0xe0caa22eaadb4e6adc5db0519970ba580d74fb41ee1cb257a098f3ff5a115b3066ca07740d98bcc0a781734b171e8c7f6d4d15d3864cb257f0834fb2e79d978d"
            }
          ],
          "backedCandidates": [],
          "disputes": [],
          "parentHeader": {
            "parentHash": "0xe4fb4a86c133cb54c03c0ec3ecc0b9a1f5a0754a1c54e558c8d1190638f6a516",
            "number": "10481440",
            "stateRoot": "0x1cd0b9bc1bec46f8a037406a634643cfaa70594dacd41c175a34ccd2007a8570",
            "extrinsicsRoot": "0xbd09b840395f86294aa58a02eb533a1c357ce0e101f040cd8308416feac82840",
            "digest": {
              "logs": [
                {
                  "preRuntime": [
                    "0x42414245",
                    "0x0302000000b21e65100000000070a407cf426a2d4be76a470c1a55543b5a04821e164aa880f591ba81b68586749d5c0f4ecec95f09e90036aa4253539170f6cc867175b3dc909254fe0bf30109b3434be0361bb8eb9d8128b3070c6a7d19136684998c4a17d0145d6f9e91bd06"
                  ]
                },
                {
                  "seal": [
                    "0x42414245",
                    "0xce959e689ad99b04e4b698d8c6d8fc1e71c83160cad8e9f2272a8ea58ce2862c8487cc08d007daba92b35fa47fc063bb770855edecaae7b16b0876e26afbca83"
                  ]
                }
              ]
            }
          }
        }
      },
      "tip": null,
      "hash": "0x7716033e0de706f5161c666738885f8d547c28856356a01a02873c1ac5117b91",
      "info": {},
      "era": {
        "immortalEra": "0x00"
      },
      "events": [
        {
          "method": {
            "pallet": "paraInclusion",
            "method": "CandidateIncluded"
          },
          "data": [
            {
              "descriptor": {
                "paraId": "1000",
                "relayParent": "0xe4fb4a86c133cb54c03c0ec3ecc0b9a1f5a0754a1c54e558c8d1190638f6a516",
                "collator": "0x8a6a92e1ad157bdd583aeefad2d57cfbe2050a599148017e1498918c86bd9849",
                "persistedValidationDataHash": "0xfe2948170db46f4feed4afbfbd7bb39f5d0e41a16c0833a7a08a7178af15a239",
                "povHash": "0xddb42fa20ac2204fee612090ba6c1e7192f4fc1b58cb4450d1a9179025bd2720",
                "erasureRoot": "0x14965df4c560cb36db91e3e6de25d3d9e02f6a11e26cc7aac413baea7db79ab3",
                "signature": "0x261b227b55ed8f88f3968d1b40942939084f42ca73581b3212c877e73b51e90656372a1dfad1acfbc00c8746e4b4043bcaccdda65cb2e9c58155bad973f1fe8d",
                "paraHead": "0x9ce5ff3571ab2ad393f0fe35375629146f05a77c059decbe9967dbdfe1da4ce5",
                "validationCodeHash": "0x2b310e37351c1cc9dc8adc2c932c14d5b304495ad9e25958d8466a6a50e70907"
              },
              "commitmentsHash": "0x1d1b3cfd72651083ccf419cba59c8c878e8384897d80fe0bcc3f13becf1b1328"
            },
            "0xd676238ebe72c47096f59c7d47f0c26bbd114000fd2986fdc8df88e5df06bbeede4b7900840dc2b4b8e712d8ad73ce14f445ba5fbc5b5216dbdff01eb1328ae640a75f6abe7fd55f123bd8835ddd77fe8ed42db5017651c4a5c6bbfe4c3b2d7fd6b8124508066175726120588f320800000000056175726101017efd693a4032ed4ef1fc78b424563ebf07d1736090ee1a64fc92f516ea1b29012a8ec74b731d077a08afd5100ba40e7ff515de47ee0eae2ec932ce26ad9f6882",
            "0",
            "0"
          ]
        },
        {
          "method": {
            "pallet": "system",
            "method": "ExtrinsicSuccess"
          },
          "data": [
            {
              "weight": "43822528000",
              "class": "Mandatory",
              "paysFee": "Yes"
            }
          ]
        }
      ],
      "success": true,
      "paysFee": false
    },
    {
      "method": {
        "pallet": "balances",
        "method": "transferKeepAlive"
      },
      "signature": {
        "signature": "0xc6b7056d878619196516853d3f3e1b72ea9091652365bb7db76a4ba21e6857011bb459d00148be7fc022d49aad7f1237114ad5d78ac0b4c3a5421bbcbe3a2106",
        "signer": {
          "id": "5DMARAukVR38V2dpRja9yxgHuAdxjt6AgctJTezGyL3DXt1G"
        }
      },
      "nonce": "6",
      "args": {
        "dest": {
          "id": "5Fdco1gcXmHQbcGuPrsfT5h8twXwH4kpdWkJq7Fafrgcuvzm"
        },
        "value": "2000000000000"
      },
      "tip": "0",
      "hash": "0x8e87c35a184bbd60576a8ea127e98c96b147d921123e1a0005b254f37c89997c",
      "info": {
        "error": "Fee calculation not supported for 9190#westend"
      },
      "era": {
        "mortalEra": [
          "64",
          "27"
        ]
      },
      "events": [
        {
          "method": {
            "pallet": "balances",
            "method": "Withdraw"
          },
          "data": [
            "5DMARAukVR38V2dpRja9yxgHuAdxjt6AgctJTezGyL3DXt1G",
            "15700002046"
          ]
        },
        {
          "method": {
            "pallet": "system",
            "method": "NewAccount"
          },
          "data": [
            "5Fdco1gcXmHQbcGuPrsfT5h8twXwH4kpdWkJq7Fafrgcuvzm"
          ]
        },
        {
          "method": {
            "pallet": "balances",
            "method": "Endowed"
          },
          "data": [
            "5Fdco1gcXmHQbcGuPrsfT5h8twXwH4kpdWkJq7Fafrgcuvzm",
            "2000000000000"
          ]
        },
        {
          "method": {
            "pallet": "balances",
            "method": "Transfer"
          },
          "data": [
            "5DMARAukVR38V2dpRja9yxgHuAdxjt6AgctJTezGyL3DXt1G",
            "5Fdco1gcXmHQbcGuPrsfT5h8twXwH4kpdWkJq7Fafrgcuvzm",
            "2000000000000"
          ]
        },
        {
          "method": {
            "pallet": "balances",
            "method": "Deposit"
          },
          "data": [
            "5Ft3J6iqSQPWX2S9jERXcMpevt8JDUPWjec5uGierfVGXisE",
            "15700002046"
          ]
        },
        {
          "method": {
            "pallet": "system",
            "method": "ExtrinsicSuccess"
          },
          "data": [
            {
              "weight": "148670000",
              "class": "Normal",
              "paysFee": "Yes"
            }
          ]
        }
      ],
      "success": true,
      "paysFee": true
    }
  ],
  "onFinalize": {
    "events": []
  },
  "finalized": true
}
@TarikGul
Copy link
Member

TarikGul commented Apr 20, 2022

Hey @lcovar , much thanks for reporting this issue.

After looking into it, the problem revolves around the fact the the TransactionByteFee was removed in 9190. The code that handles this can be found here.

Currently looking into solutions that will get this fixed as soon as I can. It is a little tricky in the sense that our Rust package @substrate/calc which is native to sidecar has a lot of logic that is dependent on the TransactionByteFee so we will need to maintain the integrity of historic runtimes while also adjusting for the current update.

Edit: It wasn't removed just changed into lengthToFee, I'll have a fix out shortly, once merged we will release a new version

@lcovar
Copy link
Author

lcovar commented Apr 20, 2022

Thanks @TarikGul for looking into this so quickly.

@mcalcano-bg
Copy link

This is not as important, but I get similar errors when retrieving really old blocks, for example: 1191, 1197, 1238, 1240, 2549, 258695, 285763, 311297, 311308, 326958. In these cases it references runtime versions 1 and 4. I am wondering if that is something you would want to fix at some point even though the issue is for old blocks?

@TarikGul
Copy link
Member

This is not as important, but I get similar errors when retrieving really old blocks, for example: 1191, 1197, 1238, 1240, 2549, 258695, 285763, 311297, 311308, 326958. In these cases it references runtime versions 1 and 4. I am wondering if that is something you would want to fix at some point even though the issue is for old blocks?

@mcalcano-bg Yea I can double check those blocks for you, sidecar should have complete support of all historic runtimes (Or atleast we try our best), so if its not working correctly for some runtimes I am more than happy to fix it. That being said, if my memory serves me correctly there when I worked on this a while ago that there were some runtimes from the very start for kusama and westend that didnt actually have fees. I'll have to double check though but either way it wouldn't hurt to document.

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 a pull request may close this issue.

3 participants