-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
Use BN for large uints #95
Conversation
@JonathanLorimer since it doesn't look like I can make him a reviewer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, lots of heavy lifting in this PR 🎉🎉🎉. Just check my comments about using BN math with non-BN numbers. I am pretty sure that you need to create new BN's in those places, but I might be wrong, its been a week or two since I used BN.js.
@wemeetagain just read your comment about methods postfixed with n. Ignore my comments on those methods. However, you still might want to check that comparison operations work fine without BNs. |
@wemeetagain we have a merge conflict! |
rebased off latest master |
Change deserialize return type to any
re #94
resolves #89
aligns with ssz-js
Some comments:
n
)log2
bn method exists)num.umod(new BN(x))
sections could be rewritten asnum.modn(x)
since we're not expecting negative numbers in those places (I was just cautious with this first pass)