Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend contract interface to inform block generator contract pays for gas #1603

Closed
miloszm opened this issue Mar 27, 2024 · 0 comments
Closed
Assignees
Labels
module:rusk Issues related to rusk module type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc)

Comments

@miloszm
Copy link
Contributor

miloszm commented Mar 27, 2024

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.

@miloszm miloszm added area:block-generation type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc) labels Mar 27, 2024
@miloszm miloszm self-assigned this Mar 27, 2024
@HDauven HDauven added module:rusk Issues related to rusk module and removed area:block-generation labels Apr 8, 2024
@HDauven HDauven modified the milestones: Economic Protocol, Mainnet Apr 10, 2024
@miloszm miloszm closed this as completed Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:rusk Issues related to rusk module type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc)
Projects
None yet
Development

No branches or pull requests

2 participants