Skip to content

Peer Review - 250126 #31

Open
Open
@jimmychu0807

Description

@jimmychu0807

Questions/comments from @JohnGuilding:

  1. Why did you opt to build an executor and a validator? As opposed to keeping all logic in the validator?

  2. When running SIMULATE=true forge test --ffi, I get two failures:

    Failing tests:
    Encountered 2 failing tests in test/integration/IntegrationTest.t.sol:IntegrationTest
    [FAIL: revert: UserOperation simulation failed] test_BalanceTransferSingleMemberInitiateTx() (gas: 1789088023)
    [FAIL: revert: UserOperation simulation failed] test_TxCallMultiMembersInitiateTxSignTxExecuteTx() (gas: 1789747216)
    

    SIMULATE=true tests against 4337 validation rules (not all of them last I checked but this may have changed) https://github.com/rhinestonewtf/modulekit?tab=readme-ov-file#testing-modules

    For completion of the project, we should make sure that the validator is indeed 4337 compatible and do a full e2e test

  3. For the following comment:

    //TODO: what is a good way to delete entries associated with `acctTxCount[account]`,
    //   The following line will make the compiler fail.
    // delete acctTxCount[account];
    

    You could use a mechanism similar to an enumerable map, where you can loop over all the txHashs associated with an account https://docs.openzeppelin.com/contracts/5.x/api/utils#EnumerableMap. Since Solidity doesn't have generics and you are using a custom struct, you could explore a custom enumerable map too https://github.com/zkemail/email-recovery/blob/main/src/libraries/EnumerableGuardianMap.sol

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions