QOSGroup/qos

优化社区自治计票算法

Closed this issue · 1 comments

proposalResult, tallyResults, votingValidators := tally(ctx, mapper, activeProposal)

gov里每一块都tally一次,对于已投票的voting power是否可以只计算一次并记在proposal里,下一块再计算新增的投票,会节省很多计算量 @imuge

这个由于投票期间voting power会一直变,而且有unbond/bond发生,虽然可以通过unbond锁定期比投票期长来限制,但整体逻辑会更复杂,因此暂时取消需求。