witnet-rust
witnet-rust copied to clipboard
Stakes data structure does not correctly track multiple validators with the same withdrawer
Staking onto two validators with the same external withdraw address results in the by_withdrawer data stucture only tracking the latest one. However, this is actually a valid move and it is just the by_withdrawer map which cannot index that properly because it only has one SyncStake entry per withdrawer address and each of those entries is tied to a <validator, withdrawer> key.
It's basically the same bug as the one I already shared for by_validator, but more serious because the former is technically invalid if we implement all WIP validation rules.