Feature - UpgradeableLoaderInstruction::ExtendProgramChecked#6131
Feature - UpgradeableLoaderInstruction::ExtendProgramChecked#6131Lichtso merged 7 commits intoanza-xyz:masterfrom
UpgradeableLoaderInstruction::ExtendProgramChecked#6131Conversation
|
The Firedancer team maintains a line-for-line reimplementation of the |
e93ec72 to
435b3c6
Compare
joncinque
left a comment
There was a problem hiding this comment.
Just a fly-by review, the program logic looks great to me, just some small comments on the CLI and tests
8e7ef1f to
c79ac7a
Compare
c79ac7a to
baba6ec
Compare
joncinque
left a comment
There was a problem hiding this comment.
Just the last bit from my side, then this is ready to go in!
edf3150 to
6f70d23
Compare
joncinque
left a comment
There was a problem hiding this comment.
Looks like there's just some lockfile changes to commit, then this is good to go!
042ef6f to
f64f03c
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #6131 +/- ##
=========================================
- Coverage 82.8% 82.8% -0.1%
=========================================
Files 843 843
Lines 378109 378209 +100
=========================================
+ Hits 313134 313197 +63
- Misses 64975 65012 +37 🚀 New features to boost your workflow:
|
joncinque
left a comment
There was a problem hiding this comment.
Looks great to me, thanks for addressing all the points!
buffalojoec
left a comment
There was a problem hiding this comment.
Looks good, just a few small items from me!
| if invoke_context | ||
| .get_feature_set() | ||
| .enable_extend_program_checked | ||
| { |
There was a problem hiding this comment.
It might be nice to add a log message for the developer! I guess for either one.
| const PROGRAM_DATA_ACCOUNT_INDEX: IndexOfAccount = 0; | ||
| const PROGRAM_ACCOUNT_INDEX: IndexOfAccount = 1; | ||
| const AUTHORITY_ACCOUNT_INDEX: IndexOfAccount = 2; | ||
| let optional_payer_account_index = if check_authority { 4 } else { 3 }; |
There was a problem hiding this comment.
Some kind of note here about the system program being at index 2 or 3, based on the authority check, would be nice for other maintainers.
| "additionalBytes": additional_bytes, | ||
| "programDataAccount": account_keys[instruction.accounts[0] as usize].to_string(), | ||
| "programAccount": account_keys[instruction.accounts[1] as usize].to_string(), | ||
| "authority": account_keys[instruction.accounts[2] as usize].to_string(), |
There was a problem hiding this comment.
I think you need a .len() > 2 check here, since the call to check_num_bpf_upgradeable_loader_accounts will only check loader v3 accounts, not the authority, which is most likely owned by System.
There was a problem hiding this comment.
The extra check isn't necessary, the function is just poorly named. It checks for all accounts, not just ones owned by the loader program:
agave/transaction-status/src/parse_bpf_loader.rs
Lines 208 to 213 in a9bb1ba
dae745e to
019ec1d
Compare
019ec1d to
eb3e328
Compare
9f721b9 to
fc57f4a
Compare
fc57f4a to
71e26b5
Compare
|
Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis. |
* Bumps solana-loader-v3-interface version. * Adds the feature. * Adds feature gating logic. * Adjusts transaction-status parser. * Adjusts CLI manual extend and auto extend. * Adds authority_signer_index to ProgramCliCommand::ExtendProgramChecked. * Adjusts solana-bpf-loader-program-tests. (cherry picked from commit 94d70cd) # Conflicts: # Cargo.lock # feature-set/src/lib.rs # genesis/Cargo.toml # programs/bpf-loader-tests/tests/extend_program_ix.rs # programs/sbf/Cargo.lock # programs/sbf/Cargo.toml # runtime/Cargo.toml # svm-feature-set/src/lib.rs # svm/Cargo.toml # svm/examples/Cargo.lock # transaction-status/Cargo.toml
* Bumps solana-loader-v3-interface version. * Adds the feature. * Adds feature gating logic. * Adjusts transaction-status parser. * Adjusts CLI manual extend and auto extend. * Adds authority_signer_index to ProgramCliCommand::ExtendProgramChecked. * Adjusts solana-bpf-loader-program-tests. (cherry picked from commit 94d70cd)
* Bumps solana-loader-v3-interface version. * Adds the feature. * Adds feature gating logic. * Adjusts transaction-status parser. * Adjusts CLI manual extend and auto extend. * Adds authority_signer_index to ProgramCliCommand::ExtendProgramChecked. * Adjusts solana-bpf-loader-program-tests. (cherry picked from commit 94d70cd)
* Bumps solana-loader-v3-interface version. * Adds the feature. * Adds feature gating logic. * Adjusts transaction-status parser. * Adjusts CLI manual extend and auto extend. * Adds authority_signer_index to ProgramCliCommand::ExtendProgramChecked. * Adjusts solana-bpf-loader-program-tests. (cherry picked from commit 94d70cd)
* Bumps solana-loader-v3-interface version. * Adds the feature. * Adds feature gating logic. * Adjusts transaction-status parser. * Adjusts CLI manual extend and auto extend. * Adds authority_signer_index to ProgramCliCommand::ExtendProgramChecked. * Adjusts solana-bpf-loader-program-tests. (cherry picked from commit 94d70cd)
…(backport of #6131) (#6217) Feature - `UpgradeableLoaderInstruction::ExtendProgramChecked` (#6131) * Bumps solana-loader-v3-interface version. * Adds the feature. * Adds feature gating logic. * Adjusts transaction-status parser. * Adjusts CLI manual extend and auto extend. * Adds authority_signer_index to ProgramCliCommand::ExtendProgramChecked. * Adjusts solana-bpf-loader-program-tests. (cherry picked from commit 94d70cd) Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
See SIMD-0164.
Feature Gate Issue: #87