Alexander Theißen
5e3b06de05
Fix Instruction::CallIndirect stack height metering
...
The stack height metering for functions containing
CallIndirect was wrong. The code did not take into
consideration that is pops one value from the stack.
The effect was that the stack height of functions
using this instruction was higher than its real height.
2020-10-13 11:43:59 +02:00
Alexander Theißen
2306999c9c
Fix using Write::write without checking the return value
...
Use write_all instead which garantues that the whole buffer
was written.
2020-10-13 11:43:40 +02:00
NikVolf
016425a25b
bump to 0.14
2020-08-04 13:54:57 +03:00
Alexander Theißen
409ced002a
Allow specifying the module of the imported 'gas' function ( #140 )
...
* No need for mem::replace when doing a simple assignment
* Allow specifying the module of the imported 'gas' function
This allows users to place the imported function inside a custom
module instead of the generic 'env' module.
2020-08-04 13:53:53 +03:00
NikVolf
b61f6dd52f
bump to 0.13
2020-08-03 14:59:57 +03:00
Nikolay Volf
e026abe166
Export internal globals instrumentation ( #138 )
...
* export internal globals
* add test
* Update src/export_globals.rs
Co-authored-by: Sergei Shulepov <sergei@parity.io >
* address review
Co-authored-by: Sergei Shulepov <sergei@parity.io >
2020-08-03 14:58:24 +03:00
Nikolay Volf
8c6dec11a4
Merge pull request #139 from paritytech/update-wabt
...
Update wabt to 0.10
2020-08-03 14:20:20 +03:00
NikVolf
3f2935df9c
update wabt
2020-08-03 14:00:07 +03:00
Nikolay Volf
dcf189b822
Merge pull request #135 from osolmaz/correct-spelling
...
Corrected spelling error
2020-07-29 16:05:53 +03:00
Sergei Shulepov
19b5fb50cb
Merge pull request #137 from osolmaz/correct-instruction-type
...
Corrected InstructionType's for GetGlobal and SetGlobal
2020-07-27 22:26:16 +02:00
Onur Solmaz
1e8953a9cb
Corrected InstructionType's for GetGlobal and SetGlobal
2020-07-27 13:56:53 +02:00
Onur Solmaz
377684f9c7
Corrected spelling error
2020-07-23 20:08:03 +02:00
Nikolay Volf
e89abb0c17
Merge pull request #134 from bddap/bddap-nostd-on-stable
...
Bump 'parity-wasm' version to enable no_std builds on stable.
2019-11-01 16:36:11 +03:00
Andrew Dirksen
e6336a4a90
Travis-ci was configured to build with no_std only when using rust nightly.
...
This commit tells travis to attempt no_std builds for both nightly and stable.
2019-10-31 16:56:11 -07:00
Andrew Dirksen
a881cf12bb
Bump 'parity-wasm' version to enable no_std builds on stable.
...
Bump own version in preparation for cargo publish.
Bump cli verion to match.
2019-10-31 15:52:09 -07:00
NikVolf
2fe761f8c4
bump cli to 0.11 as well
2019-09-09 16:58:21 +03:00
Sergey Pepyakin
87761dad61
Bump pwasm-utils
0.11.0
2019-09-05 22:58:03 +02:00
Sergei Pepyakin
a768692bbe
Merge pull request #133 from paritytech/bump-parity-wasm
...
Bump parity-wasm to latest version
2019-09-05 22:50:02 +02:00
Demi M. Obenour
ea4cde0e7d
Bump parity-wasm to latest version
...
to allow Substrate to do the same
2019-09-04 18:14:10 -04:00
NikVolf
f9d8b722b5
bump to 0.10
2019-08-29 18:57:46 +03:00
Nikolay Volf
39f234e441
Merge pull request #129 from oscoin/fix-pwasm
...
Preserve "deploy" when optimizing pwasm ctor module
2019-08-29 18:57:00 +03:00
Thomas Scholtes
b4f9be733d
Preserve "deploy" when optimizing pwasm ctor module
...
When optimizing the constructor module for a PWasm contract the "deploy" symbol is preserved instead of the "call"
symbol. Before this change `build` would error for PWasm contracts because `pack_instance` would not find the "deploy"
symbol in the optimized contract.
Fixes #128
2019-08-29 16:27:48 +02:00
NikVolf
155c7253c3
bump to 0.9
2019-08-02 15:21:44 +03:00
Nikolay Volf
c9cdef4c51
Merge pull request #126 from paritytech/ser-update-pwasm
...
Update parity-wasm to 0.39
2019-08-02 15:20:32 +03:00
Sergey Pepyakin
2b5026a6c5
Add notice about parity-wasm features
2019-07-30 16:48:58 +02:00
Sergey Pepyakin
a774a2cb29
Update parity-wasm to 0.39
2019-07-30 16:44:05 +02:00
Sergei Pepyakin
6fd636a41d
Merge pull request #125 from jimpo/gas-fuzzing
...
Validate the gas metering algorithm using fuzzer.
2019-07-30 13:04:51 +02:00
Jim Posen
5792da28d5
Fix typo
...
Co-Authored-By: Sergei Pepyakin <s.pepyakin@gmail.com >
2019-07-25 12:37:57 +02:00
Jim Posen
f8673d5b87
Fix dev dependency crate imports.
2019-07-25 11:05:25 +02:00
Jim Posen
5180d694ce
Validate the gas metering algorithm using fuzzer.
2019-07-19 11:25:54 +02:00
NikVolf
a150df8703
bump to 0.8.1
2019-07-17 18:40:00 +03:00
Sergei Pepyakin
ae412c45f1
Merge pull request #124 from paritytech/fix-warnings
...
Fix warnings
2019-07-17 17:22:31 +03:00
Nikolay Volf
6f46ef5211
Update README.md
2019-07-17 17:02:55 +03:00
NikVolf
026b0502bb
fix warnings
2019-07-17 17:01:15 +03:00
NikVolf
2c173fee26
bump to 0.8.0 due to change in gas counting
2019-07-17 16:57:28 +03:00
Sergei Pepyakin
0870ce6646
Merge pull request #122 from jimpo/basic-block
...
Rewrite gas metering algorithm to handle branches
2019-07-17 16:19:52 +03:00
Jim Posen
82bd972333
!fixup lowest_forward_br rename and field docs.
2019-07-12 10:45:01 +02:00
Jim Posen
93abbcfe56
Add gas injection unit test for correct else behavior.
2019-07-12 10:30:11 +02:00
Jim Posen
ed7f31ec20
Use macro + WAT to make gas injection unit tests more readable.
2019-07-12 10:15:37 +02:00
Jim Posen
b5472bcd8f
!fixup Address review comments.
2019-07-11 16:45:46 +02:00
Jim Posen
b3f8f62105
Update gas expectations.
2019-07-04 17:57:40 +02:00
Jim Posen
0cf7daa9e5
Update high level inject_gas_counter function documentation.
2019-07-04 17:57:40 +02:00
Jim Posen
24924f59ec
Change gas metering injection code to handle branches properly.
2019-07-04 17:57:40 +02:00
Jim Posen
de60f491b4
Fix ordering of actual and expected arguments in assert_eq!.
2019-07-04 17:57:40 +02:00
Jim Posen
4c0f42c6fc
Perform gas metering injection step in linear time.
...
Previously the code was quadratic in the worst case as inserting into
the middle of a vector is a linear-time operation.
2019-07-04 17:57:40 +02:00
Jim Posen
c3d10a2619
Merge pull request #121 from jimpo/gas-docs
...
Documentation of gas metering instrumentation process & cleanup.
2019-07-01 17:25:45 +02:00
Jim Posen
863744b1fc
Add gas test confirming that br instructions do not end blocks.
2019-07-01 17:02:21 +02:00
Jim Posen
89e13ee901
Cleanup stack height Context.
...
Removes unnecessary Options and fixes typos.
2019-06-26 12:48:51 +02:00
Jim Posen
929e0ec2c0
Documentation of gas metering instrumentation process.
2019-06-26 12:47:30 +02:00
Nikolay Volf
f6a1a6a066
Merge pull request #118 from paritytech/idents
...
Fix identation
2019-04-10 07:59:26 +03:00