ewasm / testnet

Testnet planning & documentation
64 stars 19 forks source link

Precompiles in ewasm #42

Closed lrettig closed 6 years ago

lrettig commented 6 years ago

parent of #39 parent of #37 parent of #14

List of precompiles:

lrettig commented 6 years ago

Based on today's standup I'm assigning you @hugo-dc. Hugo's update from today (Hugo if this belongs in one of the subissues please let me know, I wasn't sure):

Compile rust VM methods to wasm, getting elliptic curve precompiles implemented in WASM instead of addresses 6, 7, and 8

lrettig commented 6 years ago

Question: are these testnet MVP-critical? If so do we need all of the precompiles, or only a subset?

lrettig commented 6 years ago

@cdetrio answer to my question from today's standup:

lrettig commented 6 years ago

@hugo-dc update from yesterday:

yesterday: changed ecadd contract to return the result instead of storing it, created a test case to test this contract today: I’ll add the contract to the genesis file in the testnet repo, and more ewasm tests

lrettig commented 6 years ago

Hi @hugo-dc how is this coming along? How much work is left? Is it still in progress? Thanks :)

lrettig commented 6 years ago

Hey @hugo-dc I haven't heard you guys mention this recently, how's it going?

hugo-dc commented 6 years ago

Last thingI did about ecadd in Rust was to add it as a precompiled contract in the testnet: https://github.com/hugo-dc/testnet/tree/ecadd-demo

Then I deployed a contract which calls that precompiled and stores the result, and the result was as expected.

https://github.com/hugo-dc/testnet-demo/tree/ecadd-demo

Next thing I want to do is to run this test agains the ecadd precompiled:

https://github.com/ethereum/tests/blob/develop/src/GeneralStateTestsFiller/stZeroKnowledge/pointAddFiller.json#L239

@cdetrio told me that the rust contract may need some changes in order to pass that test, I'll try to make it pass.

lrettig commented 6 years ago

Thanks for the update! 🙏

axic commented 6 years ago

https://github.com/ewas/ewasm-precompiles implements all except: ecrecover, modexp, ecmul, ecpairing