Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Refactor execute_instruction() for extraction from bank #1772

Merged
merged 1 commit into from
Nov 12, 2018

Conversation

garious
Copy link
Contributor

@garious garious commented Nov 11, 2018

Problem:

We talk about the "runtime" in the contracts engine RFC, but it's not in a module or a struct of its own. It's some set of Bank methods acting on a subset of Bank state. Without that separation, it'll be difficult to ask others to scrutinize that mission-critical code.

Proposed changes:

Refactoring such that execute_instruction() could be extracted from the bank. Next step is to move execute_instruction() into a new runtime.rs. Stopped here so that the PR diff is manageable.

cc: #1528

@garious garious requested a review from jackcmay November 11, 2018 22:23
@garious garious changed the title Extract complex loop from execute_instruction Refactor execute_instruction() for extraction from bank Nov 12, 2018
@garious garious added the work in progress This isn't quite right yet label Nov 12, 2018
@garious
Copy link
Contributor Author

garious commented Nov 12, 2018

I rolled this one back a couple commits. It's not so straightforward to hoist load_executable_accounts(), since the built-in programs aren't stored in accounts.

@garious garious added automerge Merge this Pull Request automatically once CI passes and removed work in progress This isn't quite right yet labels Nov 12, 2018
@solana-grimes solana-grimes merged commit 126f065 into solana-labs:master Nov 12, 2018
vkomenda pushed a commit to vkomenda/solana that referenced this pull request Aug 29, 2021
brooksprumo added a commit to brooksprumo/solana that referenced this pull request Jun 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants