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: switch to wasmi gas metering #14084
Merged
Merged
Changes from all commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
eef15f1
upgrade to wasmi 0.29
agryaznov dee28ff
prepare cleanup
agryaznov efeb0bd
sync ref_time w engine from the stack frame
agryaznov 4fdd5c8
proc_macro: sync gas in host funcs
agryaznov cac61c6
clean benchmarks & schedule: w_base = w_i64const
agryaznov be0df3c
scale gas values btw engine and gas meter
agryaznov 8a32757
(re)instrumentation & code_cache removed
agryaznov f8abec4
remove gas() host fn, continue clean-up
agryaznov 22440ae
address review comments
agryaznov c94821d
Merge branch 'master' into ag-wasmeter
agryaznov 2010ff7
move from CodeStorage&PrefabWasmModule to PristineCode&WasmBlob
agryaznov 100cdcd
refactor: no reftime_limit&schedule passes, no CodeStorage
agryaznov 85a0340
bugs fixing
agryaznov 505f750
fix tests: expected deposit amount
agryaznov c25f634
fix prepare::tests
agryaznov 7f46e7e
update tests and fix bugs
agryaznov 7bf4fbe
update docs
agryaznov cc05e88
bump wasmi 0.30.0
agryaznov 0e2b0ab
benchmarks updated, tests pass
agryaznov e6e3563
refactoring
agryaznov f4ffcf2
s/OwnerInfo/CodeInfo/g;
agryaznov a50b7cf
migration: draft, compiles
agryaznov c6b9f74
migration: draft, runs
agryaznov 132e9ce
migration: draft, runs (fixing)
agryaznov 9935e92
deposits repaid non pro rata
agryaznov 0b9125a
deposits repaid pro rata
agryaznov 08a15b7
better try-runtime output
agryaznov 5f6c1ac
even better try-runtime output
agryaznov b1290f0
benchmark migration
agryaznov 9ffca5d
Merge branch 'master' into ag-wasmeter
agryaznov 94f8476
fix merge leftover
agryaznov ba67751
add forgotten fixtures, fix docs
agryaznov 0ee3293
address review comments
agryaznov a45c538
ci fixes
agryaznov f24a267
cleanup
agryaznov e6c21f3
benchmarks::prepare to return DispatchError
agryaznov 444a97b
Merge branch 'master' into ag-wasmeter
agryaznov d3f59b2
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
f12927d
store memory limits to CodeInfo
agryaznov 0a9b351
ci: roll back weights
agryaznov cff9da7
Merge branch 'master' of https://github.com/paritytech/substrate into…
f0e24c5
".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contr…
2e07393
drive-by: update Readme and pallet rustdoc
agryaznov f465ecf
Merge branch 'master' into ag-wasmeter
agryaznov 94be691
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
721d4b6
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
e226c0e
use wasmi 0.29
agryaznov e57596f
Merge branch 'master' of https://github.com/paritytech/substrate into…
d687f1c
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
76a8c20
use wasmi 0.30 again
agryaznov 0b4bb91
query memory limits from wasmi
agryaznov b15d5a9
better migration types
agryaznov 8eb8710
ci: pull weights from master
agryaznov dae3f32
Merge branch 'master' into ag-wasmeter
agryaznov f42db5d
refactoring
agryaznov b789e6b
".git/.scripts/commands/bench-vm/bench-vm.sh" pallet dev pallet_contr…
2544972
addressing review comments
agryaznov 387bec9
refactor
agryaznov 8be0537
address review comments
agryaznov ffdb8d1
optimize migration
agryaznov eaf7a31
Merge branch 'master' into ag-wasmeter
agryaznov f4dad0f
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
b5ad1de
another review round comments addressed
agryaznov 0e0155f
ci fix one
agryaznov d139757
clippy fix
agryaznov 670ff1a
ci fix two
agryaznov 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| ;; Everything prepared for the host function call, but no call is performed. | ||
| (module | ||
| (import "seal0" "seal_input" (func $seal_input (param i32 i32))) | ||
| (import "env" "memory" (memory 1 1)) | ||
|
|
||
| ;; [0, 8) buffer to write input | ||
|
|
||
| ;; [8, 12) size of the input buffer | ||
| (data (i32.const 8) "\04") | ||
|
|
||
| (func (export "call")) | ||
|
|
||
| (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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| ;; Stores a value of the passed size. The host function is called once. | ||
| (module | ||
| (import "seal0" "seal_input" (func $seal_input (param i32 i32))) | ||
| (import "env" "memory" (memory 1 1)) | ||
|
|
||
| ;; [0, 8) buffer to write input | ||
|
|
||
| ;; [8, 12) size of the input buffer | ||
| (data (i32.const 8) "\04") | ||
|
|
||
| (func (export "call") | ||
| ;; instructions to consume engine fuel | ||
| (drop | ||
| (i32.const 42) | ||
| ) | ||
|
|
||
| (call $seal_input (i32.const 0) (i32.const 8)) | ||
|
|
||
| ) | ||
|
|
||
| (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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| ;; Stores a value of the passed size. The host function is called twice. | ||
| (module | ||
| (import "seal0" "seal_input" (func $seal_input (param i32 i32))) | ||
| (import "env" "memory" (memory 1 1)) | ||
|
|
||
| ;; [0, 8) buffer to write input | ||
|
|
||
| ;; [8, 12) size of the input buffer | ||
| (data (i32.const 8) "\04") | ||
|
|
||
| (func (export "call") | ||
| ;; instructions to consume engine fuel | ||
| (drop | ||
| (i32.const 42) | ||
| ) | ||
|
|
||
| (call $seal_input (i32.const 0) (i32.const 8)) | ||
|
|
||
| ;; instructions to consume engine fuel | ||
| (drop | ||
| (i32.const 42) | ||
| ) | ||
|
|
||
| (call $seal_input (i32.const 0) (i32.const 8)) | ||
| ) | ||
|
|
||
| (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
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.