-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/audit (Implementing fixes for audit issues) #522
Conversation
…und" Inconsistent restriction on voice credit upper bound: remove the upper bound. We still have implicit bound that voice credit<sqrt(field_size), which should be large enough for normal ERC20 balance
… update fixing issue "Data are not fully verified during state update"
add onlyOwner modifier to airdrop/airdropTo in TopupCredit.sol
add nothing up my sleeve number into the leaf zero in message queue
1. Implemented fixes for possible reentrancy attacks. 2. Ameneded error messages in `Poll` and `PollyProcesorAndTallyer`. 3. Introduced local variable in `AccQueue` to prevent updating state variables in a for loop. 4. Removed redundant boolean comparisons. 5. Added `SafeERC20` to `Poll` to check the return value of `transferFrom`. fix privacy-scaling-explorations#503 fix privacy-scaling-explorations#504 fix privacy-scaling-explorations#505 fix privacy-scaling-explorations#508 fix privacy-scaling-explorations#510
…to state Removed redundant call `getStateAqRoot` and directly stored the new root to `mergedStateRoot`
Reverted the fix related to updating a state variable in a for loop for AccQueue. Also fixed the tests by adding the `NOTHING_UP_MY_SLEEVE` hash on the local MaciState instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that within AccQueue.mergeSubRoots
, nextSubRootIndex
isn't updated to use the new _nextSubRootIndex
temporary variable here.
…s-interaction pattern Moved the `_pubKey` check above before increasing the number of signups. fix privacy-scaling-explorations#503
…hout enqueing new leaves Added a test that calls the onchain contract to enqueue without adding new data first, to confirm that the same root is returned.
…hout enqueing new leaves Added a test that calls the onchain contract to enqueue without adding new data first, to confirm that the same root is returned.
Fixed failing core tests for MaciState.
…y tree fix circuits folder tests by adding nothing_up_to_my_sleeve for empty tree
test(fix circuits folder tests)
Removed unneeded creation of new message trees, and used the MaciState Poll ones.
This comment was marked as resolved.
This comment was marked as resolved.
Refractoring of tests. Still one test erroring out on the circuit side
…te.ts as well as unit tests (1) fix nothing_up_to_my_sleeve bug in MaciState.ts (2) fix processMessage unit test in circuits folder
fix(core/ts/macistate.ts): fix nothing_up_to_my_sleeve bug in MaciSta…
Fixed test cases for circuits and other packages.
…leaf (1) fix issue when insert NOTHING_UP_TO_MY_SLEEVE as first msg leaf (2) refactor part of Poll.sol (3) catch decryption error during genMaciState if the message is incorrectly encrypted
fix(insert placeholder leaf): insert place holder leaf
Merged Chao fixes for correct enqueuing of the NOTHING_UP_MY_SLEEVE hash and amended Contract tests to fix the final issue.
Upgraded the contracts to solidity 0.8.10, refactored code and added some more tests fix privacy-scaling-explorations#540
Revert the path to resolve circom binary path from CI side
This comment was marked as resolved.
This comment was marked as resolved.
Revert changes on PollyProcessorAndTallyer
PptE11 is ERROR_INVALID_SUBSIDY_PROOF. Not sure why the proof would be ok offchain but not verify onchain. Make sure vks /inputs line up. @chaosma could you take a look? Really would like to ship with the subsidy feature. |
@daodesigner I fixed by reverting some changes I made to the PPT contract, these were mostly gas optimizations which must have broken something. |
Upgraded certain dependencies within all packages to rectify the results of npm audit. fix privacy-scaling-explorations#534
revert eslint upgrade
"eslint": "^6.8.0", | ||
"lerna": "^4.0.0", | ||
"eslint": "^8.27.0", | ||
"lerna": "^6.0.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
Implemented fixes for several audit issues:
Poll
andPollyProcesorAndTallyer
.AccQueue
to prevent updating statevariables in a for loop.
SafeERC20
toPoll
to check the return value oftransferFrom
.getStateAqRoot
in Poll.fix #503
fix #504
fix #505
fix #508
fix #510
Upgraded Contracts to pragma 0.8.10 and refactored the code.