Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #21986 #22035

Merged
merged 3 commits into from
Dec 21, 2021
Merged

Fix #21986 #22035

merged 3 commits into from
Dec 21, 2021

Conversation

Lichtso
Copy link
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

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 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.

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