w3f / polkadot-spec

The Polkadot Protocol Specification
https://spec.polkadot.network
Creative Commons Attribution Share Alike 4.0 International
179 stars 70 forks source link

Document that runtimes can be zstd-compressed #637

Closed tomaka closed 1 year ago

tomaka commented 1 year ago

If the runtime binary code starts with a certain prefix, then it is actually zstd-compressed.

The prefix can be found here: https://github.com/paritytech/substrate/blob/f9d10fabe04d598d68f8b097cc4905adbb1ad630/primitives/maybe-compressed-blob/src/lib.rs#L30

The decompressed size has a maximum that can be found here: https://github.com/paritytech/substrate/blob/f9d10fabe04d598d68f8b097cc4905adbb1ad630/primitives/maybe-compressed-blob/src/lib.rs#L37

bhargavbh commented 1 year ago

addressed in https://github.com/w3f/polkadot-spec/pull/644.