I am creating spec using ./polkadot build-spec --disable-default-bootnode --dev
(I am running version 0.9.8-3a10ee63c-x86_64-linux-gnu
)
spec generated using above command contains code
field. My understanding is that this field contains wasm bytes. However, these bytes do not seem appropriate.
In a .wasm
file, first 4 bytes are supposed to be magic number (\0asm
here), next four bytes are supposed to be version of wasm spec, and probably some other pattern after that. I do not see those things in these wasm bytes.
Is it a bug? Does it use some encoding? Basically, how do I get wasm bytes from the spec?
I have posted JSON of spec here https://gist.github.com/kishansagathiya/b38b8f06964c8cb101ccab7fbefa428d
"code": "0x52bc537646db8e0528b52ffd0058543305de8806381552107855541d2c26fa78e0cf83b70a44352557cb13532c6d0da03c59cf642396cd44daa103555dc3770d003433894b7c7055d95101002568d5f5a28e71a5e6114909a47fa095fefffdbfb7ffde5bca2da54c01351574155015a0bfbfb2adf1efab2acd5757e1d...