raiden-network / light-client

The Raiden Light Client
https://raiden.network/
MIT License
33 stars 29 forks source link

Run all the scenarios after IndexedDB refactoring #2091

Closed christianbrb closed 4 years ago

christianbrb commented 4 years ago

Description

To fully test the implementation of #2044 we should run all available scenarios manually.

Acceptance criteria

Tasks

christianbrb commented 4 years ago

Pushing that to the current iteration to run them after a PR for #2044 has been submitted.

agatsoh commented 4 years ago

I ran the BF1 scenario on the scenario player by following instructions in this PR of Andre. I ran it on current master and not on top of Andre's PR yet. https://github.com/raiden-network/light-client/pull/1954

Invariably I get this error https://gist.github.com/agatsoh/fcbd43528eedc12b369a593780669017

andrevmatos commented 4 years ago

I've tried running some early scenarios on the PR. With it, I discovered an issue with the test environment, where PFSs are returning BigNumbers (> 2^53) as JSON numbers (where Raiden core returns such numbers encoded as strings). This gave us trouble since we removed lossless-json (#2072). Also, SP is also passing numbers on amounts to the API, which also creates problems when these numbers are big. I commited the fixes, and got BF4 and BF1 to pass. To run a scenario, the only required change remains raiden_version on the scenarios pointing to the raiden-cli/raiden script.

agatsoh commented 4 years ago

I am trying to get bf1 running currently and after that I will try all the others as well.

taleldayekh commented 4 years ago

pfs2 scenarios successful 👍

andrevmatos commented 4 years ago

I've reproduced @agatsoh's issue locally. I'm trying to debug it. Looks like webRTC native lib hits some sort of infinite loop internally upon getting connected on a machine/client which has many connections (so it shows more often on scenarios like BF1 & BF6), which makes CPUs go crazy. This doesn't seem something related to our code, profiling has shown only (program) stack element taking that much CPU, which is usually for native modules.. The worse about it is that it's hard to detect on our code, the open event go through, but no messages flow between clients. Scenarios should run fine if one disable webRTC in config, but I'm looking on finding some fix or workaround sooner than later. This doesn't seem to affect browsers, only cli with node-webrtc lib.

christianbrb commented 4 years ago

Running the scenarios with https://github.com/raiden-network/light-client/tree/feature/to_device

  1. Update dependencies
  2. Build SDK
  3. Build CLI