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
The gas storage is consumed both by the size of the parameters passed to the invoked SC function but also when using store and load
Given the function below
Function GasTest(someString: String) Uint64
1 STORE("test", someString)
2RETURN0EndFunction
The following call GasTest("hello") will consume 10 gas Storage. 5 due to the tx parameter and 5 due to the store
If I understand the need to limit the tx size, and that it is used to calculate the transaction fee, I suggest implementing an independent gas for the tx parameter simply called txGas
This will have several benefits:
Fully utilize the gas storage maximum limit of 20k
every existing project that requires storing large data inside the SC will benefit from it without having to change anything
UPDATE_SC_CODE will be able to update up to 20kB smart contract.
I will come with a PR soon but wanted to share the idea first.
Let me know
The text was updated successfully, but these errors were encountered:
The gas storage is consumed both by the size of the parameters passed to the invoked SC function but also when using
store
andload
Given the function below
The following call
GasTest("hello")
will consume 10 gas Storage. 5 due to the tx parameter and 5 due to thestore
If I understand the need to limit the tx size, and that it is used to calculate the transaction fee, I suggest implementing an independent gas for the tx parameter simply called
txGas
This will have several benefits:
I will come with a PR soon but wanted to share the idea first.
Let me know
The text was updated successfully, but these errors were encountered: