joystream icon indicating copy to clipboard operation
joystream copied to clipboard

Balances proxy for staking pallet

Open mnaamani opened this issue 2 years ago • 1 comments

Fixes https://github.com/Joystream/joystream/issues/4189 by implementing suggestion to "override" free_balance() for the runtime balances pallet instance used by the staking pallet.

  • [x] Implementation
  • [ ] Tests

mnaamani avatar Aug 23 '22 20:08 mnaamani

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
pioneer-testnet ⬜️ Ignored (Inspect) Aug 24, 2022 at 9:39AM (UTC)

vercel[bot] avatar Aug 23 '22 20:08 vercel[bot]

I couldn't find any bad side-effects that this approach would have

This is the main thing here, I don't really understand this fix, but certainly we are here making a change to very public state which lots of code may be using, or may use in the future in some random fix. The proxy solution did exactly one thing, locally: make staking pallet think there was 0 funds if there was a rivalrous lock. Noone else is affected by that. I'm not even 100% sure we fully grasp the consequences of that, say for example if the account can be used it in some other way with the staking pallet where the balance > 0 is not a requirement, and then at a later time the balance has gone up in a way the staking pallet expects to know (say if it depends on some on_balance_change hook or something). But for this fix I just have no way to gauge what level of confidence we should ascribe to your inability to find a sideeffect right now.

bedeho avatar Aug 24 '22 12:08 bedeho

Replaced by https://github.com/Joystream/joystream/pull/4213

mnaamani avatar Aug 28 '22 09:08 mnaamani