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
While executing a call, the interpreter forwards the minimum of the context gas, cgas, and the amount of gas the call requests to be forwarded, amount_of_gas_to_forward. This is reflected in the system register’s context gas value but not in the receipt created for the call. The receipt incorrectly uses amount_of_gas_to_forward which will show the call had more gas available to it than in practice if cgas is less than amount_of_gas_to_forward.
Figure 12.1: The receipt creation of the prepare_call function
An alternative Fuel implementation which returns the correct panic code cannot reach consensus or sync with the existing Fuel implementation as the block headers are different.
Recommendations
Short term, use forward_gas_amount for the receipt’s gas field.
Long term, perform additional testing of the gas accounting of call frames and the receipts created by them.
The text was updated successfully, but these errors were encountered:
Description
While executing a call, the interpreter forwards the minimum of the context gas, cgas, and the amount of gas the call requests to be forwarded, amount_of_gas_to_forward. This is reflected in the system register’s context gas value but not in the receipt created for the call. The receipt incorrectly uses amount_of_gas_to_forward which will show the call had more gas available to it than in practice if cgas is less than amount_of_gas_to_forward.
Figure 12.1: The receipt creation of the prepare_call function
Exploit Scenario
An alternative Fuel implementation which returns the correct panic code cannot reach consensus or sync with the existing Fuel implementation as the block headers are different.
Recommendations
Short term, use forward_gas_amount for the receipt’s gas field.
Long term, perform additional testing of the gas accounting of call frames and the receipts created by them.
The text was updated successfully, but these errors were encountered: