Skip to content
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

Fixes/zellic audit remediations vpmv2 #52

Merged
merged 8 commits into from
Nov 28, 2023

Conversation

livingrockrises
Copy link
Collaborator

Summary

Related Issue: # (issue number)

Change Type

  • Bug Fix
  • Refactor
  • New Feature
  • Breaking Change
  • Documentation Update
  • Performance Improvement
  • Other

Checklist

  • My code follows this project's style guidelines
  • I've reviewed my own code
  • I've added comments for any hard-to-understand areas
  • I've updated the documentation if necessary
  • My changes generate no new warnings
  • I've added tests that prove my fix is effective or my feature works
  • All unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Information

Branch Naming

return EntryPoint__factory.connect(epf.address, provider.getSigner());
}

export async function getUserOpEvent(ep: EntryPoint) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be moved to utils

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@Aboudjem Aboudjem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good except a few comments that need to be removed / fixed

Comment on lines 293 to 294
// const ev = await getUserOpEvent(entryPoint);
// expect(ev.args.success).to.be.true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be removed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to discuss this with @ankurdubey521

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. pushed updated code

Comment on lines +430 to +432
// await expect(
// entryPoint.handleOps([userOp], await offchainSigner.getAddress())
// ).to.be.reverted;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be removed or uncommented

{
sender: walletAddress,
verificationGasLimit: 200000, // for positive case 200k
// preVerificationGas: 55000, // min expected by bundler is 46k
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove if not needed

offchainSigner = ethersSigner[1];
depositorSigner = ethersSigner[2];
feeCollector = ethersSigner[3];
walletOwner = deployer; // ethersSigner[3];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ethersSigner[0]

@@ -52,7 +52,7 @@ contract VerifyingSingletonPaymasterV2 is
sstore(verifyingSigner.slot, _verifyingSigner)
sstore(feeCollector.slot, _feeCollector)
}
unaccountedEPGasOverhead = 12000;
unaccountedEPGasOverhead = 24000;
Copy link
Collaborator

@AmanRaj1608 AmanRaj1608 Nov 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is this value being decided here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +263 to +272
// Review
// 10/11 actual gas used
/* const paymasterIdBalanceDiffWithoutPremium = paymasterIdBalanceDiff
.mul(BigNumber.from(10))
.div(BigNumber.from(11));

console.log(
"paymasterIdBalanceDiffWithoutPremium ",
paymasterIdBalanceDiffWithoutPremium.toString()
); */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to keep it if I need to present more accounting check in future.

Copy link
Contributor

@Aboudjem Aboudjem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except a comment that needs to be removed and also could you add the audit report as well to the audit folder

@livingrockrises livingrockrises merged commit 1c5157c into develop Nov 28, 2023
3 checks passed
@livingrockrises livingrockrises deleted the fixes/zellic-audit-remediations-VPMV2 branch November 28, 2023 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants