Skip to content
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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Lichtso
Copy link

@Lichtso Lichtso commented Jan 28, 2025

Problem

See SIMD-0167.

Summary of Changes

Feature Gate Issue: https://github.com/anza-xyz/feature-gate-tracker/issues/78

@Lichtso Lichtso requested a review from a team as a code owner January 28, 2025 13:00
Copy link

mergify bot commented Jan 28, 2025

The Firedancer team maintains a line-for-line reimplementation of the
native programs, and until native programs are moved to BPF, those
implementations must exactly match their Agave counterparts.
If this PR represents a change to a native program implementation (not
tests), please include a reviewer from the Firedancer team. And please
keep refactors to a minimum.

@Lichtso Lichtso force-pushed the feature/loader_v3_to_v4_migration branch 2 times, most recently from ba4a1ef to d9db125 Compare January 28, 2025 13:17
Copy link

@LucasSte LucasSte left a 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.

)?;

invoke_context.native_invoke(
solana_loader_v4_interface::instruction::truncate_uninitialized(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does truncate also increase the account size? If so, the name might be misleading.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, Truncate can also increase the size and it is common for file systems to only have one function for both directions: https://www.man7.org/linux/man-pages/man2/truncate.2.html

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see linux use the same naming, but we can improve our designation and call it resize.
Truncate means shortening: https://www.collinsdictionary.com/dictionary/english/truncate

@Lichtso Lichtso force-pushed the feature/loader_v3_to_v4_migration branch from d9db125 to c526f4d Compare January 28, 2025 14:16
@Lichtso Lichtso marked this pull request as draft January 28, 2025 14:20
@Lichtso
Copy link
Author

Lichtso commented Jan 28, 2025

Yep, also still have to write a test for the new instruction.

@Lichtso Lichtso force-pushed the feature/loader_v3_to_v4_migration branch 5 times, most recently from a5b2de4 to a141a1a Compare January 29, 2025 15:47
@Lichtso Lichtso force-pushed the feature/loader_v3_to_v4_migration branch 5 times, most recently from 2ccc774 to e5f2665 Compare February 3, 2025 16:36
Copy link

mergify bot commented Feb 4, 2025

The Firedancer team maintains a line-for-line reimplementation of the
native programs, and until native programs are moved to BPF, those
implementations must exactly match their Agave counterparts.
If this PR represents a change to a native program implementation (not
tests), please include a reviewer from the Firedancer team. And please
keep refactors to a minimum.

@joncinque
Copy link

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

@Lichtso Lichtso force-pushed the feature/loader_v3_to_v4_migration branch 5 times, most recently from 538e50e to ae58ed5 Compare February 5, 2025 23:20
Copy link

mergify bot commented Feb 5, 2025

The Firedancer team maintains a line-for-line reimplementation of the
native programs, and until native programs are moved to BPF, those
implementations must exactly match their Agave counterparts.
If this PR represents a change to a native program implementation (not
tests), please include a reviewer from the Firedancer team. And please
keep refactors to a minimum.

@Lichtso Lichtso force-pushed the feature/loader_v3_to_v4_migration branch from ae58ed5 to ea3afea Compare February 5, 2025 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants