Substrate.NET.API icon indicating copy to clipboard operation
Substrate.NET.API copied to clipboard

Signed Extras is handled inside the NET API

Open darkfriend77 opened this issue 3 years ago • 0 comments

Description

Since signed extras is handled inside the NET API, and it's static, we can't use different signed extras in the SDK for different nodes, this is causing currently issues in accessing Polakdot, Kusama and other Parachains that use the old ChargeTransactionPayment instead of the new ChargeAssetTxPayment.

image.png

Task

Make the signed extras able to be generated in the Toolchain from the metadata exposed.

ex. from Kusama

   "Extrinsic": {
      "TypeId": 768,
      "Version": 4,
      "SignedExtensions": [
        {
          "SignedIdentifier": "CheckNonZeroSender",
          "SignedExtType": 770,
          "AddSignedExtType": 57
        },
        {
          "SignedIdentifier": "CheckSpecVersion",
          "SignedExtType": 771,
          "AddSignedExtType": 4
        },
        {
          "SignedIdentifier": "CheckTxVersion",
          "SignedExtType": 772,
          "AddSignedExtType": 4
        },
        {
          "SignedIdentifier": "CheckGenesis",
          "SignedExtType": 773,
          "AddSignedExtType": 9
        },
        {
          "SignedIdentifier": "CheckMortality",
          "SignedExtType": 774,
          "AddSignedExtType": 9
        },
        {
          "SignedIdentifier": "CheckNonce",
          "SignedExtType": 776,
          "AddSignedExtType": 57
        },
        {
          "SignedIdentifier": "CheckWeight",
          "SignedExtType": 777,
          "AddSignedExtType": 57
        },
        {
          "SignedIdentifier": "ChargeTransactionPayment",
          "SignedExtType": 778,
          "AddSignedExtType": 57
        }
      ]
    },

ex. from Substrate

    "Extrinsic": {
      "TypeId": 664,
      "Version": 4,
      "SignedExtensions": [
        {
          "SignedIdentifier": "CheckNonZeroSender",
          "SignedExtType": 669,
          "AddSignedExtType": 29
        },
        {
          "SignedIdentifier": "CheckSpecVersion",
          "SignedExtType": 670,
          "AddSignedExtType": 4
        },
        {
          "SignedIdentifier": "CheckTxVersion",
          "SignedExtType": 671,
          "AddSignedExtType": 4
        },
        {
          "SignedIdentifier": "CheckGenesis",
          "SignedExtType": 672,
          "AddSignedExtType": 9
        },
        {
          "SignedIdentifier": "CheckMortality",
          "SignedExtType": 673,
          "AddSignedExtType": 9
        },
        {
          "SignedIdentifier": "CheckNonce",
          "SignedExtType": 675,
          "AddSignedExtType": 29
        },
        {
          "SignedIdentifier": "CheckWeight",
          "SignedExtType": 676,
          "AddSignedExtType": 29
        },
        {
          "SignedIdentifier": "ChargeAssetTxPayment",
          "SignedExtType": 677,
          "AddSignedExtType": 29
        }
      ]
    },

Acceptance Criteria

  • Toolchain can add a node specific signature of the extrinsic.

darkfriend77 avatar Sep 01 '22 09:09 darkfriend77