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

imp(evm): restrict VFBC deployment on top of Module Account or EOA #16

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

VictorTrustyDev
Copy link

@VictorTrustyDev VictorTrustyDev commented Mar 28, 2024

Current behavior is deploy VFBC no matter account is existing or not, no matter the type of the account is. The only restriction is the existing account must Not be a contract account.
Even tho the chance of override an existing Module Account or EOA is almost equals to brute forcing private key of a wallet.
This PR can be ignored without any consequence.

Brief of code change:

  • Restrict deploy VFBC if existing account is a Module Account.
  • Restrict deploy VFBC if existing account has sequence number > 0 (sign of EOA, as user used private key to sent at least one transaction).

Plus the existing one (restrict deploy VFBC if existing account is a VFBC contract), we have 3.

Added test-cases:

  • Proof of VFBC still able to be deployed if there is an existing account at the predicted address.
  • Test cases for the new restriction as defined above.

In case VFBC was stopped deploying due to the restriction defined above. We just need to shift sequence number of the deployment module account by one and everything will be fine.

@VictorTrustyDev VictorTrustyDev force-pushed the imp/restrict-vfbc-on-top-of-module-accounts-or-eoa branch from c886f77 to 2326220 Compare March 28, 2024 15:45
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.

1 participant