Skip to content

Conversation

@jmg-duarte
Copy link
Contributor

@jmg-duarte jmg-duarte commented Nov 6, 2025

Description

Migrate driver::util::math into alloy

The replacement of U256s implies that we no longer have the same operations available and need to implement some by hand.

Notes on operations:

Changes

  • Migrate driver::util::math into alloy
  • Refactors where applicable
  • Adds unit tests

How to test

N/A

@jmg-duarte jmg-duarte requested a review from a team as a code owner November 6, 2025 17:26
Copy link
Contributor Author

@jmg-duarte jmg-duarte left a comment

Choose a reason for hiding this comment

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

Notes for reviewers:

@jmg-duarte jmg-duarte requested a review from squadgazzz November 7, 2025 10:22
Copy link
Contributor

@squadgazzz squadgazzz left a comment

Choose a reason for hiding this comment

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

LGTM

try_info -> custom operation, check the most significant limbs after U256 for overflow and return None if they're not 0 (i.e. overflow happened)

This is not true anymore, right?

@jmg-duarte
Copy link
Contributor Author

LGTM

try_info -> custom operation, check the most significant limbs after U256 for overflow and return None if they're not 0 (i.e. overflow happened)

This is not true anymore, right?

Updated, good catch

Copy link
Contributor

@m-sz m-sz left a comment

Choose a reason for hiding this comment

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

LGTM

@jmg-duarte jmg-duarte added this pull request to the merge queue Nov 10, 2025
github-merge-queue bot pushed a commit that referenced this pull request Nov 10, 2025
# Description
Migrate driver::util::math into alloy

The replacement of U256s implies that we no longer have the same
operations available and need to implement some by hand.

Notes on operations:
* full_mul -> widening_mul (kudos @squadgazzz)

# Changes

- [ ] Migrate driver::util::math into alloy
- [ ] Refactors where applicable
- [ ] Adds unit tests

## How to test
N/A
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 10, 2025
@jmg-duarte jmg-duarte added this pull request to the merge queue Nov 10, 2025
Merged via the queue into main with commit 8541156 Nov 10, 2025
18 checks passed
@jmg-duarte jmg-duarte deleted the jmgd/alloy/math branch November 10, 2025 11:17
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants