You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "contribute_with_vote" instruction is intended to to three things:
Validate that the relayer partial signed the transaction, or the caller has a valid Civic Pass
Reallocate project shares via the quadratic funding algorithm
Conduct the token transfer and corresponding account mutations
As you can probably imagine, this is very compute heavy. With a small sample size of projects and voters, this is not a huge issue. With priority fees prepended to the transaction, it has few problems landing in a block. The problem comes in rounds with larger sample sizes. Since there are more votes to account in the calculation, the compute unit usage will quickly escalate to the 1.4m bound. That being said, there are ways to optimize the instruction and its helpers to alleviate this bottleneck.
Instead of one pool account, this should likely be redesigned to use a network of PDAs, and doing this is on the table if you're looking to attack this issue
The text was updated successfully, but these errors were encountered:
The "contribute_with_vote" instruction is intended to to three things:
As you can probably imagine, this is very compute heavy. With a small sample size of projects and voters, this is not a huge issue. With priority fees prepended to the transaction, it has few problems landing in a block. The problem comes in rounds with larger sample sizes. Since there are more votes to account in the calculation, the compute unit usage will quickly escalate to the 1.4m bound. That being said, there are ways to optimize the instruction and its helpers to alleviate this bottleneck.
Instead of one pool account, this should likely be redesigned to use a network of PDAs, and doing this is on the table if you're looking to attack this issue
The text was updated successfully, but these errors were encountered: