This site is in maintenance mode. Features may be unstable.
Warning! On-chain actions are not disabled.
Fix HostConfiguration
(Same as on Kusama https://kusama.polkassembly.io/referenda/173) # Fix HostConfiguration (maxCodeSize to 3 MiB) The current Polkadot `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`](https://github.com/paritytech/polkadot/blob/v0.9.41/runtime/parachains/src/configuration.rs#L376) is never larger than `MAX_CODE_SIZE`. This is violated on Polkadot since the concrete `max_code_size` on-chain is 10 MiB and `MAX_CODE_SIZE` is only [3 MiB](https://github.com/paritytech/polkadot/blob/v0.9.41/primitives/src/v2/mod.rs#L331). You can verify this by querying [PolkadotJS](https://polkadot.js.org/apps/#/js): ```js 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](https://github.com/paritytech/polkadot/blob/v0.9.41/runtime/parachains/src/configuration.rs#L1324): "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](https://github.com/paritytech/polkadot/issues/7108) and [polkadot/#7105](https://github.com/paritytech/polkadot/issues/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](https://github.com/paritytech/polkadot/issues/7108#issuecomment-1516220831) showed that the largest is currently 1.7 MiB, that is about 57% of the new limit. So no problem here. ## Impact on Developers \-
Proposal Passed
3
of 3Summary
Voting Data
Approval%
Support%
Threshold0.00%
Threshold0.00%
Comments