mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 12:11:02 +00:00
Validate code when scheduling uprades from registrar (#3232)
Currently, anyone can registrar a code that exceeds the code size limit when performing the upgrade from the registrar. This PR fixes that and adds a new test to cover this. cc @bkchr @eskimor
This commit is contained in:
@@ -362,6 +362,9 @@ pub const PARACHAINS_INHERENT_IDENTIFIER: InherentIdentifier = *b"parachn0";
|
||||
/// The key type ID for parachain assignment key.
|
||||
pub const ASSIGNMENT_KEY_TYPE_ID: KeyTypeId = KeyTypeId(*b"asgn");
|
||||
|
||||
/// Compressed or not the wasm blob can never be less than 9 bytes.
|
||||
pub const MIN_CODE_SIZE: u32 = 9;
|
||||
|
||||
/// Maximum compressed code size we support right now.
|
||||
/// At the moment we have runtime upgrade on chain, which restricts scalability severely. If we want
|
||||
/// to have bigger values, we should fix that first.
|
||||
|
||||
Reference in New Issue
Block a user