Skip to content

Commit

Permalink
change MaxCodeSize to 4M+512
Browse files Browse the repository at this point in the history
  • Loading branch information
atenjin committed Apr 22, 2021
1 parent aba6bbc commit 6c79360
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion bin/europa/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,11 @@ parameter_types! {
<Runtime as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(1) -
<Runtime as pallet_contracts::Config>::WeightInfo::on_initialize_per_queue_item(0)
)) / 5) as u32;
pub MaxCodeSize: u32 = 1024 * 1024;
// for substrate/client/basic-authorship/src/basic_authorship.rs#55
// `DEFAULT_BLOCK_SIZE_LIMIT` is 4 * 1024 * 1024 + 512 in substrate now,
// thus the max code size could not more than this limit now.
// this limit would be removed when europa use self `basic_authorship`
pub MaxCodeSize: u32 = 4 * 1024 * 1024 + 512;
}

impl pallet_contracts::Config for Runtime {
Expand Down

0 comments on commit 6c79360

Please sign in to comment.