Skip to content

Implement RFC-135: compressed blob prefixes#12656

Open
s0me0ne-unkn0wn wants to merge 3 commits into
masterfrom
s0me0ne/rfc135
Open

Implement RFC-135: compressed blob prefixes#12656
s0me0ne-unkn0wn wants to merge 3 commits into
masterfrom
s0me0ne/rfc135

Conversation

@s0me0ne-unkn0wn

Copy link
Copy Markdown
Contributor

Extracted from the #6704 to be merged separately.

Introduces the typed compressed blob prefixes specified in RFC-135 and reworks the sp-maybe-compressed-blob API around them.

Reasoning for merging it separately from #6704 is:

  • One of the concerns about prefixes was that we could never get rid of the legacy prefix because that would require all the collators to update their code. Moving this PR well before Polkadot Node 2026 #9876 eliminates this concern, as the latter will force all the collators to update their code anyway;
  • Extracting it from PolkaVM parachain runtimes MVP #6704 makes the latter easier to review.

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>
@cla-bot-2021

cla-bot-2021 Bot commented Jul 14, 2026

Copy link
Copy Markdown

User @claude, please sign the CLA here.

@s0me0ne-unkn0wn s0me0ne-unkn0wn added the T0-node This PR/Issue is related to the topic “node”. label Jul 14, 2026
@s0me0ne-unkn0wn
s0me0ne-unkn0wn marked this pull request as ready for review July 14, 2026 15:49
@s0me0ne-unkn0wn
s0me0ne-unkn0wn requested a review from koute as a code owner July 14, 2026 15:49
@s0me0ne-unkn0wn
s0me0ne-unkn0wn requested review from bkchr and ggwpez July 14, 2026 15:50

@bkchr bkchr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@s0me0ne-unkn0wn

Copy link
Copy Markdown
Contributor Author

@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.

@bkchr

bkchr commented Jul 15, 2026

Copy link
Copy Markdown
Member

and people are still interested in PVM-on-Polkadot parachain execution

This will clearly not come for Polkadot anymore, because there is no need for it.

but the moment the change will happen is not guaranteed, IIUC.

It will come next year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T0-node This PR/Issue is related to the topic “node”.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants