Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 12 2019 04:03
    mrsmkl edited as member
  • Dec 12 2019 04:03
    hswick edited as member
  • Dec 12 2019 04:03
    bloodstalker edited as member
  • Dec 12 2019 04:01
    mrsmkl edited as member
  • Dec 12 2019 03:54
    mrsmkl edited as member
  • Dec 12 2019 03:54
    mrsmkl edited as member
  • Dec 12 2019 03:53
    mrsmkl edited as member
  • Nov 08 2019 07:23

    teutsch on master

    Update README.md (compare)

  • Oct 03 2019 12:42
    mrsmkl unassigned #70
  • Oct 03 2019 06:56

    mrsmkl on rollback

    (compare)

  • Oct 03 2019 06:56

    mrsmkl on rollback2

    (compare)

  • Oct 03 2019 06:56

    mrsmkl on master

    (compare)

  • Oct 03 2019 06:56

    mrsmkl on master

    (compare)

  • Oct 03 2019 06:52

    mrsmkl on rollback2

    (compare)

  • Oct 02 2019 14:10

    mrsmkl on master

    (compare)

  • Oct 02 2019 14:09

    mrsmkl on master

    (compare)

  • Oct 02 2019 14:08

    mrsmkl on master

    (compare)

  • Oct 02 2019 14:07

    mrsmkl on two-layer-dispute

    (compare)

  • Oct 02 2019 06:35

    mrsmkl on v2gp

    (compare)

  • Oct 02 2019 06:35

    mrsmkl on readme-1

    (compare)

George Roman
@georgeroman
Thanks, I somehow missed that. I have a contract that is too costly to run on-chain (although it doesn't exceed the gas limit) and I'm looking into ways to execute it off-chain in order to lower the costs.
teutsch
@teutsch
Truebit should save $$ if you can isolate the relevant computational task. Let us know how it goes on testnet
ZHANGSHUAI
@paul_shuai_twitter
hello
any news about ico?
George Roman
@georgeroman
I have some issues testing on Goerli, using the latest mrsmkl/truebit-goerli docker image. Parity stops syncing at block 1561656, displaying some weird unverified transactions. I guess this has to do with the recent Istanbul fork, which occurred at block 1561651. Has anyone else got into this?
George Roman
@georgeroman
My bad, the Parity version was the issue.
Updating from 2.5.0 to 2.6.6 solved this.
teutsch
@teutsch
@georgeroman Thanks for the heads up!
George Roman
@georgeroman
Hi everyone! As I'm mainly trying to use TrueBit for reducing the cost of executing an expensive smart contract, one that fits within Ethereum's gas limit, performing full on-chain verification from time to time instead of going with the verification game might be a reasonable solution. Is replacing the dispute resolution protocol with full on-chain verification doable with TrueBit?
teutsch
@teutsch
I suppose you could alternate between Truebit and on-chain verification, but that would be more expensive than just using Truebit. Who pays for the on-chain verification? What are you trying to achieve?
George Roman
@georgeroman
I was thinking to use this approach to speed up the verification process as I think a single on-chain verification is much faster than running the verification game.
teutsch
@teutsch
If Solvers and Verifiers are rational, you'll never actually run the verification game.
George Roman
@georgeroman
Are there any projects where TrueBit is actively used?
teutsch
@teutsch
We've done integrations with some projects, e.g. Livepeer, Transmute
andyzhu87
@andyzhu87
@georgeroman can you describe what you're trying to do with the smart contract and truebit verification?
teutsch
@teutsch
Hey @andyzhu87 what are you buidling?
andyzhu87
@andyzhu87
@teutsch we're a team working on layer2 scaling for eth (optimistic rollups), our implementation is the Interstate Network has a evm hypervisor smart contract deployed on-chain to verify evm sidechain state transitions (the main benefit for developers being a consistent stack across L1 and L2, the evm) I keep hearing comparisons between what we do and what truebit does and was checking it out (I guess because of the verifying off-chain compute concept...?) I don't think I check this often but happy to exchange notes and continue the conversation via andy@interstate.network
teutsch
@teutsch
@andyzhu87 I just sent you an email
ZHANGSHUAI
@paul_shuai_twitter
hello
any information for ico?
Surya Bakshi
@sbaks0820
what's ico ?
teutsch
@teutsch
Interactive coin offering
George Roman
@georgeroman
Hi everyone! I'm trying to run a WASM task compiled from Rust on TrueBit. I'm following the steps described in https://github.com/TrueBitFoundation/wasm-ports/tree/master/samples/scrypt. When running prepare.js on my js file (generated alongside the wasm file by compiling Rust to a wasm32-unknown-emscripten target), I get the following strange error: 'unknown import "wasi_unstable"."fd_fdstat_get"'. I've inspected the wat file obtained by running wasm2wat on the wasm file and it looks like there are 5 imports that use 'wasi_unstable' (instead of the usual 'env' used in the rest of the imports): fd_fdstat_get, environ_get, environ_sizes_get, fd_write, fd_close. Any ideas on why this is happening and how to go about solving the issue?
Sami Mäkelä
@mrsmkl
those imports keep changing, so you need to use an old version of emscripten, 1.37.36 is the one used in wasm-ports Dockerfile
well at least that is a starting point, you might need to install an old version of rust, too
George Roman
@georgeroman
I've been trying to work around that issue for a few days but haven't succeeded yet. Version 1.37.36 of Emscripten is not available for download anymore and the only way to use it would be to build that specific version of Emscripten from source. I've tried most recent versions of Emscripten that use the default WASM backend instead of the old asm.js (fastcomp) one and all use WASI imports. In the current state of the project, is it possible to add support for WASI imports in TrueBit's WASM interpreter?
I'll check if there is some place in the linker that has to be changed
Sami Mäkelä
@mrsmkl
maybe there wouldn't be many changes for that
anyway, if you use 1.37.36 , you also need an old version of rust, 1.25.0 seems to work
George Roman
@georgeroman
Thanks, I'll give it a try. Unfortunately, I can't use an older version of Rust as my code only compiles with Rust above 1.40.
George Roman
@georgeroman
I'm coming back with a new question. Once I added the functions in filesystem.c and transpiled the changed code to filesystem.wasm what would be the next step to have the linker find the newly added functions?
Sami Mäkelä
@mrsmkl
in theory, the script should just find them based on names
there also another thing that has probably changed, emscripten runtime used to have some setup done to the memory in the js runtime, so you if it still does that, you'll have to find out how it has modified the memory before executing the wasm file
George Roman
@georgeroman
I've managed to implement the required functions in filesystem.c and have them available at runtime. However, I'm now faced with another issue. Running the wasm file results in a 'resource exhaustion: stack underflow' error (at the point where the error occurs the value of the stack ptr is -21568). I suppose this happens due to not enough memory available. Is globals.json the right place to increase the memory limits? If yes, how exactly should I change that file?
George Roman
@georgeroman
I've just looked over TrueBit's wasm interpreter code and I think this is where the error is triggered (the negative stack_ptr is the issue): https://github.com/TrueBitFoundation/ocaml-offchain/blob/master/interpreter/merkle/mrun.ml#L1098.
George Roman
@georgeroman
One more question, mycode fails with yet another weird error if I don't provide a 'record.bin' attached file. What is the role of that file? (https://github.com/TrueBitFoundation/ocaml-offchain/blob/master/interpreter/filesystem.c#L174)
Sami Mäkelä
@mrsmkl
try running the v2 branches, and the latest filesystem.c should be at emscripten-module-wrapper repo
records.bin is deprecated, you shouldn't need it anymore
George Roman
@georgeroman
Thank you very much for all the help! Everything works fine on the v2 branches.
George Roman
@georgeroman
Ok, now that the code compiles and runs fine I have one more issue. I have attached one file 'output.data' to a simple program that only writes some data to that file. For some reason, consecutive calls to findFile and openFile (https://github.com/TrueBitFoundation/emscripten-module-wrapper/blob/master/filesystem.c#L120-L158) get different arguments (findFile gets the expected 'output.data' argument while openFile gets a weird 'stdostdout' argument). I assume that the memory portion holding the name of the file is being overwritten somehow. Any ideas on how to go about fixing this?
George Roman
@georgeroman
Sami Mäkelä
@mrsmkl
ok. check if filesystem.wasm has it's own memory, that might cause problems, also there can be some kind of stack pointers that get messed up
George Roman
@georgeroman
Are there any limits on the size of the file that can be read? I have a big file (10240 bytes) that for some reason is not fully read (only the first 8192 bytes are read, and the program exits afterwards) (https://github.com/TrueBitFoundation/emscripten-module-wrapper/blob/master/filesystem.c#L493).
George Roman
@georgeroman
Nevermind, exporting 'emscripten_memcpy_big' from 'filesystem.c' fixed this.
George Roman
@georgeroman
In truebit-os where can I change the default parameters of the VM, like --memory-size or --stack-size?
Zhao Yang
@zhaoyang626
Hi all. Is there any demo about federated learning with truebit?
teutsch
@teutsch
Welcome @zhaoyang626! What are you trying to build?
Zhao Yang
@zhaoyang626
I am trying to combine FL and blockchain. FedAvg algorithm may cost too much using smart contract. I want to explore an off-chain solution.