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
Hugo
@hugo-dc
it is working for me
please check if indentation is correct
oracle3
@oracle3
oracle3
@oracle3
if use https://github.com/hugo-dc/wrc20-rust/blob/master/chisel.yml,show:
Ruleset ewasm:
remapimports: Already OK; not translated
trimexports: Translated
verifyimports: Malformed
verifyexports: OK
repack: OK
but wasm still include evn ,not ethereum
Alex Beregszaszi
@axic
Can you share your wasm blob?
oracle3
@oracle3

include "ewasm.h"

typedef unsigned char BYTE; // 8-bit byte

void main()
{
char hello[] = "hello world!";
BYTE buf[32];
memcpy(buf,hello,sizeof(hello));
finish((i32ptr*)buf,32);
}
See https://www.jianshu.com/p/5061caad3b7b for details.

oracle3
@oracle3
Alex Beregszaszi
@axic
You would need to use ethereum_finish() in C in order for it to be detected.
Though I’m not sure where ewasm.h comes from and what function name it generates.
Mamy Ratsimbazafy
@mratsim

Does someone have benchmark with SIMD to submit to this thread: WebAssembly/simd#81.

int64x2 SIMD are currently planned to be removed if nothing justifies their inclusion.

Alex Beregszaszi
@axic
We’ve briefly discussed it at the meeting with the team working on SIMD. We didn’t yet had any conclusive evidence any of the SIMD operations are useful to our use cases.
Mamy Ratsimbazafy
@mratsim
I can see potential use with big-ints (but probably limbs would be int32) and hashes
Alex Beregszaszi
@axic
Yes, there are potential use cases, but they weren’t benchmarked
Alex Beregszaszi
@axic
Also it seems that it cannot be utilised well in an interpreter, given the overheads, unless one decides to translate blocks which use SIMD instructions. That however is already in the realms of a compiler engine.
oracle3
@oracle3
@hugo-dc The API of the code doesn't match,ewasm/rust-ewasm#7
oracle3
@oracle3
@axic Is there an example reference for API usage?
Hugo
@hugo-dc
@oracle3 seems it is using an old branch of ewasm-rust-api , I will update the example
Hugo
@hugo-dc
@oracle3 also, you can take a look at this repository, which is using a more recent version of the ewasm-rust-api: https://github.com/ewasm/ewasm-precompiles
cc14514
@cc14514
error: no matching version ^0.19 found for package curve25519-dalek
cc14514
@cc14514
error[E0425]: cannot find function memory_grow in module wasm32
oracle3
@oracle3
@hugo-dc https://github.com/hugo-dc/wrc20-rust,This contract is published on the chain and can not pass Sentinel contract detection. How to debug and modify it? Is there any specific method?
oracle3
@oracle3
[wasm-validator error in function $43] 2 != 1: function body type must match, if function returns, on
[i32] (grow_memory
[i64] [i64] (block (result i64)
[none] (set_local $1
[i64] (get_local $0)
)
[none] (call $fimport$7
[i64] (i64.mul
[i64] (get_local $0)
[i64] (i64.const 262144)
)
)
[i64] (get_local $1)
)
)
How to solve this kind of mistake?
Hugo
@hugo-dc
@oracle3 that contract cannot be deployed to the current testnet, take a look at that repository's README
@oracle3 maybe you would like to take a look at scout, https://github.com/ewasm/scout/ if you want to continue experimenting with ewasm.
oracle3
@oracle3
@axic I use https://github.com/ewasm/sentinel-rs compiled and processed contracts to replace go-ethereum sentry contracts. Why is it always unsuccessful to publish contract transactions? There are no error hints. Trading is always pending
oracle3
@oracle3
At present, ewasm in ethereum has the following problems:
  1. Sentinel contract increases the difficulty of debugging. All kinds of errors are in wast format, so we can't see what the problem is.
  2. Hera gives all kinds of inexplicable errors, but also can not understand them.
  3. Sentinel contract is written by rust and contract is written by rust. Why not give a debugging environment under rust to facilitate development?
    Who can solve these problems?
oracle3
@oracle3
How can ewasm be initialized without a constructor? Without initialization, erc20 will publish token, which is useless.
oracle3
@oracle3
@hugo-dc Your project https://github.com/hugo-dc/wrc20-rust can run in geth+Wagon environment, but it can't run in geth+hera environment. Sentinel contracts are the same. It looks like a virtual machine problem.
Jacques Wagener
@jacqueswww
Metering done (output 0 bytes, used 397390 gas) with code=2
Sentinel has failed on contract. It is invalid.
Why would the Sentinel contract fail ? 387390 gas ist still transactable right?
Yes... I am trying to run hash function in ewasm contract :P
Or is the sha256 precompile stil there if I call to it (ewasm testnet)?
Jacques Wagener
@jacqueswww
image.png
Is the CALL EEI function missing the output data pointers?
i.e. I see input data (dataOffset/dataLength) but nou output data ptr & len?
Jacques Wagener
@jacqueswww
ha
returnDataCopy
returnDataSize
Lane Rettig
@lrettig
Has anyone had a chance to look into this? It looks pretty cool: https://www.smithy.rs/
Climb Yang
@yp945
hello, how can I connect to ewasm testnet?
Is private network only used at present?
Jacques Wagener
@jacqueswww
Not exactly sure what you want to do
If you just want to transact you can use these:
Greg Colvin
@gcolvin
a
Climb Yang
@yp945
@jacqueswww ok, thank you