-
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
Fix: BSC - get transaction with gasLimit over 53 bits #3948
Fix: BSC - get transaction with gasLimit over 53 bits #3948
Conversation
0f192c5
to
334c039
Compare
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.
Hi there, thank you for submitting this PR!
Our team has discussed fixing this in a subsequent major release, but we greatly appreciate the work that you did!
Additionally, if you wouldn't mind updating the CHANGELOG.md
since we can't do it for you
Thank you again for your contributions!
@frankiebee @koraykoska moving the discussion to here: We previously discussed returning a hex string, but this PR uses an included method to format to a number string. Do we prefer a hex string over using existing util functions? |
ea9b760
to
1bcd54a
Compare
@spacesailor24 |
Thanks for updating it so quickly! |
1bcd54a
to
334c039
Compare
@spacesailor24 I see. However, many users are complaining about this issue. I hope this changes included in the release version ASAP. |
I think there are a number of other formatters that need this change as well. Notably As-is, I don't think this fixes #3912 for instance. Thanks for the change! This has been driving me crazy. |
@aslvrstn oof, thank you for bringing this to our attention, should've looked around for more instances of this bug |
@aslvrstn Thanks for review. |
The gas limit aggregated in the block might not be added up, but when called with Anyway, I only noticed because I actually tried installing from your branch and re-running the failed call, and it still seemed to fail, so unless I botched the install, I think at least one other location needs to be updated. Thanks for turning that patch around so quickly, btw! I would have been going insane otherwise. |
@aslvrstn https://github.com/ChainSafe/web3.js/blob/1.x/packages/web3-core-helpers/src/formatters.js#L314 Following captures are the result of call 'web3.eth.getBlock (5591908, true)' using modified formatter. (BSC Network) |
Is it fine, If I create a fork of web3 with this change and deploy new npm package called something like web3-bsc. I just need this modification for one of our projects that uses BSC. Another option is if you are planning to merge this PR in the next few days. Thanks! |
Commenting here as well, so this isn't lost: Waiting on @alstjd0921 to merge this, then we can merge this PR |
Pull Request Test Coverage Report for Build 731388338
💛 - Coveralls |
Along @tima-t 's request: how are people installing this as a temporary dependency and having the fix come in? I've been trying variations from https://stackoverflow.com/questions/17509669/how-to-install-an-npm-package-from-github-directly and yet it still seems to be pulling in old web3-core-helpers dependencies or something, because despite the code I see being updated, the code the browser gets is clearly the old hexToNumber version. I know this is largely unrelated, but it'd really help to have a clear short-term workaround, including pushing an early 3.x release, or allowing a web3-bsc module to be published. |
#3976 was merged so the 3.0.0 RC can be released |
Easy temporary fix:
|
@phpnikolov Wow thanks. This worked perfectly! |
@spacesailor24 can you create PR to fix web3 1.3.x too ? I can't modify node_modules to fix this . |
@hoangvnextdev Unfortunately we cannot apply this fix to the |
@spacesailor24 Help please, I have made this change to my node module but I am still getting this error. I think my direct changes in the module didn't reflect, please help @phpnikolov just to add the error is emitted from web3-core-helpers errors.js ( I also made the changes here) |
@nots29vv Hi i think when you reinstall node_modules your modify is change back to origin ? Because i use @phpnikolov solution is worked for me. But I change to using ethersjs more stable than web3 |
@hoangvnextdev that is right. moving to ethersjs would not be possible for me, as i am trying to implement gasless transactions using @opengsn and web3 is a dependency for the package. I really appreciate. |
using 3.0.0-rc.4 i can use this in BSC but is pretty cool to have this fix in main version |
Hi guys, any news on the fix? Which version should I use? |
I had to create a prebuild script for replace some strings, includes the path because it fails after build an run an electron app :/ |
Is it reported in |
As long as this solution works this is insane that this error still occurs. How this is not fixed yet? |
Pleaaaaase fix this error |
Have the same error execute |
Also for people who want to find a solution rn: #3936 (comment) Its solve my problem by extending new method. |
|
Same here but
this solve for now |
It will not be fixed, see #3789 (comment) |
Description
Fix outputTransactionFormatter to format gas limit hex string to decimal string.
There are a lot of transactions in the BSC network that have set gas limit by 9,223,372,036,854,775,807 and I think it is necessary to switch to string format for look up these transactions.
The links below are examples of such transactions.
0xb48fbbab4feee817b18efdbde134dba83ba47ea479ab85a2b3ff068bf7c8f5d8
0x02a3e52e32d1433f2d356ddf1408c3d9fb916c0a244f18e8a90ba742f45ae32a
0x65f46d95e70b1906694dbaaccaad12c2ffa9ae5c2a6513719837f50c9f97940a
Fixes #3936
Fixes #3912
Fixes #3745
Type of change