aurora-is-near / rainbow-bridge-client

Monorepo containing Aurora-maintained libraries for using the Rainbow Bridge
https://github.com/near/rainbow-bridge-client/tree/main/packages/client#readme
MIT License
25 stars 7 forks source link

Increase gas attached to `deploy_bridge_token` #76

Closed jakmeier closed 2 years ago

jakmeier commented 2 years ago

Deployment costs per byte of code are going to be increased by a factor of ~5 with this change to NEAR protocol: https://github.com/near/nearcore/pull/6397

Probably this will be included with protocol version 53, which would be released on testnet by March 23 and on mainnet by April 20.

To find everyone affected by this change, I listed all the indirect deployments from the past that would fail with the new cost, if all gas attachments stay the same. factory.bridge.near appeared as signer 112 times in that list. I didn't go through all of them but I think it's always due todeploy_bridge_token only having 60Tgas attached. (Example)

A contract with 222kB (current size of bridge_token.wasm) will see its gas cost increased by about 13Tgas.

Your current gas limit of 60Tgas, defined in deploy.ts, is probably just about okay with that. But if you want to be on the safe side, I would increase it. Extra gas is fully refunded anyway.

paouvrard commented 2 years ago

@jakmeier Thank you for the warning! Did a new deploy_bridge_token tx with same gas settings on testnet v53 doesn't appear to be any issue: https://explorer.testnet.near.org/transactions/AK2mQaLrhkpbkWtaJEPhE68jKJ71w8BGmtFqCCGe42Sd

jakmeier commented 2 years ago

Yes, looks good. Thanks for the update!