Closed Jean-Grimal closed 1 month ago
I just realize that this change increases the number of storage proofs for the voting process.
Before, only one required (the storage proof of the delegatee's voting power slot)
After, three are required (the storage proof of the delegatee's following slots: voting power, delegatee, token balance)
This should be taken into account. how gas costly is a large merkle tree (I believe Ethereum storage trie is quite big) onchain verification ?
Edit: This might not be true as it appears it's possible to prove multiple slots values (of a given contract) within the same storage proof
Fixes #13
Seems to work, but we should be very carefull with it.
Tests are a bit overkill but I wanted to be sure that it's not possible to trick the voting power accounting and create some out of nowhere.