Implement RFC-135: compressed blob prefixes#12656
Conversation
Extracted from the PolkaVM parachain runtimes MVP (#6704) to be merged separately. Introduces the typed compressed blob prefixes specified in RFC-135 (CBLOB_ZSTD_LEGACY, CBLOB_ZSTD_POV, CBLOB_ZSTD_WASM_CODE, CBLOB_ZSTD_PVM_CODE) and reworks the sp-maybe-compressed-blob API around them: decompress_as/compress_weakly_as/compress_strongly_as take the expected blob type, and blob_type() determines the type of a blob from its compression prefix or code magic bytes. Nodes now recognize and type-check all the prefixes on decompression. Per the RFC-135 rollout plan, producers keep emitting the legacy prefix for Wasm runtimes and PoVs until the majority of the network can decompress the typed ones. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JFFpAKHKJjgydHbEzys3N8 Signed-off-by: Dmitry Sinyavin <dmitry.sinyavin@parity.io>
bkchr
left a comment
There was a problem hiding this comment.
The pr raises the question if we still need it with the switch to JAM? Because right now JAM doesn't support any compression of the code nor the Work package.
|
@bkchr well, I proceed from the current situation. We still have current Polkadot, and we still want to merge RFC-145 and stuff, and people are still interested in PVM-on-Polkadot parachain execution, so why not prepare for that. I know JAM will change a lot, but the moment the change will happen is not guaranteed, IIUC. |
This will clearly not come for Polkadot anymore, because there is no need for it.
It will come next year. |
Extracted from the #6704 to be merged separately.
Introduces the typed compressed blob prefixes specified in RFC-135 and reworks the
sp-maybe-compressed-blobAPI around them.Reasoning for merging it separately from #6704 is: