-
Notifications
You must be signed in to change notification settings - Fork 340
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
Feature - Adds UpgradeableLoaderInstruction::Migrate
#4661
Feature - Adds UpgradeableLoaderInstruction::Migrate
#4661
Conversation
The Firedancer team maintains a line-for-line reimplementation of the |
ba4a1ef
to
d9db125
Compare
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.
The CI is failing.
d9db125
to
c526f4d
Compare
Yep, also still have to write a test for the new instruction. |
a5b2de4
to
a141a1a
Compare
2ccc774
to
e5f2665
Compare
The Firedancer team maintains a line-for-line reimplementation of the |
This PR contains changes to the solana sdk, which will be moved to a new repo within the next week, when v2.2 is branched from master. Please merge or close this PR as soon as possible, or re-create the sdk changes when the new repository is ready at https://github.com/anza-xyz/solana-sdk |
538e50e
to
ae58ed5
Compare
The Firedancer team maintains a line-for-line reimplementation of the |
2f9e218
to
7d0f4d0
Compare
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.
This PR adds the new instruction in the loader and modifies the CLI. Would you mind splitting those into two PRs? One for the new instruction and another one for the CLI command.
7d0f4d0
to
68c8f8f
Compare
68c8f8f
to
48f11f4
Compare
// Verify authority signature | ||
if !migration_authority::check_id(&provided_authority_address) | ||
&& provided_authority_address | ||
!= upgrade_authority_address.unwrap_or(program_address) |
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.
The SIMD mentions program signer
. Is that the program address?
Check that the provided authority is either:
- the migration authority
(pubkey is3Scf35jMNk2xXBD6areNjgMtXgp5ZspDhms8vdcbzC42
)
- or the upgrade authority stored in the program data account
- or the program signer if the program is finalized, closed or
uninitialized
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.
Yes, it means the program address is also a signer.
} else { | ||
ic_logger_msg!(log_collector, "Invalid Program account"); | ||
return Err(InstructionError::InvalidAccountData); | ||
} |
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.
This else is not specified in the SIMD. It is necessary here, for sure. Should it be included in the instruction description in the SIMD?
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.
I updated the SIMD
InstructionError::InvalidInstructionData, | ||
)), | ||
), | ||
( | ||
uninitialized_programdata_account, | ||
finalized_migration_transaction.clone(), | ||
Err(TransactionError::InstructionError( | ||
0, | ||
InstructionError::InvalidInstructionData, |
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.
You checked for two error cases only. Should we check for all error possibilities?
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.
Added ten more test cases.
48f11f4
to
66974b0
Compare
Unfortunately, this PR was merged after the v2.2 branch was cut, which means that the v2.2 crates were published without this change. Now it's blocking the removal of the SDK from the monorepo: https://buildkite.com/anza/agave/builds/19002#0194e28d-87cd-405a-bcec-8e65cb1600a3 Can we please revert this? We'll have to apply the changes to the loader-v3 interface crate at https://github.com/anza-xyz/solana-sdk/tree/master/loader-v3-interface, publish a new major version, and then upgrade agave to use that new crate. |
#### Problem The SDK changes from anza-xyz/agave#4661 need to be applied here. See [SIMD-0167](solana-foundation/solana-improvement-documents#167). #### Summary of Changes Feature Gate Issue: anza-xyz/feature-gate-tracker#78
#### Problem The SDK changes from anza-xyz/agave#4661 need to be applied here. See [SIMD-0167](solana-foundation/solana-improvement-documents#167). #### Summary of Changes Feature Gate Issue: anza-xyz/feature-gate-tracker#78
* loader-v3: Add `UpgradeableLoaderInstruction::Migrate` #### Problem The SDK changes from anza-xyz/agave#4661 need to be applied here. See [SIMD-0167](solana-foundation/solana-improvement-documents#167). #### Summary of Changes Feature Gate Issue: anza-xyz/feature-gate-tracker#78 * Avoid change in solana-program --------- Co-authored-by: Alexander Meißner <[email protected]>
Problem
See SIMD-0167.
Summary of Changes
Feature Gate Issue: https://github.com/anza-xyz/feature-gate-tracker/issues/78