casper-node
casper-node copied to clipboard
Change the unbonding process to only prune bids after unbonding is processed
This changes how the unbonding process works.
The bids used to be pruned upon a full unbond. Now, in order to better cooperate with the rewards distribution, a full unbond only sets the bid to zero stake. The bid is only pruned once all the unbonding entries have been processed.
The auction is also modified to filter out bids with zero stake, in order to prevent nodes with zero stake from becoming validators when there are fewer nonzero bids than there are validator slots.