This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Refactor: Remove KeyedAccount
from program runtime
#22226
Merged
Lichtso
merged 9 commits into
solana-labs:master
from
Lichtso:refactor/remove_keyed_account_from_program_runtime
Jan 3, 2022
Merged
Refactor: Remove KeyedAccount
from program runtime
#22226
Lichtso
merged 9 commits into
solana-labs:master
from
Lichtso:refactor/remove_keyed_account_from_program_runtime
Jan 3, 2022
Conversation
This file contains 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
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
self.invoke_stack.push(StackFrame::new( | ||
program_indices.len(), | ||
create_keyed_accounts_unified(keyed_accounts.as_slice()), | ||
create_keyed_accounts_unified(unsafe { | ||
std::mem::transmute(keyed_accounts.as_slice()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello unsafe
, my old friend. I have come to use you again ...
It looks like #22165 introduced a consensus failure (privilege escalation), which caused the bank hash at block |
Closed
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
KeyedAccount
s for ABIv2.Summary of Changes
KeyedAccount
in the program runtime byBorrowedAccount
.InstructionContext
in parallel toInvokeStackFrame
inInvokeContext
.This PR does not change the tests or the native programs yet.
Fixes #