mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-25 07:05:44 +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:
@@ -134,9 +134,6 @@ pub struct Limits {
|
||||
/// The maximum length of a subject in bytes used for PRNG generation.
|
||||
pub subject_len: u32,
|
||||
|
||||
/// The maximum nesting level of the call stack.
|
||||
pub call_depth: u32,
|
||||
|
||||
/// The maximum size of a storage value and event payload in bytes.
|
||||
pub payload_len: u32,
|
||||
}
|
||||
@@ -532,7 +529,6 @@ impl Default for Limits {
|
||||
table_size: 4096,
|
||||
br_table_size: 256,
|
||||
subject_len: 32,
|
||||
call_depth: 32,
|
||||
payload_len: 16 * 1024,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user