Remove legacy CurrencyToVote
in staking
#4725
Labels
D1-medium
Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase.
T2-pallets
This PR/Issue is related to a particular pallet.
Remove the need for the
CurrencyToVote
converter type in the pallet-staking. This type converts coverts fromBalanceOf<T>
to au64
"vote" type, and from au128
(i.e.ExtendedBalance
) back toBalanceOf<T>
. In both conversion directions, the total issuance of the system must be provided.The main reason for this conversion is that the current phragmen implementation does not correctly support types
u128
as the main type. Thus, the conversion between balance (u128
) and the supported "vote"u64
type.Relying on the current issuance will be a problem with the staking parachain (let's assume that the staking runtime is not deployed in AH). In addition, it removing the need for this conversion will simplify and make it cheaper to run the stake-tracker and the associated list updates.
Solution should be getting rid of the need for
CurrencyToVote
adapter by ensuring all election algorithms can work with aInto<u128>
score type.The text was updated successfully, but these errors were encountered: