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: add fallback mechanism for contracts with un-analyzed bytecode #1141

Open
enitrat opened this issue May 13, 2024 · 0 comments
Open

feat: add fallback mechanism for contracts with un-analyzed bytecode #1141

enitrat opened this issue May 13, 2024 · 0 comments
Assignees

Comments

@enitrat
Copy link
Collaborator

enitrat commented May 13, 2024

Feature Request

Describe the Feature Request

"Legacy" contracts might already be deployed on kakarot, without having their valid jumpdests analyzed. This will cause an issue when trying to validate a jump destination, which will always return false.

Add a fallback mechanism to analyze a contract's bytecode if it has not been analyzed yet, directly inside the account contract.

Describe Preferred Solution

If a storage read for valid jumpdests returns 0, verify whether the Account_jumpdests_initialized storage variable is set to true. If not, analyze the code and set the account's jumpdests in place, then return the result of the query.

Describe Alternatives

Related Code

Additional Context

If the feature request is approved, would you be willing to submit a PR? Yes

/ No (Help can be provided if you need assistance submitting a PR)

@enitrat enitrat self-assigned this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 Backlog
Development

No branches or pull requests

1 participant