Questions tagged [gas]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
76 views

Tracking gas consumption by an entrypoint in smartpy during tests

I want to check how much gas an entrypoint consumes when we perform a transaction when writing tests in smartpy. How can this be done? Smartpy documentation too doesn't have anything that can help.
Sanket Nighot's user avatar
4 votes
3 answers
169 views

What's wrong with my calculation of fees and burn here?

I am trying to calculate the cost of a transaction, post-hoc, from the response to calling the entrypoint. This is for the purposes of a testing tool I am building that I need accurate costs for. As ...
Grum's user avatar
  • 163
0 votes
0 answers
32 views

Is it possible to have an entrypoint call return the gas expended in Archetype mockup mode?

I am writing some basic tests and I want to confirm that the balances of various accounts are correct after an entrypoint is called. I would like to ensure fees have been properly accounted for so my ...
Grum's user avatar
  • 163
2 votes
1 answer
25 views

Do partitions reduce gas usage?

I have a ledger asset which is a big map. Each entry has a partition leading to another other asset, which in the worst case will have 20 entries in it associated with one entry in the ledger asset (I'...
Grum's user avatar
  • 163
-1 votes
1 answer
24 views

Is there any way to compute the transaction fee of transfering xtz in python?

I'm creating a python script in which I need to make a function to send the xtz from one address to another addresss before the transfer I want to compute the operation cost.Is there any way to ...
Shahbaz Ali's user avatar
1 vote
1 answer
86 views

Are contract views typechecked when only the main contract code is called?

I have been contemplating replacing off-chain views entirely with on-chain views in my contracts since the former leads to unnecessary work of having an otherwise redundant metadata big-map with a ...
Anshu Jalan's user avatar
1 vote
1 answer
206 views

How to calculate gas fee for transaction?

I want to calculate three gas fees (low, average, fast) for transactions in the Tezos blockchain,Is there any formula to calculate gas fees for every transaction? I want to do an operation on the ...
Taleb's user avatar
  • 177
1 vote
1 answer
64 views

Gas Exhausted error

I am trying to use pytezos to perform a transaction on Tezos testnet. I am receiving a 'Gas Exhausted' error although it is suppose to autofill. Python code: native_key = await Key.from_mnemonic(words,...
thotheolh's user avatar
  • 113
0 votes
1 answer
42 views

Transaction precedence, transaction priority, bake priority within a block - how is it decided?

What exactly decides the execution order of transactions within a block? I have read here that baking fees matter, but I am not sure how in particular. Transactions within past blocks don't seem to be ...
PEC's user avatar
  • 139
0 votes
2 answers
215 views

When does a contract get gas locked?

Right now I'm iterating over a map (not a big_map) that would have at most 10,000 entries. I know big_map is recommended for a large number of entries, however, I'm testing the limitations of both ...
JJJ's user avatar
  • 557
1 vote
0 answers
64 views

Regarding Tezos Fees estimation

Just wanted to understand where these constants are coming from ? https://github.com/ecadlabs/taquito/blob/master/packages/taquito/src/constants.ts#L1 Also recently the gas limit has been limit to ...
user2103799's user avatar
1 vote
1 answer
85 views

Does Tezos largely adopt the gas model from Ethereum?

I'm reading through the Position Paper. Specifically in section 1.3, which covers how Ethereum economically de-incentivizes actors from submitting theoretically unbounded computations to the ...
Kenneth Worden's user avatar
0 votes
1 answer
31 views

Can a FAILWITH error be caused by improper gas_limit or storage_limit?

Sanity check question: Can a FAILWITH error be caused by improper (too low) values of gas_limit or storage_limit? I'm guessing the answer is "no", but I'm debugging and stranger things have ...
emchristiansen's user avatar
1 vote
1 answer
48 views

Can't see 35% gas optimization on protocol 009

I looked around and could not see any example of known smart contract (FA1.2, FA2, etc) that is now using less gas then before Florence protocol.
Babell's user avatar
  • 500
0 votes
1 answer
164 views

Is Tezos blockchain vulnerable to "frontrunning"?

I read an interesting piece about frontrunning in Ethereum. In essense, the problem is this: In general, frontrunning is the act of getting a transaction first in line in the execution queue, right ...
luchonacho's user avatar
2 votes
1 answer
169 views

gas_exhausted.operation when sending max balance

Environment: Delphinet using https://delphinet.smartpy.io. I'm connecting to it through the RPC via the java/kotlin library OkHttp. Steps to reproduce: Trying to send my max XTZ balance to another ...
MalenaLBC's user avatar
2 votes
2 answers
105 views

Michelson gas cost optimizations: any techniques, patterns and rules of thumb

Gas cost is an important topic in smart contract development. We want to maintain the costs as low as possible to allow for more operations in a block. There is a handy gas consumption reference, but ...
MCH's user avatar
  • 680
0 votes
1 answer
54 views

Translating gas and storage units to XTZ

I'm interested in translating the gas and storage costs I get in response from the node after an operation into XTZ prices. Where could I find this information online?
itamar reif's user avatar
7 votes
1 answer
132 views

Updated fee constants in Delphi?

I am using the following formula and associated constants to calculate fees: https://tezos.gitlab.io/protocols/003_PsddFKi3.html#more-details-on-fees-and-cost-model Also referenced here: https://tezos....
ewerx's user avatar
  • 173
0 votes
2 answers
90 views

How can I save the gas cost of operations when running contracts in sandbox pytest?

I am testing smart contracts in sandbox mode using python scripts. I want to be able to store how much an operation cost. So for example when I get the output of a contract origination after baking a ...
Darius's user avatar
  • 649
0 votes
1 answer
25 views

Increase gas_limit for tz1 to tz1 transfers

Can 15400 KT gas limit be used as upper limit also for pkh2pkh txs (instead of 10600) or there's risk to incur in some kind of error? For pkh2pkh I mean a transfer from tz1 to tz1 address. For pkh2kt ...
Rocco Musolino's user avatar
3 votes
1 answer
179 views

Gas costs types in Michelson

Gas cost is an important topic in tezos and I would like to understand better the different types of it that occur in michelson how they are calculated Could someone offer me a pointer ?
Ezy's user avatar
  • 6,044
3 votes
2 answers
3k views

How to calculate price of gas

In Ethereum one can get the gas price using web3.eth.gasPrice. In Tezos, does any RPC provide the gas price, or is there a formula to calculate the gas price?
Tkk's user avatar
  • 53
6 votes
1 answer
195 views

Relative gas cost of map vs bigmap

Does there exist a realistic performance benchmark between map/bigmap? I am looking for a tipping point where it would make more sense to use a big map for gas cost optimization
Ezy's user avatar
  • 6,044
4 votes
0 answers
74 views

Error too big to serialize within the provided gas bounds. Increasing the gas bounds does not help

I am developing a fairly large set of contracts that interact with each other. I wanted to reorganize and optimized the code and I've added lots of PUSH string "..."; FAILWITH to help me debug. I am ...
MCH's user avatar
  • 680
3 votes
0 answers
34 views

Contract : opcodes FAILWITH / FAIL - gas usage

If a contract gets to the point where it fails. What is the process in terms of gas usage? Storage gas (new storage until failure) : reverted Gas usage (used until failure) : reverted Gas fee : paid ...
ConsentDevelopment's user avatar
3 votes
1 answer
42 views

Michelson contract files - spaces, new lines and comments

I wanted to check that when a Michelson contract file is created. Do file spaces, new lines and comments increase the gas cost when deployed?
ConsentDevelopment's user avatar
5 votes
1 answer
292 views

Gas consumption in a chain of internal transfers

I am trying to perform a chain of contract calls with internal transfers. I think my current contracts are very simple, but I run out of gas after only 4 internal transfers: A script or one of its ...
user_184's user avatar
  • 347
9 votes
1 answer
2k views

What is gas on the Tezos network?

This question is related to the fact that I have no understanding for what reason need to increase the gas limit, what will the increase affect and why it is impossible to leave the limit as it is? I ...
KD26's user avatar
  • 101
9 votes
2 answers
693 views

What is the difference between fee and gaslimit?

With Ethereum, max fee is gas multiplied by the gas price. But with Tezos, when i construct an operation, the fee is personally set, why is it not computed by gas_limit?
purplecity's user avatar
7 votes
2 answers
618 views

Fees in proto 003?

Fees have been updated from proto 002 to proto 003. Is there a reference document available somewhere that is indicating fee information for tezos proto 003 ?
Ezy's user avatar
  • 6,044
19 votes
3 answers
790 views

How to calculate gas and storage for an operation?

In protocol 003_PsddFKi3, how can the gas and storage usage be calculated without doing a dry-run in a node?
Klassare's user avatar
  • 1,345
8 votes
1 answer
168 views

How do baking node choose the transactions from the mempool

Could someone describe how the full node chooses transactions from the mempool that make it into a block. I suppose there must be some logic that makes a compromise between fees and gas cost but it ...
Ezy's user avatar
  • 6,044