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

feat!: use ruint & alloy for ethereum compat #80

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

Conversation

paolodamico
Copy link

@paolodamico paolodamico commented Nov 19, 2024

  • Removes dependency on ethers which is now deprecated.
  • Uses ruint's U256 directly, which alloy uses under the hood. This poses a minor breaking change for the Ethereum compatibility module because previously the output was a uint (different crate) coming from ethers-core.
  • Updates tests to use alloy instead of ethers.
  • Very minor updates to the README that seem outdated.

@@ -185,7 +184,7 @@ fn u256_to_point<F: PrimeField>(point: U256) -> F {
fn point_to_u256<F: PrimeField>(point: F) -> U256 {
let point = point.into_bigint();
let point_bytes = point.to_bytes_be();
U256::from(&point_bytes[..])
U256::try_from_be_slice(&point_bytes[..]).expect("always works")
Copy link
Author

Choose a reason for hiding this comment

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

@recmo I believe we could move this to little Endian for consistency with u256_to_point, thoughts?

@paolodamico paolodamico changed the title use ruint & alloy for ethereum compat feat!: use ruint & alloy for ethereum compat Nov 20, 2024
@Dzejkop
Copy link
Contributor

Dzejkop commented Dec 3, 2024

Should probably bump crate version to 0.2.0 to account for the breaking change

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.

2 participants