We need a way of calculating the 'relative price' of each instruction, and accumulating the total execution cost as a given program runs. We also need an option to specify a 'gas limit', which is the maximum execution cost we're allowed to expend on a given program before we stop. If the 'gas limit' is reached (or exceeded) the vm should stop function execution immediately.
We need a way of calculating the 'relative price' of each instruction, and accumulating the total execution cost as a given program runs. We also need an option to specify a 'gas limit', which is the maximum execution cost we're allowed to expend on a given program before we stop. If the 'gas limit' is reached (or exceeded) the vm should stop function execution immediately.