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

Refactor: Merge MessageProcessor into InvokeContext#20165

Merged
Lichtso merged 4 commits intosolana-labs:masterfrom
Lichtso:refactor/merge_message_processor_into_invoke_context
Sep 27, 2021
Merged

Refactor: Merge MessageProcessor into InvokeContext#20165
Lichtso merged 4 commits intosolana-labs:masterfrom
Lichtso:refactor/merge_message_processor_into_invoke_context

Conversation

@Lichtso
Copy link
Copy Markdown
Contributor

@Lichtso Lichtso commented Sep 24, 2021

Problem

MessageProcessor has no real purpose anymore as most of its functionality has been moved to InstructionProcessor and InvokeContext. Currently, it is redirecting dozens of parameters over multiple function calls without doing much. By removing it we can use InvokeContext transaction wide instead of creating one per instruction. This way the InvokeContext can become the runtime wrapper around the TransactionContext of ABIv2 (#19191).

Summary of Changes

Moves all instance properties and methods (except for process_message) out of MessageProcessor.

Fixes #

@Lichtso Lichtso added the CI Pull Request is ready to enter CI label Sep 24, 2021
@solana-grimes solana-grimes removed the CI Pull Request is ready to enter CI label Sep 24, 2021
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 24, 2021

Codecov Report

Merging #20165 (da3c630) into master (3aba89d) will increase coverage by 0.0%.
The diff coverage is 91.3%.

@@           Coverage Diff           @@
##           master   #20165   +/-   ##
=======================================
  Coverage    82.7%    82.8%           
=======================================
  Files         487      487           
  Lines      135326   135315   -11     
=======================================
+ Hits       112036   112049   +13     
+ Misses      23290    23266   -24     

@Lichtso Lichtso merged commit df6905c into solana-labs:master Sep 27, 2021
@Lichtso Lichtso deleted the refactor/merge_message_processor_into_invoke_context branch September 27, 2021 06:28
jackcmay added a commit to jackcmay/solana that referenced this pull request Sep 28, 2021
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Sep 28, 2021
@Lichtso Lichtso restored the refactor/merge_message_processor_into_invoke_context branch September 29, 2021 07:29
@Lichtso Lichtso deleted the refactor/merge_message_processor_into_invoke_context branch September 29, 2021 11:43
dankelleher pushed a commit to identity-com/solana that referenced this pull request Nov 24, 2021
* Inlines MessageProcessor::execute_instruction() in MessageProcessor::process_message().

* Moves MessageProcessor::create_pre_accounts() into ThisInvokeContext::push().

* Hoists ThisInvokeContext::new() out of loop inside MessageProcessor::process_message().

* Moves MessageProcessor::verify_account_references() and MessageProcessor::verify() into InvokeContext::verify().
dankelleher pushed a commit to identity-com/solana that referenced this pull request Nov 24, 2021
frits-metalogix added a commit to identity-com/solana that referenced this pull request Nov 24, 2021
frits-metalogix added a commit to identity-com/solana that referenced this pull request Nov 24, 2021
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.

2 participants