-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
6004 replace buffer with uint8array #6033
Conversation
Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com> Signed-off-by: Marin Petrunic <marin.petrunic@gmail.com>
Bundle StatsHey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
Deploying with
|
Latest commit: |
0fd7780
|
Status: | ✅ Deploy successful! |
Preview URL: | https://661157e4.web3-js-docs.pages.dev |
Branch Preview URL: | https://6004-alex-1.web3-js-docs.pages.dev |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## 4.x #6033 +/- ##
==========================================
+ Coverage 85.85% 85.97% +0.11%
==========================================
Files 156 157 +1
Lines 7425 7474 +49
Branches 2018 2022 +4
==========================================
+ Hits 6375 6426 +51
+ Misses 1050 1048 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This looks like a legitimate error |
@spacesailor24 This error has been present in other jobs like integration (14, ganache, ws) on earlier commits but would pass after running a couple of times. I tried producing this issue locally but End-to-End ganache:ws (14, firefox) pass. Edit: after running the failed test a third time it works, i think there might be a chance of a 65 length string will be produced somehow and causes the tests to fail, in particular it happens to the getblock function |
@luu-alex Oh no worries then, I thought it was only the two |
@spacesailor24 Created an issue for sign unit tests cod cov #6055 |
After some investigation, it looks this test fails when Ganache is returning a transaction with a signature that has an
|
bytes array cannot have hex string with odd amount of characters (each byte is represented by 2 characters). It could be that it worked before because Buffer when given odd length hex string just drops last character internally. Pretty sure the correct behavior is to pad with zero as ethers does. |
@mpetrunic Interestingly, we only found this issue because Ganache returns the unpadded value. Don't believe Geth does this though as the test only fails for Ganache |
thanks @mpetrunic for pinning it down, and @spacesailor24 for your findings. Based on team discussion we will open issue in ganache to return valid hex value ( padded ) for getblock with txs like geth does. |
@jdevcs was taking a look at our failing testcases and geth fails sometimes meaning its not a ganache issue. Looking around stackexchange it seems that r value can be less than 32 bytes. I believe this change is needed to be on our side and to add padding to equal 32 bytes, ill create an issue . |
Description
Supersecedes #6004 and fixes the broken testcases
Please include a summary of the changes and be sure to follow our Contribution Guidelines.
Type of change
Checklist for 1.x:
npm run dtslint
with success and extended the tests and types if necessary.npm run test:cov
and my test cases cover all the lines and branches of the added code.npm run build
with success.dist/web3.min.js
in a browser.CHANGELOG.md
file in the root folder.Checklist for 4.x:
yarn
successfullyyarn lint
successfullyyarn build:web
successfullyyarn test:unit
successfullyyarn test:integration
successfullycompile:contracts
successfullyCHANGELOG.md
file in the packages I have edited.