ewasm / design

Ewasm Design Overview and Specification
Apache License 2.0
1.02k stars 125 forks source link

Propose an ewasm subset for precompiles on the main chain #104

Open axic opened 6 years ago

axic commented 6 years ago

The only features ewasm would need to expose are:

This could be a way to get wasm VMs implemented and experimented with in a more controlled environment on the main chain.

It is not clear whether the precompiles would have "magic gas calculation rules" or just use "a metering process" on them.

chfast commented 6 years ago

BTW, can you pass reference to calldata buffer directly to the contract main function?

axic commented 6 years ago

Sample precompile in Rust: https://github.com/ewasm/ewasm-precompile-sha256/blob/master/src/lib.rs

poemm commented 6 years ago

Great idea. More generally, we can discuss how to constrain Wasm and EEI to get nice properties, such as allowing "magic gas calculation".

axic commented 6 years ago

Proposal to expose these functions from the EEI: