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

Prune dependencies #3787

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Prune dependencies #3787

wants to merge 3 commits into from

Conversation

QuentinI
Copy link
Contributor

@QuentinI QuentinI commented Oct 23, 2024

Closes #<ISSUE_NUMBER>

This PR:

  • Removes unused dependencies
  • Removes custom_debug and derivative in favor of derive_more (we've been using all three, derive_more covers all use-cases)
  • Inlines mnemonic function from cdn-proto to hotshot-types, as it's quite simple and depending on cdn-proto only for this function pulled in a lot of unused dependencies
  • Replaces some imports from umbrella crates with specific ones (e.g. we don't need to pull in full ethereum-types when we actually use only U256 that it re-exports from smaller primitive-types)

This PR does not:

Key places to review:

@QuentinI QuentinI changed the title [WIP] Prune dependencies Prune dependencies Oct 23, 2024
@QuentinI QuentinI marked this pull request as ready for review October 23, 2024 14:17
Copy link
Contributor

@ss-es ss-es left a comment

Choose a reason for hiding this comment

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

looks good to me overall, really like the cleanup!

approving, but I think it would be worth having someone else look at the U256 crate change

@@ -21,6 +21,6 @@ pub trait ToFields<F: Field> {
/// convert a U256 to a field element.
pub(crate) fn u256_to_field<F: PrimeField>(v: &U256) -> F {
let mut bytes = vec![0u8; 32];
v.to_little_endian(&mut bytes);
v.write_as_little_endian(&mut bytes);
Copy link
Contributor

Choose a reason for hiding this comment

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

this looks like the same thing to me, though I'm not really familiar with either crate. is the U256 the same rust type?

it might be worth having someone else (@alxiong ?) confirm this is fine/won't affect downstream repos etc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For context: eth-types and primitive-types live in the same repo

The reason for the diff is they've recently updated the names for these methods recently which wasn't yet reflected in our eth-types version

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