[contracts] make `debug_message` execution outcome invariant to node debug logging setting (#13197)
* update benchmark for seal_debug_message * add seal_debug_message_per_kb benchmark * un-fallable debug buffer: silently drops excessive and wrong utf-8 encoded messages * charge debug_message per byte of the message * improved benchmark * cap debug_message * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts * Apply suggestions from code review Co-authored-by:Alexander Theißen <alex.theissen@me.com> * fix applied buggy suggestion * make sure i*1024 < MaxDebugBufferLen * fix schedule for our non-batched benchmark * Switch to a `wasmtime` fork with LTO linking failure workaround * ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts --------- Co-authored-by: command-bot <> Co-authored-by:
Alexander Theißen <alex.theissen@me.com> Co-authored-by:
Jan Bujak <jan@parity.io>
Showing
- substrate/Cargo.lock 19 additions, 38 deletionssubstrate/Cargo.lock
- substrate/client/executor/wasmtime/Cargo.toml 1 addition, 1 deletionsubstrate/client/executor/wasmtime/Cargo.toml
- substrate/frame/contracts/fixtures/debug_message_invalid_utf8.wat 17 additions, 7 deletions...e/frame/contracts/fixtures/debug_message_invalid_utf8.wat
- substrate/frame/contracts/fixtures/debug_message_logging_disabled.wat 1 addition, 1 deletion...ame/contracts/fixtures/debug_message_logging_disabled.wat
- substrate/frame/contracts/src/benchmarking/mod.rs 66 additions, 7 deletionssubstrate/frame/contracts/src/benchmarking/mod.rs
- substrate/frame/contracts/src/exec.rs 17 additions, 34 deletionssubstrate/frame/contracts/src/exec.rs
- substrate/frame/contracts/src/lib.rs 0 additions, 2 deletionssubstrate/frame/contracts/src/lib.rs
- substrate/frame/contracts/src/schedule.rs 4 additions, 0 deletionssubstrate/frame/contracts/src/schedule.rs
- substrate/frame/contracts/src/tests.rs 2 additions, 1 deletionsubstrate/frame/contracts/src/tests.rs
- substrate/frame/contracts/src/wasm/mod.rs 2 additions, 7 deletionssubstrate/frame/contracts/src/wasm/mod.rs
- substrate/frame/contracts/src/wasm/runtime.rs 17 additions, 18 deletionssubstrate/frame/contracts/src/wasm/runtime.rs
- substrate/frame/contracts/src/weights.rs 1226 additions, 948 deletionssubstrate/frame/contracts/src/weights.rs
- substrate/primitives/wasm-interface/Cargo.toml 1 addition, 1 deletionsubstrate/primitives/wasm-interface/Cargo.toml
Please register or sign in to comment