Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

Error : out of range decoding Compact<u32> #5

Closed
stanly-johnson opened this issue May 15, 2021 · 7 comments
Closed

Error : out of range decoding Compact<u32> #5

stanly-johnson opened this issue May 15, 2021 · 7 comments

Comments

@stanly-johnson
Copy link

Trying to use subsee with the latest node-template gives following error

Error: 
   0: Could not decode `RuntimeMetadataPrefixed.1`:
   0: 	Could not decode `RuntimeMetadata::V13.0`:
   0: 		Could not decode `RuntimeMetadataV13::types`:
   0: 			Could not decode `PortableRegistry::types`:
   0: 				Could not decode `Type::path`:
   0: 					Could not decode `Path::segments`:
   0: 						out of range decoding Compact<u32>
   0: 
   1: Could not decode `RuntimeMetadata::V13.0`:
   1: 	Could not decode `RuntimeMetadataV13::types`:
   1: 		Could not decode `PortableRegistry::types`:
   1: 			Could not decode `Type::path`:
   1: 				Could not decode `Path::segments`:
   1: 					out of range decoding Compact<u32>
   1: 
   2: Could not decode `RuntimeMetadataV13::types`:
   2: 	Could not decode `PortableRegistry::types`:
   2: 		Could not decode `Type::path`:
   2: 			Could not decode `Path::segments`:
   2: 				out of range decoding Compact<u32>
   2: 
   3: Could not decode `PortableRegistry::types`:
   3: 	Could not decode `Type::path`:
   3: 		Could not decode `Path::segments`:
   3: 			out of range decoding Compact<u32>
   3: 
   4: Could not decode `Type::path`:
   4: 	Could not decode `Path::segments`:
   4: 		out of range decoding Compact<u32>
   4: 
   5: Could not decode `Path::segments`:
   5: 	out of range decoding Compact<u32>
   5: 
   6: out of range decoding Compact<u32>
@chevdor
Copy link

chevdor commented May 17, 2021

The issue is mostly on the detection of the version and maybe due to Andrew already flying ahead with V13.

I checked out master of the node-template (83ed2d4) and it is still V12 I think:

subwasm info ./target/debug/wbuild/node-template-runtime/node_template_runtime.compact.wasm
Running subwasm v0.6.0
⏱️  Loading WASM from File("./target/debug/wbuild/node-template-runtime/node_template_runtime.compact.wasm")
🏋️  Runtime Size:	0.261 MB (274,051 bytes)
🎁 Metadata version:	V12
🔥 Core version:	node-template-100 (node-template-1.tx1.au1)
🗳️  Proposal hash:	0xefbb4243c6ff6fa11c8a5faf05c78f75eed7fb168c512e8eea9d17afbac2521d

@stanly-johnson
Copy link
Author

stanly-johnson commented May 17, 2021

I tested with the node-template in substrate repo, the standalone node-template repo works fine. AFAIK they are both same, except the node-template in substrate is more frequently updated. Also, from what I've tested this PR is what creates this error, testing with commit before this PR seems to work fine. I'm not able to pinpoint the exact source of the error yet.

@chevdor
Copy link

chevdor commented May 17, 2021

Since the PR you mention is changing how the version is stored in the wasm, that woud make sense to see an issue there. Thanks for reporting that one!

@ascjones
Copy link
Owner

ascjones commented May 17, 2021

Recently there was a V13 merged into master paritytech/substrate#8635 so could be that. I've created this PR in frame-metadata paritytech/frame-metadata#12 - let me try that out see if it fixes this issue

@chevdor
Copy link

chevdor commented May 17, 2021

Awesome, I was waiting for that one !

@ascjones
Copy link
Owner

I've pushed a fix, try now

@stanly-johnson
Copy link
Author

Works now. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants