mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-23 07:21:17 +00:00
[contracts] Add integrity checks by pallet hook (#12993)
* integrity test for MaxCodeLen and CallStack::len() * integrity test for MaxDebugBufferLen * addressed review comments * fix append_debug_buffer() * ci fix * updated code_len_limit formula after further discussion * enlarged mem safe margin after discussion * +doc to Config trait associated types * Apply suggestions from code review Co-authored-by: Alexander Theißen <alex.theissen@me.com> * more lil fixes from code review feedback * lowered max call depth to satisfy mem limits * fix node runtime pallet params to satisfy integrity check * fix max call depth value calc Co-authored-by: Alexander Theißen <alex.theissen@me.com>
This commit is contained in:
@@ -394,7 +394,7 @@ impl Config for Test {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type CallFilter = TestFilter;
|
||||
type CallStack = [Frame<Self>; 31];
|
||||
type CallStack = [Frame<Self>; 5];
|
||||
type WeightPrice = Self;
|
||||
type WeightInfo = ();
|
||||
type ChainExtension =
|
||||
@@ -405,7 +405,7 @@ impl Config for Test {
|
||||
type DepositPerByte = DepositPerByte;
|
||||
type DepositPerItem = DepositPerItem;
|
||||
type AddressGenerator = DefaultAddressGenerator;
|
||||
type MaxCodeLen = ConstU32<{ 128 * 1024 }>;
|
||||
type MaxCodeLen = ConstU32<{ 123 * 1024 }>;
|
||||
type MaxStorageKeyLen = ConstU32<128>;
|
||||
type UnsafeUnstableInterface = UnstableInterface;
|
||||
type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>;
|
||||
|
||||
Reference in New Issue
Block a user