jack.rocco
2 months ago  Karma: 40
What exactly limits a smart contract's execution time on Ethereum?

What exactly limits a smart contract's execution time on Ethereum?

en
#ethereum
jack.rocco
2 months ago  Karma: 40
What exactly limits a smart contract's execution time on Ethereum?

What exactly limits a smart contract's execution time on Ethereum?

en
#ethereum

3 ANSWERS
lucianoagramonte
2 months ago Karma: 60

To protect the network from DDoS attacks, Ethereum introduced the concept of gas. In short, each computation has a cost attached to it. For each transaction, the sender is required to specify the maximum amount of gas he is willing to pay. If the execution is not finished but the gas limit is reached, the smart contract is automatically halted. This is what limits a smart contract's execution time on Ethereum.

To protect the network from DDoS attacks, Ethereum introduced the concept of gas. In short, each computation has a cost attached to it. For each transaction, the sender is required to specify the maximum amount of gas he is willing to pay. If the execution is not finished but the gas limit is reached, the smart contract is automatically halted. This is what limits a smart contract's execution time on Ethereum.

qantumtbfmir
2 months ago Karma: 278

There's also a gas limit attached to each block. It keeps the network decentralized be making sure that the size of each block is limited.

There's also a gas limit attached to each block. It keeps the network decentralized be making sure that the size of each block is limited.

felzix
2 months ago Karma: 58

Once a miner solves a block, they only have so much time before someone else also solves that block. Since it takes time to execute transactions, miners risk losing the mining reward if they process transactions. So the price of transactions has to be high enough that miners bother to process transactions instead of just grabbing the block reward as fast as possible.

Also blocks have a maximum transaction size by having a gas limit.

Once a miner solves a block, they only have so much time before someone else also solves that block. Since it takes time to execute transactions, miners risk losing the mining reward if they process transactions. So the price of transactions has to be high enough that miners bother to process transactions instead of just grabbing the block reward as fast as possible.

Also blocks have a maximum transaction size by having a gas limit.

Earn tokens by posting and answering questions about blockchain!
Karma to eth
YOUR ANSWER