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

Settled channels are shown in list channels API #6444

Closed
6 of 7 tasks
ischepin opened this issue Aug 5, 2020 · 1 comment · Fixed by #6470
Closed
6 of 7 tasks

Settled channels are shown in list channels API #6444

ischepin opened this issue Aug 5, 2020 · 1 comment · Fixed by #6470

Comments

@ischepin
Copy link

ischepin commented Aug 5, 2020

Issue checklist

To help us more easily debug your issue please check the boxes for which requirements for safe usage or Raiden were followed:

  • The Ethereum node was always up to date with the chain tip and never stopped running.
  • No Ethereum transaction was sent for the account that Raiden manages by another app.
  • The Ethereum account used by Raiden always had sufficient ETH.
  • The Raiden DB that exists by default at ~/.raiden was never altered or deleted.
  • The Raiden node was never restarted. If yes please provide more info.
  • The ethereum node was not switched while Raiden was running.
  • The Raiden REST API is protected from public access.

Problem Definition

Settled channels are shown as opened in list channels API (GET api/v1/channels).

Steps to reproduce:

  1. Open a channel in any token network
  2. Close a channel and wait for it to settle
  3. Restart raiden node
  4. Retrieve a list of open channels from the node

Whats even worse, if I try to close this channel again using webui or API the raiden node will crash (raiden.exceptions.RaidenUnrecoverableError: The channel was not open at the provided block (0xcf07c12f24201113c376f22702fc60e382336bbc10a66caa5679e4286d54b1c5). This call should never have been attempted.

raiden-debug_2020-08-05T11:30:36.186629.log

System Description

Network: ropsten
ETH node: infura.io
Raiden version: raidennetwork/raiden:latest docker image (raidennetwork/raiden@sha256:6ffb7356519464d5e1e7a0dedecbe136c9ff3f2022b6c13b1ba84a200049ee9c)

@Dominik1999 Dominik1999 added this to Sprint Backlog (Team does that) in Raiden Berlin Sprint Aug 7, 2020
@Dominik1999 Dominik1999 self-assigned this Aug 7, 2020
@Dominik1999
Copy link
Contributor

Thank you @ischepin for that bug, that is indeed a nasty one.

So your node 0xcbe2a5e0ed585824e435c570bd8c89ed382f283f

and everything worked so far - the transactions were successful on the blockchain.

Then the Raiden Client was restarted (or started) and fetched all the blockchain events. Because Ropsten is not used for Raiden there are not so many events. So the Raiden Clients decode and dispatch all events in batches and not interleaved. However, the decoding logic for the channel close depends on the dispatch of the channel open.

We will now decode and dispatch per item instead of batch-wise.

@Dominik1999 Dominik1999 moved this from Sprint Backlog (Team does that) to In progress in Raiden Berlin Sprint Aug 11, 2020
@karlb karlb moved this from In progress to Sprint Backlog (Team does that) in Raiden Berlin Sprint Aug 20, 2020
@palango palango self-assigned this Aug 20, 2020
@palango palango moved this from Sprint Backlog (Team does that) to In progress in Raiden Berlin Sprint Aug 20, 2020
Raiden Berlin Sprint automation moved this from In progress to Done Aug 27, 2020
palango added a commit that referenced this issue Aug 27, 2020
palango added a commit that referenced this issue Aug 27, 2020
palango added a commit that referenced this issue Aug 27, 2020
Fixes #6473

The `pendingtokenregistration` dictionary for
`blockchainevent_to_statechange´ is not necessary any more because it
fixed the same bug that caused #6444.
karlb pushed a commit that referenced this issue Oct 9, 2020
karlb pushed a commit that referenced this issue Oct 9, 2020
karlb pushed a commit that referenced this issue Oct 9, 2020
Fixes #6473

The `pendingtokenregistration` dictionary for
`blockchainevent_to_statechange´ is not necessary any more because it
fixed the same bug that caused #6444.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

3 participants