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

feat: strip down light sync #30

Merged
merged 5 commits into from
Jul 30, 2024
Merged

Conversation

r0ohafza
Copy link
Collaborator

No description provided.

@r0ohafza r0ohafza requested a review from wminshew July 29, 2024 22:25
}

bytes memory signer = new bytes(returnLength);
function getSignerAtIndex(bytes memory signerUpdates_, uint8 index_) internal pure returns (bytes memory) {
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this fn can be cleaned up a bit but dont want to hold up submitting this review for it

packages/smart-vaults/src/utils/LightSyncMultiSigner.sol Outdated Show resolved Hide resolved
packages/smart-vaults/src/utils/LightSyncMultiSigner.sol Outdated Show resolved Hide resolved

return (signers_, threshold_);
}
uint8 signerType;
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this can be cleaned up a bit from here down but don't want to hold up submitting review

nonce_: nonce++
});
(signers, threshold) = _processSignerSetUpdateMemory(signerUpdates_[i], signers, threshold);
memorySignerSet = _processSignerSetUpdateMemory(i, signerSetUpdates_[i], memorySignerSet, signerUpdates);
Copy link
Contributor

Choose a reason for hiding this comment

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

i think memorySignerSet should probably be checked/set in validate vs process? (also debating whether the whole code feels a lot more readable w/o the concept; kind of odd the way it works. at a minimum, needs a more descriptive name i think)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah I can see why it would be confusing, validate only checks if the signatures to make this update are valid and not if the update itself is valid

@r0ohafza r0ohafza merged commit e584c36 into smart-vaults Jul 30, 2024
@r0ohafza r0ohafza deleted the remove-signer-from-light-sync branch July 30, 2024 18:30
r0ohafza added a commit that referenced this pull request Sep 4, 2024
* feat: create smart vaults package

* feat: add simple account and factory from eth-infitism/aa

* feat: restructure smart vault

* feat: restructure smart vault factory

* feat: multisig support with passkey and eoa signers

* feat: add root owner tests

* feat: add multi signer tests

* fix: signer cap

* feat: add factory tests

* feat: validateUserOp tests

* feat: execute tests

* feat: create functionality

* feat: avoid signing over gas userop until last signature

* chore: update docs

* Light state sync and multi user op (#28)

* feat: light state sync first pass

* feat: 1271 light state sync support

* fix: tests

* chore: light state sync tests

* chore: erc1271 tests

* feat: multiChain user op

* lil refactoring

* minor changes

* feat: light multi user op

* fix: rename to getX()

* fix: set nonce if and only if nonce is greater than storage

* fix: revert when trying to remove empty signer

* fix: minor fixes

* fix: capitalize immutables

* feat: rootOwner -> solay/Ownable

* fix: _nonce to _salt

* feat: add styling guide

* chore: gas report

* feat: don't return early in signature verification flows

* feat: add missing event in initialize flow

* fix: pass light hash directly

* feat: optimize isValidSignature flow

* fix: use constants

* fix: add constants to multiSignerLib

* chore: add more docs

* chore: add more initialization tests

* chore: add more user op signature tests

* chore: add more erc1271 signature tests

* feat: strip down light sync (#30)

* feat: strip down light sync

* fix: clean up assembly blocks

* fix: docs

* fix: address comments

* fix: address comment

* feat: remove onlySelfOrOwner

* docs: update signature scheme

* feat: add fallback module (#31)

* feat: add fallback module

* feat: add custom receive fn

* fix: remove code check when validating signer

* chore: rename bundle to merkelized

* fix: remove redundant brackets

* chore: remove via-ir for default profile

* feat: redo signature for user op and erc1271 (#33)

* feat: redo signature for user op and erc1271

* minor changes

* minor changes

* Refactor SmartVault (#34)

* fix compiler warning

* create AccountSigner and PasskeySigner

* move nonce logic to LightSync module

* use standard capitalization

* fix enum variant

* redesign signature of _validate functions

* deduplicate merkle logic

* remove redundant code

* deduplicate multisig logic

* reuse validation function

* merge multisig logic with and without in-memory updates

* feat: rip light sync

---------

Co-authored-by: Francisco <[email protected]>

* feat: operator manager (#32)

* feat: operator manager first pass

* feat: operator manager

* docs: minor update

* fix: address comments

* chore: operator -> module

* fix: tests

* fix: name

* chore: merge multiSignerSignatureLib to multiSignerLib

* fix: add comments in user op validation

* fix: minor doc updates

* chore: minor doc updates

* feat: update storage layout of signer (#36)

* feat: update storage layout of signer

* fix: minor fixes

* fix: minor fixes

* fix: address comments

* fix: address comments

* fix: using  MultiSignerLib

* fix: use global and remove unneeded private functions

* fix: use $.isValidSignature

* fix: update isPasskey logic

* fix: address will's comments

* docs: add security contact

* fix: add storage location fallback and module manager

* fix: change updateFallbackHandler modifier public -> external

* chore: add slither and remove dead code

* feat: multi signer auth (#38)

* feat: multi signer auth

* fix: docs:
:

* fix: add suggested doc change

* chore: update readme (#39)

* chore: update readme

* fix: address comments

* chore: add dummy passkey signature test

* fix: clean up multi signer auth (#40)

* fix: clean up multi signer auth

* feat: mapping to array

* fix: address comment

* feat: update _checkOwner() (#41)

* feat: add fallback handler called event (#42)

* chore: doc updates

* chore: doc updates

* test: add missing fallback test

* feat: add upper limit to gas price in light user op hash (#43)

* feat: add upper limit to gas price in light user op hash

* fix: update comment

* feat: add preVerification and callGas limits

* feat: add verification gas limit

* fix: docs

* feat: add paymaster limits

* fix: use paymasterVerificationGasLimit

* fix: ordering of params

* fix: prevent empty signers validating signature (#45)

* fix: revert when duplicate signer is used (#46)

* fix: revert when duplicate signer is used

* fix: move check one level out

* fix: verify light merkle root when threshold is > 1 (#47)

* fix: verify light merkle root when threshold is > 1

* fix: update doc

* feat: deployment script (#44)

* feat: custom webauthn (#50)

* chore: add audit report

* fix: lint

---------

Co-authored-by: Francisco <[email protected]>
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.

2 participants