account: provide delegations_to instead
oasis-node does not handle GetDelegations efficiently. This changes the gateway to use GetDelegationsTo, which the node can answer efficiently.
ok and from #61/#62, it seems we didn't specifically want delegations from, and the issue looks like it was written to call for either of them. at this point, we know that the node software can much more easily list delegations to an account and debonding delegations "from" an account, so I'm proposing that we move to those.
for users relying on the previous delegations "from" behavior, you'll have to stay on the 2.x.x stable branches, and we should maintain that for some amount of time.
I intend for us to upgrade any of our own deployments to include this change.
fixes #347
sad note: one of the gateways we use times out trying to get delegations from, so at least we know that nothing is usefully relying on it :grimacing:
"delegations to" is not efficient either. converting this to draft
https://github.com/oasisprotocol/oasis-core/pull/5023 with any luck, we'll have efficient DelegationsFor in the same timeframe, so we won't have to merge this change
this is now quite fast in 23.0.x