Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix contract for one_to_n proxy and remove wrong check on startup #5551

Merged
merged 3 commits into from Jan 1, 2020

Conversation

@czepluch
Copy link
Collaborator

@czepluch czepluch commented Dec 30, 2019

Description

Fixes: #5550

This PR removes a check during startup that looked for a token address from the one_to_n contract, but that contract doesn't have a token_address specified.
It also fixes the initial problem that was introduced by what seems to be a copy/paste bug where the one_to_n proxy used the contract ABI of the monitoring services.

I am not sure if this is the best fix for this problem, but it works as a temporary fix during christmas time so that the nightlies start running again. At least the scenarios and Raiden itself now run locally again.

@auto-assign auto-assign bot requested a review from rakanalh Dec 30, 2019
@czepluch czepluch force-pushed the czepluch:one_to_n_startup_check branch from b165d36 to e9d4bb4 Dec 30, 2019
Copy link
Contributor

@rakanalh rakanalh left a comment

Thank you for fixing this. Not sure why this wasn't caught by the smoketests but i'll check this first thing tomorrow.

Copy link
Contributor

@rakanalh rakanalh left a comment

LGTM

remove unused imports
@rakanalh rakanalh force-pushed the czepluch:one_to_n_startup_check branch from e9d4bb4 to 01c238c Jan 1, 2020
@codecov
Copy link

@codecov codecov bot commented Jan 1, 2020

Codecov Report

Merging #5551 into develop will decrease coverage by 0.12%.
The diff coverage is 85.71%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5551      +/-   ##
===========================================
- Coverage    80.95%   80.82%   -0.13%     
===========================================
  Files          132      132              
  Lines        15025    15023       -2     
  Branches      2302     2302              
===========================================
- Hits         12164    12143      -21     
- Misses        2210     2223      +13     
- Partials       651      657       +6
Flag Coverage Δ
#integration 75.08% <42.85%> (-0.15%) ⬇️
#unit 56% <85.71%> (ø) ⬆️
Impacted Files Coverage Δ
raiden/ui/startup.py 69.34% <ø> (+0.77%) ⬆️
raiden/network/proxies/one_to_n.py 50% <100%> (ø) ⬆️
raiden/ui/app.py 29.49% <75%> (+0.81%) ⬆️
raiden/waiting.py 82.79% <0%> (-3.77%) ⬇️
raiden/tasks.py 66.92% <0%> (-3.15%) ⬇️
raiden/utils/echo_node.py 67.79% <0%> (-1.7%) ⬇️
raiden/network/transport/matrix/client.py 72.75% <0%> (-1.04%) ⬇️
raiden/network/transport/matrix/transport.py 82.26% <0%> (-0.48%) ⬇️
raiden/network/proxies/token_network.py 51.42% <0%> (-0.25%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c64cacf...565cb17. Read the comment docs.

@rakanalh rakanalh force-pushed the czepluch:one_to_n_startup_check branch from a58c20b to 2218f46 Jan 1, 2020
@LefterisJP
Copy link
Contributor

@LefterisJP LefterisJP commented Jan 1, 2020

@rakanalh unit test for the rpc endpoint still fails after your fix

Apparently, there is a difference in how scheme is determined between
3.7.6 and prior versions:

```
Python 3.7.0 (default, Jan 20 2019, 18:10:09)
[GCC 8.2.1 20181127] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib.parse import urlparse
>>> urlparse("localhost:123123")
ParseResult(scheme='', netloc='', path='localhost:123123', params='', query='', fragment='')
```

```
Python 3.7.6 (default, Jan  1 2020, 15:20:08)
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib.parse import urlparse
>>> urlparse("127.0.0.1:123123")
ParseResult(scheme='127.0.0.1', netloc='', path='123123', params='', query='', fragment='')
```

According to the python documentation:
https://docs.python.org/3/library/urllib.parse.html
> Following the syntax specifications in RFC 1808, urlparse recognizes a
netloc only if it is properly introduced by ‘//’. Otherwise the input is
presumed to be a relative URL and thus to start with a path component.
@rakanalh rakanalh force-pushed the czepluch:one_to_n_startup_check branch from 2218f46 to 565cb17 Jan 1, 2020
@rakanalh rakanalh merged commit 7bc8f75 into raiden-network:develop Jan 1, 2020
17 checks passed
17 checks passed
ci/circleci: build-docs-3.7 Your tests passed on CircleCI!
Details
ci/circleci: checkout Your tests passed on CircleCI!
Details
ci/circleci: finalize Your tests passed on CircleCI!
Details
ci/circleci: lint-3.7 Your tests passed on CircleCI!
Details
ci/circleci: prepare-python-linux-3.7 Your tests passed on CircleCI!
Details
ci/circleci: prepare-system-linux Your tests passed on CircleCI!
Details
ci/circleci: smoketest-matrix-development-geth-3.7 Your tests passed on CircleCI!
Details
ci/circleci: smoketest-matrix-development-parity-3.7 Your tests passed on CircleCI!
Details
ci/circleci: smoketest-matrix-production-geth-3.7 Your tests passed on CircleCI!
Details
ci/circleci: test-fuzz-3.7 Your tests passed on CircleCI!
Details
ci/circleci: test-integration-matrix-geth-3.7 Your tests passed on CircleCI!
Details
ci/circleci: test-integration-matrix-parity-3.7 Your tests passed on CircleCI!
Details
ci/circleci: test-mocked-3.7 Your tests passed on CircleCI!
Details
ci/circleci: test-unit-3.7 Your tests passed on CircleCI!
Details
codecov/patch 85.71% of diff hit (target 80.95%)
Details
codecov/project Absolute coverage decreased by -0.12% but relative coverage increased by +4.75% compared to c64cacf
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.