This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[contracts] make debug_message execution outcome invariant to node debug logging setting
#13197
Merged
Merged
Changes from 11 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
2d507e9
update benchmark for seal_debug_message
agryaznov 211e36f
add seal_debug_message_per_kb benchmark
agryaznov f260505
un-fallable debug buffer: silently drops excessive and wrong utf-8 en…
agryaznov 47c2d8f
charge debug_message per byte of the message
agryaznov 48551f7
improved benchmark
agryaznov 65f5908
cap debug_message
agryaznov bd91c0f
Merge branch 'master' of https://github.com/paritytech/substrate into…
08ce450
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
0f3b7a4
Apply suggestions from code review
agryaznov dd324bd
fix applied buggy suggestion
agryaznov a96d31b
Merge branch 'master' into ag-debug-buffer
agryaznov 1fc85dc
make sure i*1024 < MaxDebugBufferLen
agryaznov 20a0718
fix schedule for our non-batched benchmark
agryaznov 333f8c6
Merge remote-tracking branch 'origin/master' into HEAD
koute 432dd53
Switch to a `wasmtime` fork with LTO linking failure workaround
koute 5091c60
Merge branch 'master' of https://github.com/paritytech/substrate into…
3d5ff99
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,28 @@ | ||
| ;; Emit a "Hello World!" debug message | ||
| ;; Emit a debug message with an invalid utf-8 code | ||
| (module | ||
| (import "seal0" "seal_debug_message" (func $seal_debug_message (param i32 i32) (result i32))) | ||
| (import "env" "memory" (memory 1 1)) | ||
|
|
||
| (data (i32.const 0) "\fc") | ||
|
|
||
| (func (export "call") | ||
| (call $seal_debug_message | ||
| (i32.const 0) ;; Pointer to the text buffer | ||
| (i32.const 12) ;; The size of the buffer | ||
| (func $assert_eq (param i32 i32) | ||
| (block $ok | ||
| (br_if $ok | ||
| (i32.eq (get_local 0) (get_local 1)) | ||
| ) | ||
| (unreachable) | ||
| ) | ||
| ;; the above call traps because we supplied invalid utf8 | ||
| unreachable | ||
| ) | ||
|
|
||
| (func (export "call") | ||
| (call $assert_eq | ||
| (call $seal_debug_message | ||
| (i32.const 0) ;; Pointer to the text buffer | ||
| (i32.const 12) ;; The size of the buffer | ||
| ) | ||
| (i32.const 0) ;; Success return code | ||
| ) | ||
| ) | ||
|
|
||
| (func (export "deploy")) | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.