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

Nikos/5071/investigate signtransaction testcases #5377

Merged
merged 6 commits into from
Sep 6, 2022

Conversation

nikoulai
Copy link
Contributor

@nikoulai nikoulai commented Aug 24, 2022

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 bigints in ethereumjs 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.

@render
Copy link

render bot commented Aug 24, 2022

@coveralls
Copy link

coveralls commented Aug 24, 2022

Pull Request Test Coverage Report for Build 2971408301

Warning: 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

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 437 unchanged lines in 7 files lost coverage.
  • Overall coverage decreased (-2.3%) to 72.235%

Files with Coverage Reduction New Missed Lines %
packages/web3-core-requestmanager/src/jsonrpc.js 2 82.76%
packages/web3-core-helpers/src/formatters.js 25 80.95%
packages/web3-core-helpers/src/errors.js 31 4.41%
packages/web3-utils/src/soliditySha3.js 55 5.13%
packages/web3-utils/src/index.js 62 29.31%
packages/web3-utils/src/utils.js 96 13.31%
packages/web3-eth-accounts/src/index.js 166 23.62%
Totals Coverage Status
Change from base Build 2965177708: -2.3%
Covered Lines: 3405
Relevant Lines: 4437

💛 - Coveralls

@nikoulai nikoulai force-pushed the nikos/5071/investigate-signtransaction-testcases branch from 09f5e2f to d80552f Compare August 25, 2022 09:31
@luu-alex
Copy link
Contributor

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

@jdevcs jdevcs added the 1.x 1.0 related issues label Sep 1, 2022
@nikoulai nikoulai requested a review from jdevcs September 5, 2022 14:03
@jdevcs jdevcs added the Future Release For future release. label Sep 6, 2022
This was referenced Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues Future Release For future release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants