This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Refactor: Remove KeyedAccount from program runtime#22226
Merged
Lichtso merged 9 commits intosolana-labs:masterfrom Jan 3, 2022
Merged
Conversation
ee6876c to
1815b45
Compare
1815b45 to
9b2c04c
Compare
9b2c04c to
05cf106
Compare
05cf106 to
7222fbe
Compare
Codecov Report
@@ Coverage Diff @@
## master #22226 +/- ##
========================================
Coverage 81.0% 81.1%
========================================
Files 523 523
Lines 146497 146525 +28
========================================
+ Hits 118760 118883 +123
+ Misses 27737 27642 -95 |
Adds BorrowedAccount ::get_rent_epoch(). Exposes InstructionContext::get_index_in_transaction(). Turns accounts and account_keys into pinned boxed slices.
Makes test_process_cross_program and test_native_invoke symmetric. Removes the borrow check from test_invoke_context_verify.
7222fbe to
ef88da9
Compare
Lichtso
commented
Jan 3, 2022
| program_indices.len(), | ||
| create_keyed_accounts_unified(keyed_accounts.as_slice()), | ||
| create_keyed_accounts_unified(unsafe { | ||
| std::mem::transmute(keyed_accounts.as_slice()) |
Contributor
Author
There was a problem hiding this comment.
Hello unsafe, my old friend. I have come to use you again ...
Contributor
Author
|
It looks like #22165 introduced a consensus failure (privilege escalation), which caused the bank hash at block |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Follow up of #21706 and #22165.
Continues the transition away from
KeyedAccounts for ABIv2.Summary of Changes
KeyedAccountin the program runtime byBorrowedAccount.InstructionContextin parallel toInvokeStackFrameinInvokeContext.This PR does not change the tests or the native programs yet.
Fixes #