-
Notifications
You must be signed in to change notification settings - Fork 0
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: mumbai failing to due gas limit issues #99
Conversation
@joewagner question on the package version bumps. since everything uses the i know the CLI always needs a bump to incorporate SDK changes. but something like node-helpers only uses the SDK as a dev dep. i figured it's ideal to keep things in sync but wanted to double check since node-helpers was previously using 5.0.0 whereas the CLI/local were using 5.1.0. wasnt sure if that was intentional or not. |
Not necessarily. The basic rule is, if you want a new version of a package to be published on npm you will need to update the version for that package. Here are two examples that demonstrate some more complicated scenarios:
Nuances of these two examples:
The CLI does not always need a bump, but if you want to publish a new version of the CLI (because of a bug fix, or added feature) you do need to bump the version. As an example of a time bumping a version would not make sense, imagine there is a bug in the sdk's implementation of It's all potentially a little complicated, does that answer your question? |
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.
@dtbuchholz I put some specifics on my thoughts inline. Happy chat in voice on this, it's potentially a bit confusing (and open to opinion).
This fixes an issue where mumbai txs were always failing for both creates and writes. It bumps the gas limit up by 20%, affecting the registry create, write, transfer, and controller set/lock methods. You can see a test create and write tx here, where the gas limit leaves about 20% of extra room: https://mumbai.polygonscan.com/tx/0xd36a73256b38b866ebda65dff619174145768f35a2cb179f2ebc0f3832344bbc, https://mumbai.polygonscan.com/tx/0x236fa88bb9034629f9f4ea8e23a28ddd32bc6f13bb11ff1c602051e4689adf92
64d63fd
to
08b7aa2
Compare
@joewagner ah yes, that all makes sense. thanks for the explainers. okay, i've reverted the version & dep bumps for local/node-helpers; only the SDK and CLI have been changed there. |
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.
💪
Summary
This fixes an issue where Mumbai txs were always failing for both creates and writes. It bumps the gas limit up by 20% for all Polygon chains. The CLI package has been updated with a patch bump to incorporate the new SDK version's patch. Also, small package.json updates were made for GH repo links in all packages. Closes #98.
Details
It affects all state altering methods. This includes
create
andmutate
methods for both single and batch statements, setting/locking controllers, and transfers.How it was tested
You can see a test create and write tx here, where the gas limit leaves about 20% of extra room:
Prior to this, it'd fail with a 99% gas usage, like here.
The controller and transfer methods don't necessarily need this logic and pass without needing to introduce the gas limit bump. These are passing transactions from the existing logic, before introducing the 20% bump:
However, you can see the transfer was at 99%, and controller was at 87% of the gas limit. Thus, it makes sense to also implement the gas limit bump for them as a margin of safety. Here are changes with the 20% bump included:
Checklist: