-
Notifications
You must be signed in to change notification settings - Fork 81
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: fix exceeded the prepaid gas when upgrade remote contract #197
base: main
Are you sure you want to change the base?
Conversation
When This is the failed tx when |
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.
LGTM, I don't see this negatively impacting other DAOs
But I believe you'll need @ilblackdragon approval given that he's the main contributor to sputnik atm. |
@ilblackdragon can you pls review this MR? |
I'm having trouble opening the execution plan for this transaction (https://testnet.nearblocks.io/txns/AR5j8Dz3Ts4ZDKXr1Zd5Eq7VGeS23AmWDtpjhih2wq2m#execution) Mostly question is why this is needed, because this change may be hiding another issue. LEFTOVER parameters are to cover costs of calling promise_function_call itself and returning Promise and it should be not be taking this much gas. It shouldn't even be 15Tg in the first place. There is also new API in 4.0 SDK via near/NEPs#264 that allows to not have this at all, at it calculates leftover gas after function already completed: near/near-sdk-rs#740 If we are updating this, let's switch to this API given sputnikdao2 is already on 4.0 sdk. |
|
May be there are some trouble for FE in query execution plan: |
We need to migrate sputnikdao2 to the latest sdk as it's not even on 4.0 it's currently on 4.0.0-pre.4 which is not even defined as a release version on github: But strangely there are rust docs on it: Either way, I'm not sure near/NEPs#264 was even introduced in 4.0.0-pre.5 as it looks like it was pretty of the changes for 4.0.0 stable release here: https://github.com/near/near-sdk-rs/releases/tag/4.0.0 What does this mean? Well to migrate sputnikdao2 to >= 4.0.0 a few things need to happen:
The above is covered in: Overall, however, my perception of the task is that it seems like a larger effort. @ilblackdragon do you have concerns with increasing Also @fospring to @ilblackdragon point, I do believe you need to re-evaluate your implementation as it should not take 15Tg in the first place. Can you share pseudo code of your implementation or your execution plan in detail? |
@agileurbanite @ilblackdragon My executions flows:
git clone [email protected]:near-daos/sputnik-dao-contract.git
cargo build --release -p sputnikdao2 --target wasm32-unknown-unknown
I think I have tested that 15T gas LEFTOVER is not enough for action of |
@agileurbanite @ilblackdragon, Thank you for your reminder. I have added a new transaction test that when pls check again |
@agileurbanite @ilblackdragon can we hotfix on this issue? https://explorer.testnet.near.org/transactions/3xRbdcbdQnC1jSo2arzzQ6bJDNs7PPdrLARmvYFbRL68 |
No description provided.