From 9fcb5fe348abe6a5bb76e97d45f89173073621bd Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 28 Feb 2020 11:39:37 +0100 Subject: [PATCH] FAQ entry for "Could not convert" (#1972) * FAQ entry for "Could not convert" * Bump dev * Extend description, bump dev --- .github/workflows/pr-any.yml | 8 +++--- .github/workflows/push-master.yml | 4 +-- docs/start/FAQ.md | 8 ++++++ package.json | 4 +-- yarn.lock | 48 ++++++++++++++++++++++--------- 5 files changed, 50 insertions(+), 22 deletions(-) diff --git a/.github/workflows/pr-any.yml b/.github/workflows/pr-any.yml index 6cc1b49c6a..8faba702e5 100644 --- a/.github/workflows/pr-any.yml +++ b/.github/workflows/pr-any.yml @@ -26,7 +26,7 @@ jobs: ${{ runner.os }}-yarn- - name: lint run: | - yarn install --frozen-lockfile + yarn install | grep -v 'YN0013' yarn lint test: @@ -53,7 +53,7 @@ jobs: ${{ runner.os }}-yarn- - name: test run: | - yarn install --frozen-lockfile + yarn install | grep -v 'YN0013' yarn test build_code: @@ -80,7 +80,7 @@ jobs: ${{ runner.os }}-yarn- - name: build run: | - yarn install --frozen-lockfile + yarn install | grep -v 'YN0013' yarn build build_docs: @@ -107,5 +107,5 @@ jobs: ${{ runner.os }}-yarn- - name: build run: | - yarn install --frozen-lockfile + yarn install | grep -v 'YN0013' yarn docs diff --git a/.github/workflows/push-master.yml b/.github/workflows/push-master.yml index 6d907133b3..1fe06d0258 100644 --- a/.github/workflows/push-master.yml +++ b/.github/workflows/push-master.yml @@ -38,7 +38,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: | - yarn install --frozen-lockfile + yarn install | grep -v 'YN0013' yarn polkadot-ci-ghact-build build_docs: @@ -71,7 +71,7 @@ jobs: GH_PAGES_SRC: build-docs GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - yarn install --frozen-lockfile + yarn install | grep -v 'YN0013' yarn polkadot-ci-ghact-docs dummy: diff --git a/docs/start/FAQ.md b/docs/start/FAQ.md index 546aaed2c1..a673bd7cf1 100644 --- a/docs/start/FAQ.md +++ b/docs/start/FAQ.md @@ -12,6 +12,14 @@ If however you are running against a master branch of either Polkadot or Substra Update your version of the API to the [latest version](install.md). Like types, the [metadata interfaces](basics.md) are continuously evolving. For instance with the Polkadot Alexander network, only metadata v3 is available. By the time Kusama launched, this has been bumped to v7. As these versions are added to the Polkadot/Substrate codebase, they are added to the API. +## The node returns a "Could not convert" error on send + +The typical error that you would see is `Verification Error: Execution(ApiError("Could not convert parameter 'tx' between node and runtime`. This means that the transaction data serialized from the API cannot be deserialized on the node. + +All data transferred between the API and the Node is in a SCALE-encoded binary format, so the [definition of the types](types.extend.md) between the API and the node needs to match 100%. When you find the above, it would mean the definition of the types on the API side does not match what is on the node. Specifically the API encodes against the definition, but since there is a mismatch the Node cannot parse the data correctly. + +To fix this, you should look at the specific `api.tx.*` params and adjust the type definitions for those param types to match what is found on the node side. In some rare cases the cause could be extrinsic formatting related, to track these make an `api.tx.system.remark(data: Bytes)` call, if it fails, the API and node cannot agree on an extrinsic format. (Ensure that there are no signed extension warnings in the API itself) + ## I would like to sign transactions offline The API itself is independent on where the signature comes from and how it is injected. Additionally it implements a signer interface, that can be used for external signing - an example of this is the [polkadot-js/apps](https://github.com/polkadot-js/apps) support for signing via extensions and even the [polkadot-js/extension](https://github.com/polkadot-js/extension) support for tools such as the [Parity Signer](https://github.com/paritytech/parity-signer). diff --git a/package.json b/package.json index 67a3657b03..2c045ac95a 100644 --- a/package.json +++ b/package.json @@ -26,8 +26,8 @@ "@babel/core": "^7.8.4", "@babel/register": "^7.8.3", "@babel/runtime": "^7.8.4", - "@polkadot/dev": "^0.41.6", - "@polkadot/ts": "^0.2.3", + "@polkadot/dev": "^0.50.7", + "@polkadot/ts": "^0.3.1", "copyfiles": "^2.2.0" } } diff --git a/yarn.lock b/yarn.lock index 683466d0b3..63095133c1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1974,10 +1974,10 @@ dependencies: "@types/node" ">= 8" -"@polkadot/dev@^0.41.6": - version "0.41.6" - resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.41.6.tgz#5cf31d867e00bf2618fef77560e981f807849cce" - integrity sha512-WYwW6RBO8rzBiw/H54DJ371P9tqSLT7WriaUPgC8KXDmA65qWyoPaPiC7vI4jfWL1iYxH1fBfiKXGLDtb5EuVQ== +"@polkadot/dev@^0.50.7": + version "0.50.7" + resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.50.7.tgz#f4707beb13fdac18335da9df23b26ddb14ce62dd" + integrity sha512-IWR10qUZQbtv/V3ETGSES1Qv/LYG8ndWISdLPXgf5fC3SuiWov8Lg9iSvI4ixHdo7mDwx76oBgjjUtKRjrjgVw== dependencies: "@babel/cli" "^7.8.4" "@babel/core" "^7.8.4" @@ -2007,12 +2007,13 @@ babel-jest "^25.1.0" babel-plugin-module-resolver "^4.0.0" babel-plugin-styled-components "^1.10.7" - browserslist "^4.8.6" + browserslist "^4.8.7" chalk "^3.0.0" coveralls "^3.0.9" cpx "^1.5.0" eslint "^6.8.0" eslint-config-standard "^14.1.0" + eslint-import-resolver-node "^0.3.3" eslint-plugin-import "^2.20.1" eslint-plugin-node "^11.0.0" eslint-plugin-promise "^4.2.1" @@ -2030,7 +2031,7 @@ madge "^3.7.0" mkdirp "^1.0.3" rimraf "^3.0.2" - typedoc "^0.16.9" + typedoc "^0.16.10" typedoc-plugin-markdown "^2.2.16" typedoc-plugin-no-inherit "^1.1.10" typescript "^3.8.2" @@ -2048,10 +2049,10 @@ "@polkadot/util" "2.5.1" "@polkadot/util-crypto" "2.5.1" -"@polkadot/ts@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.2.3.tgz#03963933e8ad4ae513a081a27a03d52e6a4be32e" - integrity sha512-hEDc7ibTARuhAj/XmS8mGKTTJqjUHOhDgIfg708n5qQDJ6DWhVt8XkGHqfwXD4MEbmiKAcRS0+vutYYmZHOwYw== +"@polkadot/ts@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.3.1.tgz#90e8c39925b96de73a0973ffe0e41dae1e34830d" + integrity sha512-cKY9ObHUDlhlze5quW3L3WzpHcO6Mn4/Dib2H/LeTG3ukobWIl2nYPcYSHIGvveP3oRdTdQSMT2fBSvPuQIndw== dependencies: "@types/chrome" "^0.0.95" @@ -3537,7 +3538,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.0.0, browserslist@^4.8.3, browserslist@^4.8.5, browserslist@^4.8.6: +browserslist@^4.0.0, browserslist@^4.8.3, browserslist@^4.8.5: version "4.8.7" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.7.tgz#ec8301ff415e6a42c949d0e66b405eb539c532d0" integrity sha512-gFOnZNYBHrEyUML0xr5NJ6edFaaKbTFX9S9kQHlYfCP0Rit/boRIz4G+Avq6/4haEKJXdGGUnoolx+5MWW2BoA== @@ -3546,6 +3547,15 @@ browserslist@^4.0.0, browserslist@^4.8.3, browserslist@^4.8.5, browserslist@^4.8 electron-to-chromium "^1.3.349" node-releases "^1.1.49" +browserslist@^4.8.7: + version "4.9.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.9.0.tgz#ff85c390889e0f754d7bd8ad13412575cdcf5dc7" + integrity sha512-seffIXhwgB84+OCeT/aMjpZnsAsYDiMSC+CEs3UkF8iU64BZGYcu+TZYs/IBpo4nRi0vJywUJWYdbTsOhFTweg== + dependencies: + caniuse-lite "^1.0.30001030" + electron-to-chromium "^1.3.361" + node-releases "^1.1.50" + bs58@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" @@ -3774,6 +3784,11 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001020, caniuse-lite@^1.0.30001027: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001028.tgz#f2241242ac70e0fa9cda55c2776d32a0867971c2" integrity sha512-Vnrq+XMSHpT7E+LWoIYhs3Sne8h9lx9YJV3acH3THNCwU/9zV93/ta4xVfzTtnqd3rvnuVpVjE3DFqf56tr3aQ== +caniuse-lite@^1.0.30001030: + version "1.0.30001030" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001030.tgz#78076c4c6d67d3e41d6eb9399853fb27fe6e44ee" + integrity sha512-QGK0W4Ft/Ac+zTjEiRJfwDNATvS3fodDczBXrH42784kcfqcDKpEPfN08N0HQjrAp8He/Jw8QiSS9QRn7XAbUw== + capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -5269,6 +5284,11 @@ electron-to-chromium@^1.3.349: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.358.tgz#1964cab37f57d49a5a421a4de4dba3c6baf14608" integrity sha512-y9xvv+9PplXSUkOSxgtOfwNrqD/948VIScyWURnY27PXprg3PmRl7e8ekRJhnksDNjxLVyBYY6I2nQmNBzdi6g== +electron-to-chromium@^1.3.361: + version "1.3.362" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.362.tgz#9ed33f9d0673888d6a2614347b4b63b490009408" + integrity sha512-xdU5VCoZyMPMOWtCaMgbr48OwWZHrMLbGnAOlEqibXiIGsb4kiCGWEHK5NOghcVLdBVIbr/BW+yuKxVuGTtzEg== + elliptic@^6.0.0, elliptic@^6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" @@ -5497,7 +5517,7 @@ eslint-config-standard@^14.1.0: resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.0.tgz#b23da2b76fe5a2eba668374f246454e7058f15d4" integrity sha512-EF6XkrrGVbvv8hL/kYa/m6vnvmUT+K82pJJc4JJVMM6+Qgqh0pnwprSxdduDLB9p/7bIxD+YV5O0wfb8lmcPbA== -eslint-import-resolver-node@^0.3.2: +eslint-import-resolver-node@^0.3.2, eslint-import-resolver-node@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz#dbaa52b6b2816b50bc6711af75422de808e98404" integrity sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg== @@ -9502,7 +9522,7 @@ node-notifier@^6.0.0: shellwords "^0.1.1" which "^1.3.1" -node-releases@^1.1.49: +node-releases@^1.1.49, node-releases@^1.1.50: version "1.1.50" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.50.tgz#803c40d2c45db172d0410e4efec83aa8c6ad0592" integrity sha512-lgAmPv9eYZ0bGwUYAKlr8MG6K4CvWliWqnkcT2P8mMAgVrH3lqfBPorFlxiG1pHQnqmavJZ9vbMXUTNyMLbrgQ== @@ -12969,7 +12989,7 @@ typedoc-plugin-no-inherit@^1.1.10: resolved "https://registry.yarnpkg.com/typedoc-plugin-no-inherit/-/typedoc-plugin-no-inherit-1.1.10.tgz#559d2fa68bc5d31052bf058399c2c135f9af2f68" integrity sha512-BhSFAWlBTh9Bf6PSfruIqdQBM8gd/Gj8hVuRk5pVWkHu4I/SB24LzFr5gAo52ZlaQSeN72+VOkkRD6tNYl8Enw== -typedoc@^0.16.9: +typedoc@^0.16.10: version "0.16.10" resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.16.10.tgz#217cd4243c9b4d85f49b94323c178f6d279bfb9c" integrity sha512-Eo1+K+XTiqSi4lz5cPrV4RncLv6abjCd/jfL5tTueNZGO2p8x2yDIrXkxL9C+SoLjJm2xpMs3CXYmTnilxk1cA==