Leave a Reply

To leave a comment, please Login or Register

Comments (1)

Mansoor Ahmed Selected

Mansoor Ahmed

7 months ago
Every operation on the Ethereum blockchain is performed by following the bytecode or opcodes. Each opcode costs a certain amount of gas. The different gas requirements may be found on page 26 in the Ethereum Yellow paper (screenshots below): https://ethereum.github.io/yellowpaper/paper.pdf

The maximum amount of gas available has an upper ceiling of currently around 6 million additionally. The execution is limited by the maximum amount of gas a user can provide and a miner would accept in other words. This definitely leads to multiple problems software developers face.
1. We might have only a few users during the development of the smart contract. Then in production, when things start to “scale” the contract suddenly runs into out-of-gas exceptions.
2. Loops are the biggest trap. We should never use loops if we don’t know how much gas it consumes at all times.