Polkassembly Logo

Create Pencil IconCreate
OpenGov

Notice: Polkadot has migrated to AssetHub. Balances, data, referenda, and other on-chain activity has moved to AssetHub.Learn more

View All Root

Untitled Post

inRoot
3 years ago
Executed

This is a ReferendumV2 post. It can only be edited by the proposer of the post 5E4V5P3D3t3vMj2FyXz7dLrgJ6GaZjZQ1AdMHjbtkUT89SLS.

Comments (3)

3 years ago

(Sorry cannot edit above due to signer restrictions)

Fix HostConfiguration (maxCodeSize to 3 MiB)

The current Kusama HostConfiguration does not fulfill all assumptions about its consistency. This proposal aims at correcting that by modifying the on-chain config.

Problem

The HostConfiguration::consistency_check function asserts that the on-chain max_code_size is never larger than MAX_CODE_SIZE. This is violated on Kusama since the concrete max_code_size on-chain is 10 MiB and MAX_CODE_SIZE is only 3 MiB.
You can verify this by querying PolkadotJS:

let config = await api.query.configuration.activeConfig();
console.log(config.maxCodeSize / (1024*1024), "MiB");
// Prints 10 MiB

It is neccecary to correct this since otherwise the consistency_check will stay a No-OP with the assumption: "You cannot break something that is already broken".

Proposal

Set the on-chain max_code_size back to a sane value of 3 MiB. A larger value is not expected to work due to networking restrictions. Related discussions about this are in polkadot/#7108 and polkadot/#7105.

Impact on Para*s

Parachain/Parathread teams should check that all queued runtime upgrade have a size of at most 3 MiB (the Runtime Size as reported by srtool). A sweep across all parachains showed that the largest is currently 1.7 MiB, that is about 57% of the new limit. So no problem here.

Impact on Developers

-

3 years ago

(Sorry cannot edit above due to signer restrictions)

Fix HostConfiguration (maxCodeSize to 3 MiB)

The current Kusama HostConfiguration does not fulfill all assumptions about its consistency. This proposal aims at correcting that by modifying the on-chain config.

Problem

The HostConfiguration::consistency_check function asserts that the on-chain max_code_size is never larger than MAX_CODE_SIZE. This is violated on Kusama since the concrete max_code_size on-chain is 10 MiB and MAX_CODE_SIZE is only 3 MiB.
You can verify this by querying PolkadotJS:

let config = await api.query.configuration.activeConfig();
console.log(config.maxCodeSize / (1024*1024), "MiB");
// Prints 10 MiB

It is neccecary to correct this since otherwise the consistency_check will stay a No-OP with the assumption: "You cannot break something that is already broken".

Proposal

Set the on-chain max_code_size back to a sane value of 3 MiB. A larger value is not expected to work due to networking restrictions. Related discussions about this are in polkadot/#7108 and polkadot/#7105.

Impact on Para*s

Parachain/Parathread teams should check that all queued runtime upgrade have a size of at most 3 MiB (the Runtime Size as reported by srtool). A sweep across all parachains showed that the largest is currently 1.7 MiB, that is about 57% of the new limit. So no problem here.

Impact on Developers

-

Load more comments
PleaseLogin to comment

Proposal Passed

Help Center

Report an Issue
Feedback
Terms and Conditions
Github

Our Services

Docs
Terms of Website
Privacy Policy

A House of Commons Initiative.

Polka Labs Private Limited 2026

All rights reserved.

Terms and ConditionsTerms of Website
Privacy Policy