tezos-commons / baseDAO

BaseDAO - a generic smart contract framework for DAOs on Tezos
57 stars 15 forks source link

[#316] Remove proposal limit and use a linked list for sorting #318

Closed rinn7e closed 2 years ago

rinn7e commented 2 years ago

Description

Problem: There is currently a limit on the number of concurrent ongoing proposals, due to the fact that proposals need to be sorted (for flush) and that this is done using a set, which cannot grow indefinitely without causing gas cost problems.

Solution: Remove proposal_key_list_sort_by_level and use a doubly linked list instead to store the proposals in order.

Related issue(s)

Resolves #316

:white_check_mark: Checklist for your Pull Request

Related changes (conditional)

Stylistic guide (mandatory)

rinn7e commented 2 years ago

@pasqu4le Took me a while to finish fixing the tests. I also fix some bugs along the way.

This PR is ready now, hope to get your review on this.