joystream
joystream copied to clipboard
Balances proxy for staking pallet
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
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) |
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.
Replaced by https://github.com/Joystream/joystream/pull/4213