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

getbalance assertion after closechannel eth #2028

Open
raladev opened this issue Dec 7, 2020 · 6 comments
Open

getbalance assertion after closechannel eth #2028

raladev opened this issue Dec 7, 2020 · 6 comments
Labels
bug Something isn't working connext P2 mid priority

Comments

@raladev
Copy link
Contributor

raladev commented Dec 7, 2020

Background

Today I tried to withdraw funds from eth channel to connext wallet and after withdrawing my getbalance call started to return assertion error. I checked xud and connext logs, xud was contain only assertion and i found nothing interesting in connext logs.

After that I removed and initialized new env again to reproduce the assertion appearing again to get reliable steps, but i was not able to get it again, so it is something floating. :(

Xud logs:

Screenshot from 2020-12-08 00-37-36

Utils output:

simnet > getbalance

Balance:
┌──────────┬───────────────┬───────────────────────────────┬────────────────────────────┐
│ Currency │ Total Balance │ Wallet Balance (Not Tradable) │ Channel Balance (Tradable) │
├──────────┼───────────────┼───────────────────────────────┼────────────────────────────┤
│ BTC      │ 2.5           │ 0                             │ 2.5                        │
├──────────┼───────────────┼───────────────────────────────┼────────────────────────────┤
│ DAI      │ 0             │ 0                             │ 0                          │
├──────────┼───────────────┼───────────────────────────────┼────────────────────────────┤
│ ETH      │ 15            │ 0                             │ 15                         │
├──────────┼───────────────┼───────────────────────────────┼────────────────────────────┤
│ LTC      │ 5             │ 0                             │ 5                          │
├──────────┼───────────────┼───────────────────────────────┼────────────────────────────┤
│ USDT     │ 0             │ 0                             │ 0                          │
└──────────┴───────────────┴───────────────────────────────┴────────────────────────────┘
simnet > tradinglimits

Trading Limits:
┌──────────┬───────────┬──────────┬──────────────┬───────────────┐
│ Currency │ Max Buy   │ Max Sell │ Reserved Buy │ Reserved Sell │
├──────────┼───────────┼──────────┼──────────────┼───────────────┤
│ BTC      │ 2.4499095 │ 2.45     │ 0            │ 0             │
├──────────┼───────────┼──────────┼──────────────┼───────────────┤
│ DAI      │ 0         │ 0        │ 0            │ 0             │
├──────────┼───────────┼──────────┼──────────────┼───────────────┤
│ ETH      │ 6.3       │ 15       │ 0            │ 0             │
├──────────┼───────────┼──────────┼──────────────┼───────────────┤
│ LTC      │ 4.899638  │ 4.9      │ 0            │ 0             │
├──────────┼───────────┼──────────┼──────────────┼───────────────┤
│ USDT     │ 0         │ 0        │ 0            │ 0             │
└──────────┴───────────┴──────────┴──────────────┴───────────────┘
simnet > walletdeposit eth
{
  "address": "0x67e4E645f940e76d5eb60D82eA62F0Ee8809E568"
}
simnet > closechannel ETH --amount 2 --destination 0x67e4E645f940e76d5eb60D82eA62F0Ee8809E568
{
  "transactionIdsList": [
    "0x8ca794cee6d1c6a8f167168330d712fbd3986941e7050e827ad5e26cd3307237"
  ]
}
simnet > getbalance

Balance:
┌──────────┬───────────────┬───────────────────────────────┬────────────────────────────┐
│ Currency │ Total Balance │ Wallet Balance (Not Tradable) │ Channel Balance (Tradable) │
├──────────┼───────────────┼───────────────────────────────┼────────────────────────────┤
│ BTC      │ 2.5           │ 0                             │ 2.5                        │
├──────────┼───────────────┼───────────────────────────────┼────────────────────────────┤
│ DAI      │ 0             │ 0                             │ 0                          │
├──────────┼───────────────┼───────────────────────────────┼────────────────────────────┤
│ ETH      │ 13            │ 0                             │ 13                         │
├──────────┼───────────────┼───────────────────────────────┼────────────────────────────┤
│ LTC      │ 5             │ 0                             │ 5                          │
├──────────┼───────────────┼───────────────────────────────┼────────────────────────────┤
│ USDT     │ 0             │ 0                             │ 0                          │
└──────────┴───────────────┴───────────────────────────────┴────────────────────────────┘
simnet > tradinglimits

Trading Limits:
┌──────────┬───────────┬──────────┬──────────────┬───────────────┐
│ Currency │ Max Buy   │ Max Sell │ Reserved Buy │ Reserved Sell │
├──────────┼───────────┼──────────┼──────────────┼───────────────┤
│ BTC      │ 2.4499095 │ 2.45     │ 0            │ 0             │
├──────────┼───────────┼──────────┼──────────────┼───────────────┤
│ DAI      │ 0         │ 0        │ 0            │ 0             │
├──────────┼───────────┼──────────┼──────────────┼───────────────┤
│ ETH      │ 6.3       │ 13       │ 0            │ 0             │
├──────────┼───────────┼──────────┼──────────────┼───────────────┤
│ LTC      │ 4.899638  │ 4.9      │ 0            │ 0             │
├──────────┼───────────┼──────────┼──────────────┼───────────────┤
│ USDT     │ 0         │ 0        │ 0            │ 0             │
└──────────┴───────────┴──────────┴──────────────┴───────────────┘
simnet > getbalance
Error: 13 INTERNAL: Assertion failed
simnet > getbalance
Error: 13 INTERNAL: Assertion failed
simnet > getbalance
Error: 13 INTERNAL: Assertion failed
simnet > getbalance
Error: 13 INTERNAL: Assertion failed
simnet > getbalance
Error: 13 INTERNAL: Assertion failed
simnet > loglevel trace
success
simnet > getbalance
Error: 13 INTERNAL: Assertion failed
simnet > getbalance
Error: 13 INTERNAL: Assertion failed
simnet > getbalance
Error: 13 INTERNAL: Assertion failed
simnet > tradinglimits

Trading Limits:
┌──────────┬───────────┬──────────┬──────────────┬───────────────┐
│ Currency │ Max Buy   │ Max Sell │ Reserved Buy │ Reserved Sell │
├──────────┼───────────┼──────────┼──────────────┼───────────────┤
│ BTC      │ 2.4499095 │ 2.45     │ 0            │ 0             │
├──────────┼───────────┼──────────┼──────────────┼───────────────┤
│ DAI      │ 0         │ 0        │ 0            │ 0             │
├──────────┼───────────┼──────────┼──────────────┼───────────────┤
│ ETH      │ 6.3       │ 13       │ 0            │ 0             │
├──────────┼───────────┼──────────┼──────────────┼───────────────┤
│ LTC      │ 4.899638  │ 4.9      │ 0            │ 0             │
├──────────┼───────────┼──────────┼──────────────┼───────────────┤
│ USDT     │ 0         │ 0        │ 0            │ 0             │
└──────────┴───────────┴──────────┴──────────────┴───────────────┘
simnet > exit

@raladev raladev added bug Something isn't working P2 mid priority connext labels Dec 7, 2020
@raladev raladev assigned ghost and kilrau Dec 7, 2020
@kilrau
Copy link
Contributor

kilrau commented Dec 8, 2020

Since it is simnet I assume this is vector? If so, needs to be handled @erkarl Ideas?

@kilrau kilrau removed their assignment Dec 8, 2020
@raladev
Copy link
Contributor Author

raladev commented Dec 8, 2020

Since it is simnet I assume this is vector?

Yeap it is vector. Most likely this case can be reproduced when updating old version of xud (without vector) to a new one.

@ghost
Copy link

ghost commented Dec 8, 2020

Yeap it is vector. Most likely this case can be reproduced when updating old version of xud (without vector) to a new one.

Think it's caused by the mismatch in token addresses. I assume it doesn't reproduce with a fresh env?

@raladev
Copy link
Contributor Author

raladev commented Dec 8, 2020

Yeap it is vector. Most likely this case can be reproduced when updating old version of xud (without vector) to a new one.

Think it's caused by the mismatch in token addresses. I assume it doesn't reproduce with a fresh env?

yeap, did not get it on fully new env.

@sangaman
Copy link
Collaborator

sangaman commented Dec 8, 2020

That error generally means that we're trying to assign an illegal value to a grpc field, like a negative number to an unsigned int, or a value greater than 2^64 for a 64 bit int.

@kilrau
Copy link
Contributor

kilrau commented Jan 4, 2021

So.. do we want to prevent such values to be assigned to a grpc field, if not I guess we can close here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working connext P2 mid priority
Projects
None yet
Development

No branches or pull requests

3 participants