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 poh-config crate #3855

Merged
merged 4 commits into from
Dec 5, 2024
Merged

Conversation

kevinheavey
Copy link

@kevinheavey kevinheavey commented Dec 2, 2024

Problem

solana_sdk::poh_config blocks moving out solana_sdk::genesis_config and imposes a solana_sdk dep on svm crates

Summary of Changes

  • Move to its own crate and re-export with deprecation
  • Make serde optional in the new crate
  • Replace unchecked_div_by_const with regular const division and a check for non-zero denominator, to avoid a solana-program dep

@kevinheavey kevinheavey force-pushed the extract-poh-config branch 2 times, most recently from d194eb8 to 4f87316 Compare December 2, 2024 22:18
Copy link

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Just the one question, looks good otherwise! @yihau can you accept solana-poh-config?

pub extern crate bs58;
extern crate log as logger;
#[cfg_attr(not(target_os = "solana"), macro_use)]

Choose a reason for hiding this comment

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

What's this change about?

Copy link
Author

Choose a reason for hiding this comment

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

After moving out poh_config, we were getting an unused macro warning that this fixes

@yihau yihau added the automerge automerge Merge this Pull Request automatically once CI passes label Dec 5, 2024
@mergify mergify bot merged commit 926c175 into anza-xyz:master Dec 5, 2024
53 checks passed
Copy link

@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.

Just curious why this wasn't included under full? I don't think programs need this package, right?

@kevinheavey
Copy link
Author

That would have been a breaking change

@buffalojoec
Copy link

Isn't full a default feature?

@kevinheavey
Copy link
Author

It would be a breaking change for anyone building with default-features = false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge automerge Merge this Pull Request automatically once CI passes need:merge-assist
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants