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

Fix #21986#22035

Merged
Lichtso merged 3 commits intosolana-labs:masterfrom
Lichtso:fix/21986
Dec 21, 2021
Merged

Fix #21986#22035
Lichtso merged 3 commits intosolana-labs:masterfrom
Lichtso:fix/21986

Conversation

@Lichtso
Copy link
Copy Markdown
Contributor

@Lichtso Lichtso commented Dec 20, 2021

Problem

See #21986 (comment)

It turns out that we can not remove the necessity of having program_id in the account_metas and account_infos for CPI just yet (as #20448 accidentally did). That is because ABIv1 still needs it to resolve the permissions of keyed_accounts correctly in cases where multiple keyed_accounts of program_id are being passed with different permissions.

Summary of Changes

Fixes #21986

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 21, 2021

Codecov Report

Merging #22035 (02790b6) into master (c0c3d7c) will increase coverage by 0.1%.
The diff coverage is 100.0%.

@@            Coverage Diff            @@
##           master   #22035     +/-   ##
=========================================
+ Coverage    81.2%    81.4%   +0.1%     
=========================================
  Files         552      517     -35     
  Lines      147607   145534   -2073     
  Branches      296        0    -296     
=========================================
- Hits       119942   118482   -1460     
+ Misses      27565    27052    -513     
+ Partials      100        0    -100     

@Lichtso Lichtso requested review from jackcmay and jstarry December 21, 2021 09:50
@Lichtso Lichtso merged commit ba8e158 into solana-labs:master Dec 21, 2021
@Lichtso Lichtso deleted the fix/21986 branch December 21, 2021 11:53
mergify Bot pushed a commit that referenced this pull request Dec 21, 2021
* Partial revert "Updates documentation around what needs to be passed in CPI. (#21633)"

* Enforces the program_id being passed explicitly by removing it from get_instruction_keyed_accounts().

* instruction_accounts => instructions_account

(cherry picked from commit ba8e158)

# Conflicts:
#	program-runtime/src/invoke_context.rs
@mergify mergify Bot mentioned this pull request Dec 21, 2021
Lichtso added a commit that referenced this pull request Dec 21, 2021
* Partial revert "Updates documentation around what needs to be passed in CPI. (#21633)"

* Enforces the program_id being passed explicitly by removing it from get_instruction_keyed_accounts().

* instruction_accounts => instructions_account

(cherry picked from commit ba8e158)
mergify Bot added a commit that referenced this pull request Dec 21, 2021
* Partial revert "Updates documentation around what needs to be passed in CPI. (#21633)"

* Enforces the program_id being passed explicitly by removing it from get_instruction_keyed_accounts().

* instruction_accounts => instructions_account

(cherry picked from commit ba8e158)

Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
@brooksprumo brooksprumo mentioned this pull request Jan 5, 2022
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.

Consensus (bank hash) mismatch between v1.8.10 and tip of master/v1.9.1 (mainnet)

2 participants