You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to charge gas in a way that's consistent across the board.
To do so, we should use one global gas_status per transaction, pass it down on every operation, charge according to the same gas table. Move already has such as struct, that contains not only the gas cost for all instructions, but also for various storage operations and etc.
Below are what we need to do:
First of all, we should have a gas_budget for every transaction, including transfer transactions. This will allow us to also be able to create a gas status using that budget, and also able to check gas balance up-front early. (this will change the wallet/REST API too, cc @arun-koshy@patrickkuo@oxade ) For a batch transaction, instead of having a gas_budget per single transaction, we should just have one budget at the top level. Add gas budget to TransactionData #1133
Next we construct a gas status upfront, pass it everywhere for gas metering. For each place we are charging, we use the constants from the gas schedule table. Consistent gas metering #1219
We need to keep track of the total storage cost (in Sui) for any object, so that when it's deleted, we give back that amount as rebate. When we are mutating an object, we should also give back rebate by deleting the old object, and re-charge the cost based on the new object. [Gas Metering] Add storage_rebate to Object and introduce gas price #1254
We would like to charge gas in a way that's consistent across the board.
To do so, we should use one global gas_status per transaction, pass it down on every operation, charge according to the same gas table. Move already has such as struct, that contains not only the gas cost for all instructions, but also for various storage operations and etc.
Below are what we need to do:
storage_rebate
toObject
and introduce gas price #1254storage_rebate
toObject
and introduce gas price #1254The text was updated successfully, but these errors were encountered: