The larger the RankedChoice::VOTERS
array, the more computationally expensive it is to loop through it.
If the RankedChoice::VOTERS
array becomes extremely large causing unfeasible gas costs for calling them, it could render functions like RankedChoice::rankCandidates()
, RankedChoice::rankCandidatesBySig()
and RankedChoice::selectPresident()
uninvokable. This basically blocks all the external functions of contract making it unusable for anyone.
Add below snippet to RankedChoiceTest.t.sol
and run the test case.
An upper limit can be set when passing voters array in the constructor.
Foundry
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.