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

Program loading step is redundant #260

Open
nwatson22 opened this issue Jan 18, 2023 · 0 comments · Fixed by #304
Open

Program loading step is redundant #260

nwatson22 opened this issue Jan 18, 2023 · 0 comments · Fixed by #304

Comments

@nwatson22
Copy link
Member

Currently KAVM goes through a program loading step every time an application call transaction is executed before executing the program. The program is stored in the application cell as a TealInputProgram and loaded into its executable form which consists of a Map of program counter -> operation and another map of label -> PC by reading the program one operation/label at a time and populating these maps. This typically makes up a substantial chunk of the rewrite steps in a program execution. These maps should be the same for all executions of that program unless the program is updated, so we should move this process to happen during app creation and update (store the two maps in the application cell instead of a TealInputProgram). This way instead of regenerating these maps they can be copied to the execution workspace in one rewrite step. This will be especially useful for running proofs over application calls to contracts which are already created.

@nwatson22 nwatson22 linked a pull request Feb 24, 2023 that will close this issue
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 a pull request may close this issue.

1 participant