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 from parity-wasm-based to wasmi-based module validation
#14449
Merged
Merged
Changes from 1 commit
Commits
Show all changes
83 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 fbc43ae
query memory limits from wasmi
agryaznov cd54ff2
save: scan_exports ported, compiles
agryaznov b548064
save (wip, not compiles)
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…
3cadbb1
Merge branch 'ag-wasmeter' into ag-wasmi-validation
agryaznov eba148b
scan_imports ported
agryaznov ca5938d
scan_export ported, other checks removed
agryaznov c2c3d9b
tests fixed
agryaznov 56dc2df
drop wasmparser and parity-wasm dependencies
agryaznov 086e219
typo fix
agryaznov 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 18236e1
Merge branch 'ag-wasmeter' into ag-wasmi-validation
agryaznov 0f83c77
allow stored modules to have no memory imports
agryaznov ca111cf
Merge branch 'master' into ag-wasmi-validation
agryaznov bf52770
rollback: allow stored modules to have no memory imports
agryaznov 824ef6d
Merge branch 'master' of https://github.com/paritytech/substrate into…
b55dbcb
".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
39fb730
address review comments
agryaznov ac9d5c2
Merge branch 'ag-wasmi-validation'
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
tests fixed
tests fixed
- Loading branch information
commit c2c3d9b3c55ecac9cbc3fcbacb98159f4d8fcdab
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,5 +1,6 @@ | ||
| ;; A valid contract which does nothing at all | ||
| (module | ||
| (import "env" "memory" (memory 1 1)) | ||
| (func (export "deploy")) | ||
| (func (export "call")) | ||
| ) |
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
1 change: 1 addition & 0 deletions
1
...e/contracts/fixtures/invalid_contract.wat → ...cts/fixtures/invalid_contract_no_call.wat
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,4 +1,5 @@ | ||
| ;; Valid module but missing the call function | ||
| (module | ||
| (import "env" "memory" (memory 1 1)) | ||
| (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,5 @@ | ||
| ;; A valid contract which does nothing at all | ||
| (module | ||
| (func (export "deploy")) | ||
| (func (export "call")) | ||
| ) |
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.