Closed khssnv closed 2 years ago
By the way, this guy works.
>>> substrate.query(module='System', storage_function='Account', params=['Gecm9tRWX5sFzttHLB2j6PurJBeNM3oLHABvztnqXCnmHwZ'])
<scale_info::3(value={'nonce': 553, 'consumers': 0, 'providers': 1, 'sufficients': 0, 'data': {'free': 929871682926, 'reserved': 0, 'misc_frozen': 0, 'fee_frozen': 0}})>
Also, there is a workaround if you provide nonce
to create_signed_extrinsic
explicitly.
>>> call = substrate.compose_call(call_module="System", call_function="remark", call_params={"remark": "12"})
>>> nonce = substrate.query(module='System', storage_function='Account', params=['Gecm9tRWX5sFzttHLB2j6PurJBeNM3oLHABvztnqXCnmHwZ']).value["nonce"]
>>> extrinsic = substrate.create_signed_extrinsic(call, keypair, {"period": 64}, nonce=nonce)
extrinsic
<GenericExtrinsic(value={'account_id': '0xb437f703710d52aed228ae7f941f8e08b32edde56e683dcc94664c3dc8622e02', 'signature': {'Sr25519': '0x8212abbf4c45dbdf89e9b408fe9c994f8da82a17ff6ff4043c875aedbf1c215b6d333d9e26b228536dd5a4c28e388ea79a83d829b6300fdbf68b9fe6f7d86188'}, 'call_function': 'remark', 'call_module': 'System', 'call_args': {'remark': '12'}, 'nonce': 553, 'era': {'period': 64, 'current': 11601803}, 'tip': 0, 'asset_id': {'tip': 0, 'asset_id': None}, 'signature_version': 1, 'address': '0xb437f703710d52aed228ae7f941f8e08b32edde56e683dcc94664c3dc8622e02', 'call': {'call_function': 'remark', 'call_module': 'System', 'call_args': {'remark': '12'}}})>
By the way, this workaround does not help to submit the extrinsic.
>>> receipt = substrate.submit_extrinsic(extrinsic)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/site-packages/substrateinterface/base.py", line 1838, in submit_extrinsic
response = self.rpc_request("author_submitExtrinsic", [str(extrinsic.data)])
File "/usr/local/lib/python3.9/site-packages/substrateinterface/base.py", line 575, in rpc_request
raise SubstrateRequestException(message['error'])
substrateinterface.exceptions.SubstrateRequestException: {'code': 1002, 'message': 'Verification Error: Runtime error: Failed to get runtime version: RuntimeConstruction(Other("host doesn\'t provide such function: env:ext_trie_blake2_256_ordered_root_version_2"))', 'data': 'RuntimeApi("Failed to get runtime version: RuntimeConstruction(Other(\\"host doesn\'t provide such function: env:ext_trie_blake2_256_ordered_root_version_2\\"))")'}
If you try to get runtime version to provided it explicitly, you will get this.
block = substrate.get_block()
>>> runtime_version = substrate.get_block_runtime_version(block_hash=block["header"]["hash"])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/site-packages/substrateinterface/base.py", line 887, in get_block_runtime_version
response = self.rpc_request("chain_getRuntimeVersion", [block_hash])
File "/usr/local/lib/python3.9/site-packages/substrateinterface/base.py", line 575, in rpc_request
raise SubstrateRequestException(message['error'])
substrateinterface.exceptions.SubstrateRequestException: {'code': -32603, 'message': 'Unknown error occurred', 'data': 'Client(Application(VersionInvalid("RuntimeConstruction(Other(\\"host doesn\'t provide such function: env:ext_trie_blake2_256_ordered_root_version_2\\"))")))'}
We're experiencing the same issue
For us upgrading the node to 0.9.17 solved the issue.
For us upgrading the node to 0.9.17 solved the issue.
I haven't had the chance to look into it yet, but it looks indeed like a Substrate runtime related issue; maybe a change in storage structure that can't be handled by the automatically upgraded WASM version of the runtime but only the native version (in use after physically upgrading the node).
Yes, sorry guys, the source of the issue was an outdated PRC node. Thanks!
Hi,
I'm trying to make a remark call on Kusama and I'm getting an error. Please find more details below.
Error
Environment