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

Extract reserved-account-keys crate #3141

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

kevinheavey
Copy link

Problem

  • solana_sdk::reserved_account_keys blocks moving out solana_sdk::transaction
  • It would be good to be able to use important program IDs without importing heavy dependencies or inlining them

Summary of Changes

  • Extract reserved-account-keys-crate and re-export for backwards compatibility
  • For every ID definition imported by reserved-account-keys, move that definition to reserved-account-keys and re-export it where it used to be
  • Make std optional in the new crate. When no features are enabled, the new crate is just a bunch of ID definitions and it compiles very quickly, so there is no noticeable difference in compile time to any crate that pulls its own ID definition from reserved-account-keys

This branches off #3140 so that needs to be merged first

Copy link

mergify bot commented Oct 11, 2024

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.

@kevinheavey
Copy link
Author

kevinheavey commented Oct 13, 2024

This might be cleaner as two separate crates? One that just contains the ID declarations (perhaps solana-sdk-ids) and another containing ReservedAccountKeys &co.

This would avoid having to do all the feature and target_os stuff that ended up being uglier than I expected.

@joncinque thoughts?

@kevinheavey kevinheavey marked this pull request as ready for review October 15, 2024 13:12
@kevinheavey
Copy link
Author

This might be cleaner as two separate crates? One that just contains the ID declarations (perhaps solana-sdk-ids

I see there is already a deprecated solana_program::sdk_ids module so the name would clash. But no other name comes to mind and it wouldn't be the worst thing to clash with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant