Feature - Adds UpgradeableLoaderInstruction::Migrate#4661
Feature - Adds UpgradeableLoaderInstruction::Migrate#4661Lichtso merged 2 commits intoanza-xyz:masterfrom
UpgradeableLoaderInstruction::Migrate#4661Conversation
|
The Firedancer team maintains a line-for-line reimplementation of the |
ba4a1ef to
d9db125
Compare
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
| // 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.
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.
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.
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?
| InstructionError::InvalidInstructionData, | ||
| )), | ||
| ), | ||
| ( | ||
| uninitialized_programdata_account, | ||
| finalized_migration_transaction.clone(), | ||
| Err(TransactionError::InstructionError( | ||
| 0, | ||
| InstructionError::InvalidInstructionData, |
There was a problem hiding this comment.
You checked for two error cases only. Should we check for all error possibilities?
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 <AlexanderMeissner@gmx.net>
* sdk: Bump all SDK crates for relaxed dependencies #### Problem The SDK relaxed its internal dependencies in anza-xyz/solana-sdk#27, but the monorepo is still using the pinned versions. #### Summary of changes Update all SDK crates to their next version. For almost all of them, that's v2.2.1 Otherwise, the address-lookup-table-interface crates goes to v2.2.2, and the loader-v3-interface goes to v3.0.0 due to a breaking change. To keep this PR small, the logic changes required for v3.0.0 are not implemented, and must be done in follow-up work, which essentially means reapplying the changes from #4661. * Return errors instead of panicking
* sdk: Bump all SDK crates for relaxed dependencies #### Problem The SDK relaxed its internal dependencies in anza-xyz/solana-sdk#27, but the monorepo is still using the pinned versions. #### Summary of changes Update all SDK crates to their next version. For almost all of them, that's v2.2.1 Otherwise, the address-lookup-table-interface crates goes to v2.2.2, and the loader-v3-interface goes to v3.0.0 due to a breaking change. To keep this PR small, the logic changes required for v3.0.0 are not implemented, and must be done in follow-up work, which essentially means reapplying the changes from #4661. * Return errors instead of panicking (cherry picked from commit a1ed2b1)
* sdk: Bump all SDK crates for relaxed dependencies #### Problem The SDK relaxed its internal dependencies in anza-xyz/solana-sdk#27, but the monorepo is still using the pinned versions. #### Summary of changes Update all SDK crates to their next version. For almost all of them, that's v2.2.1 Otherwise, the address-lookup-table-interface crates goes to v2.2.2, and the loader-v3-interface goes to v3.0.0 due to a breaking change. To keep this PR small, the logic changes required for v3.0.0 are not implemented, and must be done in follow-up work, which essentially means reapplying the changes from #4661. * Return errors instead of panicking (cherry picked from commit a1ed2b1)
* Adds UpgradeableLoaderInstruction::Migrate. * Adds test_loader_v3_to_v4_migration.
* Adds UpgradeableLoaderInstruction::Migrate. * Adds test_loader_v3_to_v4_migration. (cherry picked from commit 7491134) # Conflicts: # programs/bpf_loader/src/lib.rs # transaction-status/src/parse_bpf_loader.rs
* Adds UpgradeableLoaderInstruction::Migrate. * Adds test_loader_v3_to_v4_migration. (cherry picked from commit 7491134) # Conflicts: # programs/bpf_loader/src/lib.rs # transaction-status/src/parse_bpf_loader.rs
* Adds UpgradeableLoaderInstruction::Migrate. * Adds test_loader_v3_to_v4_migration. (cherry picked from commit 7491134) # Conflicts: # programs/bpf_loader/src/lib.rs # transaction-status/src/parse_bpf_loader.rs
…4969) (#4972) sdk: Bump all SDK crates for relaxed dependencies (#4969) * sdk: Bump all SDK crates for relaxed dependencies #### Problem The SDK relaxed its internal dependencies in anza-xyz/solana-sdk#27, but the monorepo is still using the pinned versions. #### Summary of changes Update all SDK crates to their next version. For almost all of them, that's v2.2.1 Otherwise, the address-lookup-table-interface crates goes to v2.2.2, and the loader-v3-interface goes to v3.0.0 due to a breaking change. To keep this PR small, the logic changes required for v3.0.0 are not implemented, and must be done in follow-up work, which essentially means reapplying the changes from #4661. * Return errors instead of panicking (cherry picked from commit a1ed2b1) Co-authored-by: Jon C <me@jonc.dev>
* Adds UpgradeableLoaderInstruction::Migrate. * Adds test_loader_v3_to_v4_migration. (cherry picked from commit 7491134) # Conflicts: # programs/bpf_loader/src/lib.rs # transaction-status/src/parse_bpf_loader.rs
Problem
See SIMD-0167.
Summary of Changes
Feature Gate Issue: https://github.com/anza-xyz/feature-gate-tracker/issues/78