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

Refactor: Move sdk::process_instruction in program-runtime-crate#21180

Merged
Lichtso merged 6 commits intosolana-labs:masterfrom
Lichtso:refactor/move_process_instruction_in_program_runtime
Nov 17, 2021
Merged

Refactor: Move sdk::process_instruction in program-runtime-crate#21180
Lichtso merged 6 commits intosolana-labs:masterfrom
Lichtso:refactor/move_process_instruction_in_program_runtime

Conversation

@Lichtso
Copy link
Copy Markdown
Contributor

@Lichtso Lichtso commented Nov 4, 2021

Problem

Various program execution related structs, methods, types and traits are still in the SDK, but don't need to be part of the public interface. The code base is currently hard to understand because the relevant parts are spread across the runtime, sdk and the program-runtime crate.

Summary of Changes

Moves everything from sdk::process_instruction into the program-runtime-crate.

Fixes #

@Lichtso Lichtso force-pushed the refactor/move_process_instruction_in_program_runtime branch from 60fc184 to 1134a51 Compare November 17, 2021 15:46
@Lichtso
Copy link
Copy Markdown
Contributor Author

Lichtso commented Nov 17, 2021

I just rebased to avoid merge conflicts.
Let's see if it still works 🤞.

Edit: Ah, yes a few things changed in the mean time, will update them accordingly.

@Lichtso Lichtso force-pushed the refactor/move_process_instruction_in_program_runtime branch from 1134a51 to 0ec8c65 Compare November 17, 2021 15:58
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 17, 2021

Codecov Report

Merging #21180 (0ec8c65) into master (c3e5927) will decrease coverage by 0.0%.
The diff coverage is 65.2%.

@@            Coverage Diff            @@
##           master   #21180     +/-   ##
=========================================
- Coverage    81.5%    81.5%   -0.1%     
=========================================
  Files         500      500             
  Lines      140604   140604             
=========================================
- Hits       114704   114684     -20     
- Misses      25900    25920     +20     

@Lichtso Lichtso merged commit e540b1c into solana-labs:master Nov 17, 2021
@Lichtso Lichtso deleted the refactor/move_process_instruction_in_program_runtime branch November 17, 2021 18:35
@knivets
Copy link
Copy Markdown

knivets commented Nov 18, 2021

Is there some sort of guide on the various Solana crates? What you said about the code base being hard to understand rings very true to me, as I'm struggling to assign roles to various sub-packages like sdk, runtime, program-runtime, rpc, client, etc.

@Lichtso
Copy link
Copy Markdown
Contributor Author

Lichtso commented Nov 22, 2021

There is no broad and coarse documentation of the source tree that I am aware of.
However, you can ask around on our Discord for others to explain the structure.

dankelleher pushed a commit to identity-com/solana that referenced this pull request Nov 24, 2021
…ana-labs#21180)

* Moves the Executor dyn Trait to instruction_processor.rs

* Moves the Logger dyn Trait as well as the ic_msg and ic_logger_msg macros to log_collector.rs,
and moves the stable_log to stable_log.rs

* Moves the ComputeMeter dyn Trait to invoke_context.rs

* Moves the InvokeContext dyn Trait and the ProcessInstructionWithContext type to invoke_context.rs

* Updates cargo files.

* Re-export InvokeContext in program-test

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
frits-metalogix added a commit to identity-com/solana that referenced this pull request Nov 24, 2021
alessandrod added a commit to alessandrod/cargo-run-bpf-tests that referenced this pull request Nov 26, 2021
InvokeContext is now in program-runtime, see
solana-labs/solana#21180
alessandrod added a commit to anza-xyz/cargo-run-solana-tests that referenced this pull request Nov 28, 2021
InvokeContext is now in program-runtime, see
solana-labs/solana#21180
@Lichtso Lichtso mentioned this pull request Jan 9, 2022
TalentCoder99 added a commit to TalentCoder99/cargo-run-bpf-tests that referenced this pull request Jun 26, 2022
InvokeContext is now in program-runtime, see
solana-labs/solana#21180
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants