-
Notifications
You must be signed in to change notification settings - Fork 618
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
New gas cost for zero balance accounts #8427
Comments
Progress update: Listing all actions for all accounts in shard 1 took 4h, which seemed reasonable, To optimize this, there are several ideas:
I will work on some of these optimizations but still hope that the running process will finish faster than my optimizations are ready. |
I had to restart and run with improved code, as the old version would have never pushed through shard 2 and 4. |
I miscounted my progress estimate, I thought there are only 300M receipts because there are that many transactions. Don't know how many receipts per average there are per tx, but I would assume less than 2? FT transfers are just one receipt, all of Sweat's It's now sitting at 421M receipts processed and still going up at ~12M receipts per hour. Can't be much longer now... Edit 1: [2023-01-26T19:49:21Z] 485M and counting |
It finally finished after processing 681400000 receipts.
There are 34 out of 24213 accounts that have (ever) created an account from a function call. Here is the full list:
|
@jakmeier thanks for the information! We should definitely check the ones with high usage such as |
I've looked at single receipts of some of the listed accounts and so far I couldn't find any instances where increasing the gas cost by 5.8 Tgas would cause any problems. For example Sadly, I noticed a problem in my optimized code which caused only accounts < The good news: A fixed script has been running all weekend. And I also extended the output with some trickery around refund receipts which will give us the gas amount for each account of how much we could increase the CreateAction cost without breakage. |
I have the full data now. 7 accounts more were found after fixing the bug. And I now also have the minimum refund for each contract after they created an account. See the large table below. Click me to expand full table
Three contracts have seen traffic in the past that would fail with the planned cost increase of 6Tgas.
* The registrar account @bowenwang1996 If we increase the costs as planned to 6 Tgas per account creation, it can potentially break some existing code calling into near::create_account. If we set the cost to 4 Tgas instead, it will be fine for sure. Also, I think 6Tgas would be okay if we make a small adjustment to the code in I don't have the full list of accounts that could be affected, only the 10 worst receipts. nearcon.keypom.near and several instances of linkdrop (e.g. linkdrop.theoutsiders.near)) are the only confirmed accounts to break in that list. Similar patterns could be used in other contracts. It would take more coding work and more time to find all of them. Analysis of a breaking call to
|
Thanks @jakmeier for the detailed analysis
The code can be found in this repository
Is 100Tgas modifiable? We have the feature where we would split unused gas evenly to each cross contract call, so I wonder whether it could be fixed that way. |
@bowen Not linkdrop, I need the registrat account :) 100Tgas can be modified yes,it's set off-chain |
Sorry I am confused. I think linkdrop is the contract that is deployed on |
Oh, really? I didn't know / expect that. Sorry then I got confused, In that case, I think we could lower Or better, as you suggested, make use of the new-ish function_call_weight. I think allocating all of the unused gas to the function call works best here (sertting gas=0). At least that would make the most sense to me. But I suppose the maintainers of that contract should decide. @bowenwang1996 I think we have a clear answer: Only the linkdrop account needs an update, and it shouldn't be a difficult change. Do you need anything more from my side? |
We are good for now. Thanks for the help! |
List account names with contracts deployed and additional information about the contracts. See the state-viewer README for docs and examples. This has been used to produce reports in #8427
List account names with contracts deployed and additional information about the contracts. See the state-viewer README for docs and examples. This has been used to produce reports in near#8427
List account names with contracts deployed and additional information about the contracts. See the state-viewer README for docs and examples. This has been used to produce reports in near#8427
To support zero balance account (near/NEPs#448) we need to check the effect of increasing gas costs for account creation on existing contracts.
The rough idea is that we first list all contracts that have used account creation in the past and then we check which of those would have failed with the new cost.
The text was updated successfully, but these errors were encountered: