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

Fix issues for security audit #9

Merged
merged 2 commits into from
Oct 17, 2024
Merged

Conversation

rishibalakrishnan
Copy link
Collaborator

  • remove makeProxyTx and proxy (proxy is a trampoline that can be used on other blockchains #8 nonce management issues; nit: missing comment, unusual style merits comments #5 makeProxyTx is not tested #6)
    I decided to remove makeProxyTx() and proxy() from the KMaaS base functionality. I initially included it because I thought that it would allow the KMaaS account to also function as a gas relayer, but comments made me reconsider. If proxy is separated into another contract for use on other EVM chains, then 1. makeProxyTx doesn't work because it doesn't know where to point to and 2. nonce management doesn't make sense because the same keypair can sign transactions on multiple different chains. Then makeProxyTx just replicates signEIP155 functionality with more parameters hard-coded. After trying to approach it a couple different ways I decided it just makes more sense to let developers define how they would want relaying to work.

Instead I decided to include that functionality in the sample application instead. The sample application previously didn't rely on gas relayers so required the public keys stored by the KMaaS application to be funded. Instead, I'm in the process of updating it so that user accounts don't have to pay gas to submit transactions.

- remove makeProxyTx and proxy
- update comments for AccountFactory
- Add custom error for Validator invalid credentials
Copy link

@bennetyee bennetyee left a comment

Choose a reason for hiding this comment

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

this LGTM, though it would be slightly better if this were committed along with the changes for makeProxyTx and proxy functionality -- which is being moved to the sample application -- all together. since there are no dependencies on makeProxyTx etc, having the functionality disappear on the main branch now and reappear shortly is not a big deal.

@rishibalakrishnan
Copy link
Collaborator Author

Got it, thought I would have the commit finalized sooner but have been running into some weird issues with local contract development so I will merge this and tag you on the relevant changes on the sample application when they're ready

@rishibalakrishnan rishibalakrishnan merged commit 36b01dd into main Oct 17, 2024
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