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

Improve BigInt<>Bytes conversion helpers test coverage & address edge case issues #3180

Open
gabrocheleau opened this issue Dec 6, 2023 · 0 comments

Comments

@gabrocheleau
Copy link
Contributor

Our BigInt<>Bytes conversion helpers have been updated in the past few weeks, notably because of verkle work that required us to handle little endianness conversion. We have also encountered issues related to those helpers that could have been easily avoided if we had been testing those helpers more thoroughly.

There are also outstanding questions regarding those helpers (taken from #3169 ):

  • Should bigIntToBytes on BigInt(0) return the empty array? (Note: this is super breaking so we cannot do it, we could introduce a new method?)
  • Should setLengthLeft throw if the expected length is lower than the current length? (It is unknown if we should trim left or right 🤔 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants