Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 01 2018 13:34
    @lrettig banned @matrixbot
mishaaaa
@mishaaaa
Hi, I was trying out the project (https://medium.com/wasm/compile-and-deploy-an-erc20-contract-on-ewasm-d91d890665e6). I failed to connect to ewasm test network from metamask. It tries to connect for some time and shows that it cannot be connected.
mishaaaa
@mishaaaa
metamask.jpg
Can someone help me point out the error also please let me know whether the public testnet URL http://ewasm.ethereum.org:8545 is up and running. Thanks in advance.
Achala Bhatt
@AchalaSB
Hey, have few questions on Gas metering. (referred https://ewasm.readthedocs.io/en/mkdocs/determining_wasm_gas_costs/)
  1. Cycles are calculated based on bare metal CPU cycle or it is calculated based on wasm virtual machine cycle?
  2. How the cycles are calculated ?
Hugo
@hugo-dc
@mishaaaa you can try running a local geth node, using this: https://github.com/jwasinger/ewasm-dev-env , after that you can connect Metamask to the local node: http://localhost:8545.
cdetrio
@cdetrio
@AchalaSB I believe those cycle numbers are taken from a book, in the references (the Agner Fog book?)
right now the gas cost table is a best guess. It needs to be evaluated by benchmarking, to see how accurately those gas costs can predict runtime in various engines. that's one of our current projects
mishaaaa
@mishaaaa
@hugo-dc Thanks for the reply. I was able to run a local node following the given link. But while deploying a contract the metamask shows that the account have insufficient funds. Can you let me know how can I get some ether for that account. Thanks in advance.
Hugo
@hugo-dc
@mishaaaa you can import the premined account in Metamask using this pk: https://github.com/jwasinger/ewasm-dev-env/blob/master/geth/keys/prefunded/prefunded-priv.txt
Achala Bhatt
@AchalaSB
@cdetrio can you share me link of the book.
cdetrio
@cdetrio
@AchalaSB it's in the page you linked, the References section.
Instruction tables by Agner Fog: http://www.agner.org/optimize/instruction_tables.pdf
Achala Bhatt
@AchalaSB

In the eWASM readme books it is mentioned that

Assumption 2: 1 second of CPU execution equals to 10 million gas (i.e. 1 gas equals to 0.1 us).

  1. On what basis this assumptions are made?
  2. And how the cycles are mentioned? Checked in book http://www.agner.org/optimize/instruction_tables.pdf in Haswell section couldn't able see those cycles for those operation
Screenshot from 2019-12-17 15-58-05.png
Achala Bhatt
@AchalaSB
How come it is 80 cycles for DIV opcode?
Paweł Bylica
@chfast
@AchalaSB It is just so slow.
Achala Bhatt
@AchalaSB
@chfast I know DIV operation is complex. but is the 80 cycles is an estimated number?
Or Is the cycle is exactly 80?

In Haswell table for DIV r32- it is mentioned the latency range 22-29
and for DIV r64- it is mentioned the latency range 32-96

But in gas-cost table for both i32 and i64 type it is mentioned 80 cycle

Mamy Ratsimbazafy
@mratsim
MOD and DIV are at least 55 cycles
I have a small bench to measure it here, should be easily ported to C/C++: https://github.com/status-im/nim-beacon-chain/blob/nbench/nbench/platforms/x86.nim#L100-L122
just make sure to use volatile load/store
Alex Beregszaszi
@axic
Oh nice!
@AchalaSB the 80 came from the haswell specs and not third party sources (it should be linked in the markdown)
cdetrio
@cdetrio
@AchalaSB here's a place where it says 80 for DIV:
Screen Shot 2019-12-19 at 10.59.27 AM.png
oops I meant this one
Screen Shot 2019-12-19 at 11.01.16 AM.png
Paweł Bylica
@chfast
We still should be taking the upper bound (95) in this case.
Alex Beregszaszi
@axic
There was a different kind of spec with a fixed 80 cycle count, but can’t seem to find it. It wasn’t a spreadsheet.
Greg Colvin
@gcolvin
I wish we had some notion of how far off we can be and not get DoSed. If the code is interpreted these numbers will get drowned to some extent by the interpreter overhead, and if it is compiled the compiler itself and the tricks CPUs play will make cycle-counting only a guess. And the counting itself can be a significant overhead that will depend on how smart the injection is and how well the compiler can optimize it.
Achala Bhatt
@AchalaSB
Thanks
@axic can you share the document/spreadsheet you are referring to?
@jakelang you might know the reference book for CPU cycle, as you have commited for eWASM gas cost table.
https://github.com/ewasm/design/blob/mkdocs/docs/determining_wasm_gas_costs.md
Alex Beregszaszi
@axic

This is the original source of the document: https://gist.github.com/axic/5bf506728005864461454dd4d37a7f37

And it refers to “Appendix C” of https://software.intel.com/sites/default/files/managed/9e/bc/64-ia-32-architectures-optimization-manual.pdf of which @cetrio copy pasted.

Anyway, I wrote it over 3 years so don’t remember where the 80 came from.

Alex Beregszaszi
@axic
It likely seems to be a simplification of that spreadsheet.
mishaaaa
@mishaaaa
Hi all, Is it possible to write smart contracts in any language (like c,c++,rust,assemblyscrip)t using webassembly concept in ewasm. If yes it would be great if someone can share some links which can be used to do a quick POC on the same. Thanks in advance. :)
Jacques Wagener
@jacqueswww
And search for wrc20 for more examples
Achala Bhatt
@AchalaSB
Hi, what is cost consumed for const in ewasm?
(or ex: if there is any equation like 1 + ( x/100) ) What is the cost for 1 and 100 ?
And what is the cost for keccak256 ?
Ajoy Das
@ajoydas
Where can I find Hera benchmarking results or is there any way to run evmone benchmark tests with Hera?
Paweł Bylica
@chfast

@ajoydas Hera wraps 3 different wasm engines. These engines and others were benchmarked by @cdetrio and others. I would need to dig up some slides presenting results. But running evmone benchmark suite in Hera is not directly possible, because these are EVM bytecodes, not wasm.

For EVM benchmarking results see https://github.com/ewasm/benchmarking/.

Ajoy Das
@ajoydas
@chfast thanks for the reply. It would be helpful if you can share the slides.
So, if we need to compare the performances between ewasm and evm, what is the correct way?
Will compiling benchmarking solidity contracts both in ewasm byte code and evm byte code and then taking the performance statistics be a proper way?
mishaaaa
@mishaaaa
Hello guys, I was trying out the project https://github.com/second-state/soll and was able to connect the metamask to ewasm testnetwork (http://www.ewasm.ethereum.org:8545). I was not able to provide fund to the account using faucet (http://ewasm.ethereum.org/explorer/faucet#transaction). Its showing me an error of "privateKey not set in config file" . It would be great if anyone can suggest me how to solve the error or any other way to get some fund in the account.
Jacques Wagener
@jacqueswww
ewasm testnet is dead
Travis Rivera
@ResourceHog
Hi@!
SherlockHolmes2020
@SherlockHolmes2020
Hi
mishaaaa
@mishaaaa
Hi @jacqueswww , Thanks for the information. Is there any alternative solutions or testnetwork for the same.
Jacques Wagener
@jacqueswww
Probably could try and fire up your own local testnet