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

Improving the error message when exceeding the ledger's withdrawal capacity #507

Closed
leobragaz opened this issue Dec 13, 2021 · 5 comments
Closed
Assignees
Labels
kind/enhancement Enhancement of an existing feature size/M Mid workload

Comments

@leobragaz
Copy link

After delegating to more than 20 validators, I tried to withdraw the rewards from all of them and the extension showed me a "connection refused from x.forbole.com" that, if inspected, was caused by a 520 server error.
Schermata 2021-12-13 alle 10 17 59
I think it should be more explicit telling users why they're receiving that error.

@leobragaz leobragaz added the kind/enhancement Enhancement of an existing feature label Dec 13, 2021
@kwunyeung kwunyeung added the size/M Mid workload label Dec 27, 2021
@kwunyeung
Copy link
Member

Does this only happen with Ledger? If so, should we limit the selection to be Max 20 if we know the account is from Ledger?

@RiccardoM
Copy link

@kwunyeung I confirm this happens when you delegate to more than the maximum amount of validators that the Ledger allows to withdraw with a single message, which is:

  • 3 validators if you are using a Ledger Nano S
  • 20 validators if you are using a Ledger Nano X

After reducing the delegations to from 21 to 20 validators, it works properly.

I think that to limit the selection you would also need to know the Ledger device they are using (since the limits are different as written inside Forbole X as well).

@kwunyeung
Copy link
Member

There is a device id on Ledger. It's being returned when the device is being connected. We should be able to identify it's an S or X from it.

https://github.com/LedgerHQ/ledgerjs/blob/90360f1b00a11af4e64a7fc9d980a153ee6f092a/packages/react-native-hid/src/index.ts#L28

@leobragaz
Copy link
Author

leobragaz commented Dec 30, 2021

@kwunyeung Yes limiting the selection is a good choice in this case

@calvinkei
Copy link
Contributor

i found that the issue is not related to ledger withdraw limit, since it crashes on extension load instead of during tx signing. the issue is i am using the JSON string of tx data as query params in a web url, which exceeds the string length limit when you withdraw from > 20 validators. i will fix it by compressing the JSON string, otherwise the same will happen when you withdraw from >20 validators with recovery phrase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Enhancement of an existing feature size/M Mid workload
Projects
None yet
Development

No branches or pull requests

4 participants