Closed alpay-falconx closed 1 month ago
The following PR is up which resolves this issue! Should be released tomorrow
@TarikGul When I used this typesBundle in a sidecar, decoding a block fails if it contains extrinsics with balances and/or subtensorModule pallet events.
Example error
{
"code": 500,
"message": "createType(SignedBlock):: Struct: failed on block: {\"header\":\"Header\",\"extrinsics\":\"Vec<Extrinsic>\"}:: Struct: failed on extrinsics: Vec<Extrinsic>:: createType(ExtrinsicV4):: createType(Call):: Call: failed decoding system.killStorage:: Struct: failed on args: {\"keys\":\"Vec<Bytes>\"}:: decodeU8aStruct: failed at 0x0300801927120516e378941811b605fe… on keys (index 1/1): Vec<Bytes>:: Vec length 655982592 exceeds 65536",
"stack": "Error: createType(SignedBlock):: Struct: failed on block: {\"header\":\"Header\",\"extrinsics\":\"Vec<Extrinsic>\"}:: Struct: failed on extrinsics: Vec<Extrinsic>:: createType(ExtrinsicV4):: createType(Call):: Call: failed decoding system.killStorage:: Struct: failed on args: {\"keys\":\"Vec<Bytes>\"}:: decodeU8aStruct: failed at 0x0300801927120516e378941811b605fe… on keys (index 1/1): Vec<Bytes>:: Vec length 655982592 exceeds 65536\n at createTypeUnsafe (/usr/src/app/node_modules/@polkadot/types-create/cjs/create/type.js:54:22)\n at TypeRegistry.createTypeUnsafe (/usr/src/app/node_modules/@polkadot/types/cjs/create/registry.js:230:52)\n at RpcCore._formatOutput (/usr/src/app/node_modules/@polkadot/rpc-core/cjs/bundle.js:331:25)\n at RpcCore._formatResult (/usr/src/app/node_modules/@polkadot/rpc-core/cjs/bundle.js:169:20)\n at callWithRegistry (/usr/src/app/node_modules/@polkadot/rpc-core/cjs/bundle.js:190:25)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)",
"level": "error"
}
@TarikGul When I used this typesBundle in a sidecar, decoding a block fails if it contains extrinsics with balances and/or subtensorModule pallet events.
Example error
{ "code": 500, "message": "createType(SignedBlock):: Struct: failed on block: {\"header\":\"Header\",\"extrinsics\":\"Vec<Extrinsic>\"}:: Struct: failed on extrinsics: Vec<Extrinsic>:: createType(ExtrinsicV4):: createType(Call):: Call: failed decoding system.killStorage:: Struct: failed on args: {\"keys\":\"Vec<Bytes>\"}:: decodeU8aStruct: failed at 0x0300801927120516e378941811b605fe… on keys (index 1/1): Vec<Bytes>:: Vec length 655982592 exceeds 65536", "stack": "Error: createType(SignedBlock):: Struct: failed on block: {\"header\":\"Header\",\"extrinsics\":\"Vec<Extrinsic>\"}:: Struct: failed on extrinsics: Vec<Extrinsic>:: createType(ExtrinsicV4):: createType(Call):: Call: failed decoding system.killStorage:: Struct: failed on args: {\"keys\":\"Vec<Bytes>\"}:: decodeU8aStruct: failed at 0x0300801927120516e378941811b605fe… on keys (index 1/1): Vec<Bytes>:: Vec length 655982592 exceeds 65536\n at createTypeUnsafe (/usr/src/app/node_modules/@polkadot/types-create/cjs/create/type.js:54:22)\n at TypeRegistry.createTypeUnsafe (/usr/src/app/node_modules/@polkadot/types/cjs/create/registry.js:230:52)\n at RpcCore._formatOutput (/usr/src/app/node_modules/@polkadot/rpc-core/cjs/bundle.js:331:25)\n at RpcCore._formatResult (/usr/src/app/node_modules/@polkadot/rpc-core/cjs/bundle.js:169:20)\n at callWithRegistry (/usr/src/app/node_modules/@polkadot/rpc-core/cjs/bundle.js:190:25)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)", "level": "error" }
Can you create an issue in sidecar then, with a reproducible example using sidecar?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.
The app-config for the
bittensor
spec seems to be outdated so this issue is being opened for a updated version to be added.When using the bittensor spec in a typesBundle used to run the substrate sidecar, the sidecar is not able to decode (all) blocks from the subtensor network - some blocks can be decoded without any typesBundle. The expected behavior is that when the spec is used for the typesBundle in the sidecar config, the sidecar application is able to decode blocks from the node RPC.
The types bundle would like the following based on the current spec in app-config:
Updating the bittensor spec will allow custodial service providers to run subtensor nodes, retrieve block data from the sidecar via REST APIs and index the chain which will enable custodial/multi-sig wallet support for the tao asset.
Relevant links: