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

Close Channel Failed #1090

Closed
ChosunOne opened this issue Oct 19, 2017 · 1 comment
Closed

Close Channel Failed #1090

ChosunOne opened this issue Oct 19, 2017 · 1 comment

Comments

@ChosunOne
Copy link

Problem Definition

After creating a channel with the Raiden Echo Node and depositing funds to the channel, attempting to close the channel will fail. The error comes in the form of a thrown transaction.

Problem Construction

Open a channel to the Raiden Echo Node via
curl -H "Content-Type: application/json" -X PUT -d '{"partner_address" : "0x02f4b6bc65561a792836212ebc54434db0ab759a", "token_address" : "0x0f114a1e9db192502e7856309cc899952b3db1ed", "balance" : 1000, "settle_timeout" : 100}' http://localhost:5001/api/1/channels

Once the channel has been opened, attempt to close the channel via
curl -H "Content-Type: application/json" -X PATCH -d '{"state" : "closed"}' http://localhost:5001/api/1/channels

The following output should be seen on the raiden log

CRITICAL:raiden.network.rpc.client close failed nonce=1
 extra_hash=04279d2b98d0f29d9ee15fc1185aceb51be9f36866324cc9e116e09219e04866 
 contract=fd7c1984 transferred_amount=0
 signature=3aa0589ba65dcd32077ac6614bfe15e78e12984b5842ccc1f377f6bfacb468db08c54e20b2aafb61164d43563bba6dd6f6f0a4833c750b178fbbe864a406680d1b
 locksroot=2d1fac7a7c6d68475bf552a80ae4b06967158716b53dcd91dc614ca491c94ea3

ERROR:raiden.api.rest [2017-10-19 15:24:33,062] 
ERROR in app: Exception on /api/1/channels/0xfd7c198480be3f01163cba9f45a5950825535e81 [PATCH] 

Traceback (most recent call last):
  File "/home/chosunone/raiden/venv/local/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/chosunone/raiden/venv/local/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/chosunone/raiden/venv/local/lib/python2.7/site-packages/flask_restful/__init__.py", line 480, in wrapper
    resp = resource(*args, **kwargs)
  File "/home/chosunone/raiden/venv/local/lib/python2.7/site-packages/flask/views.py", line 84, in view
    return self.dispatch_request(*args, **kwargs)
  File "/home/chosunone/raiden/venv/local/lib/python2.7/site-packages/flask_restful/__init__.py", line 595, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/home/chosunone/raiden/venv/local/lib/python2.7/site-packages/webargs/core.py", line 441, in wrapper
    return func(*args, **kwargs)
  File "/home/chosunone/raiden/raiden/api/v1/resources.py", line 60, in patch
    return self.rest_api.patch_channel(**kwargs)
  File "/home/chosunone/raiden/raiden/api/rest.py", line 554, in patch_channel
    channel.partner_address
  File "/home/chosunone/raiden/raiden/api/python.py", line 597, in close
    channel.external_state.close(balance_proof)
  File "/home/chosunone/raiden/raiden/channel/netting_channel.py", line 126, in close
    signature,
  File "/home/chosunone/raiden/raiden/network/rpc/client.py", line 2087, in close
    raise TransactionThrew('Close', receipt_or_none)

TransactionThrew: Close transaction threw. 
Receipt={u'status': u'0x0', u'contractAddress': None, u'cumulativeGasUsed': u'0x7c2a9', u'from': u'0x000e6dfc6f9f7f701860a5d6e511f6a1bfe4cb9d', u'logs': [], u'blockHash': u'0xeae1feb2d29227a4573de374d738c42ce847e2e77a9cbdb75aa9a04214512b0d', u'transactionHash': u'0x433731bd0df7d0a53ff7f630b4d41cf31e311701e0a745cf493381093a5be6f6', u'blockNumber': u'0x1cfdf1', u'to': u'0xfd7c198480be3f01163cba9f45a5950825535e81', u'logsBloom': u'0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', u'transactionIndex': u'0x5', u'gasUsed': u'0x1398a'}

System Description

raiden version
{
  "python_version": "2.7.12", 
  "python_implementation": "CPython", 
  "system": "Linux 64bit_ELF 4.10.0-37-generic", 
  "raiden": "0.1.0+git.r8d320c1"
}
geth version
Geth
Version: 1.7.2-stable
Git Commit: 1db4ecdc0b9e828ff65777fb466fc7c1d04e0de9
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.9
Operating System: linux
GOPATH=
GOROOT=/usr/lib/go-1.9
solc --version
solc, the solidity compiler commandline interface
Version: 0.4.17+commit.bdeb9e52.Linux.g++
@hackaugusto
Copy link
Contributor

This should be fixed with #1141 , if the bug persists please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants