-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Nikos/5071/investigate signtransaction testcases #5377
Nikos/5071/investigate signtransaction testcases #5377
Conversation
Your Render PR Server URL is https://web3-js-pr-5377.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-cc33b17ho1ks6o3hkrtg. |
Pull Request Test Coverage Report for Build 2971408301Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
09f5e2f
to
d80552f
Compare
bigints casted into strings should be fine though no? I think the issue is that some part where the bigint will be turned into a number, thats when we get smaller values. If thats the issue it wont be breaking |
Description
#5071 part 1: r and v values in testcases don't align with
signTransaction
results.In two testcases r and v were wrong (they were even the same between the tests).
signTransaction
returns the right values (cross checked with external libraries, too)Discussion:
r and s are
bigint
s inethereumjs
and we cast them to strings. This leads to some values with smaller values to be of smaller length when casted to string (missing leading 0s). I think, we should prepend them, but, this could be a breaking change for some users and better leave them as they are.