This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Refactor: Make program_id always last in program chain#20598
Merged
Lichtso merged 3 commits intosolana-labs:masterfrom Oct 13, 2021
Merged
Conversation
cfa4e70 to
2167377
Compare
2167377 to
ffc6719
Compare
jackcmay
approved these changes
Oct 12, 2021
Codecov Report
@@ Coverage Diff @@
## master #20598 +/- ##
=========================================
- Coverage 82.0% 82.0% -0.1%
=========================================
Files 494 494
Lines 137601 137598 -3
=========================================
- Hits 112867 112833 -34
- Misses 24734 24765 +31 |
jeffwashington
added a commit
to jeffwashington/solana
that referenced
this pull request
Oct 13, 2021
…a-labs#20598)" This reverts commit 1d813ea.
Lichtso
added a commit
to Lichtso/solana
that referenced
this pull request
Oct 13, 2021
Lichtso
added a commit
to Lichtso/solana
that referenced
this pull request
Oct 13, 2021
Merged
CriesofCarrots
pushed a commit
to CriesofCarrots/solana
that referenced
this pull request
Oct 13, 2021
…a-labs#20598)" This reverts commit 1d813ea.
jeffwashington
pushed a commit
to jeffwashington/solana
that referenced
this pull request
Oct 13, 2021
jeffwashington
added a commit
to jeffwashington/solana
that referenced
this pull request
Oct 15, 2021
…a-labs#20598)" This reverts commit 1d813ea.
jeffwashington
added a commit
to jeffwashington/solana
that referenced
this pull request
Oct 15, 2021
…a-labs#20598)" This reverts commit 1d813ea.
jeffwashington
added a commit
to jeffwashington/solana
that referenced
this pull request
Oct 15, 2021
…a-labs#20598)" This reverts commit 1d813ea.
Closed
dankelleher
pushed a commit
to identity-com/solana
that referenced
this pull request
Nov 24, 2021
…0598) * Replaces program_id field in InvokeContextStackFrame by index. * Swaps order of program account and programdata account. * Removes program_id parameter from InvokeContext::push().
dankelleher
pushed a commit
to identity-com/solana
that referenced
this pull request
Nov 24, 2021
* Makes argument / parameter interfaces more clear. * Fixes the bug in solana-labs#20598
frits-metalogix
added a commit
to identity-com/solana
that referenced
this pull request
Nov 24, 2021
This reverts commit d9431a1.
frits-metalogix
added a commit
to identity-com/solana
that referenced
this pull request
Nov 24, 2021
…a-labs#20598)" This reverts commit 5d2fc6c.
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
Currently we need to keep track of
program_idin theInvokeContextStackFramebecause it can either be the last or second last account in the program account chain (depending on the presence of aprogramdataaccount).Summary of Changes
By swapping
programaccount andprogramdataaccount in the program account chain we can omit storing the index ofprogram_idas it is implicitly always the last one in the program account chain.Fixes #