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

Patch the instruction discriminant to be 4 bytes #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

steveluscher
Copy link

Warning

I'm pretty sure that this is not landable, because if the legacy built-in and this program have different discriminator sizes, then the actual instruction data will not line up when we switch from one to the other. I couldn't find a way to configure Shank macros to produce 4-byte discriminants.

Fixes: #4.

@steveluscher
Copy link
Author

Uh, actually nevermind. This program won't suffer from this because there is no legacy version.

@steveluscher steveluscher deleted the u32-discriminant branch December 3, 2024 18:40
@buffalojoec buffalojoec restored the u32-discriminant branch December 4, 2024 07:56
@buffalojoec buffalojoec reopened this Dec 4, 2024
Copy link
Contributor

@buffalojoec buffalojoec left a comment

Choose a reason for hiding this comment

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

Similar to solana-program/loader-v3#5, this should land.

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.

Discriminator should be u32
2 participants