Skip to content

Simplify program loading error handling#2604

Closed
jstarry wants to merge 1 commit into
anza-xyz:masterfrom
jstarry:refactor/remove-account-found
Closed

Simplify program loading error handling#2604
jstarry wants to merge 1 commit into
anza-xyz:masterfrom
jstarry:refactor/remove-account-found

Conversation

@jstarry
Copy link
Copy Markdown

@jstarry jstarry commented Aug 15, 2024

Problem

It's redundant to try to return an error for when programs are not found versus when they are not executable because there are no cases in which a program is not found and is somehow executable.

Summary of Changes

Simplify program loading so that we don't need to track whether accounts existed during loading. We can instead rely on whether the program account is executable.

Fixes #

@jstarry jstarry force-pushed the refactor/remove-account-found branch from f1ac8a6 to 04dcc64 Compare August 15, 2024 08:04
@jstarry jstarry force-pushed the refactor/remove-account-found branch from 04dcc64 to b51ce5e Compare August 15, 2024 10:16
@jstarry jstarry requested a review from Lichtso August 21, 2024 02:56
@Lichtso
Copy link
Copy Markdown

Lichtso commented Aug 21, 2024

All is_executable flag checks will be removed soon, see: #2182

And yes, it is true that the entire block of program account checking during transaction account loading can be removed / deferred to runtime. I already have something in mind but there are lots of interacting components and I want to spend more time looking for a clean solution.

@jstarry jstarry closed this Aug 22, 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