Extend contract interface to inform block generator contract pays for gas #1603
Labels
module:rusk
Issues related to rusk module
type:enhancement
Issues concerning code or feature improvement (performance, refactoring, etc)
Summary
Currently, in order for a contract to pay for gas to execute a given transaction, we need to ask contract for a funding note, and this solution has been implemented in a POC issue #1503. The POC solution requires additional call to a contract. It would be much more efficient to have a mechanism allowing contract to inform the block generator of the gas price and gas limit the contract is willing to pay for transaction execution. Block generator will then act accordingly.
Possible solution design or implementation
An efficient way of passing data from contract to block generator needs to be implemented. This could be a contract call, or preferably, a direct contract data access mechanism.
Additional context
Related issue: #1503
This issue may require new host functions to be available to contracts, providing data about low, average and high gas prices at a given time. This is covered by issue #1604.
This issue will also require changes in PieCrust - TBD.
The text was updated successfully, but these errors were encountered: