-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Scoped Execution GAS #2442
Comments
The problem could be solved with #2444 . Isn't it? |
Sender's GAS is spent for paying fees, it's written off before transaction execution and to me that's the scope it has --- for paying fees, if you don't want to pay fees just don't be a sender. So if contract doesn't want its GAS to be spent in some ways it just should be careful with its
I can only see these potential problems:
Essentially it's the question of the amount of processing needed to decide whether transaction should be approved to use contract's GAS in some ways or not. And this decision can be moved to contract's backend processing and completing notary payloads (hi, #1573), it can implement any kind of script parsing/checking as well as scoping checks before adding some missing signature that will make the transaction valid. |
@shargon that only makes it easier to estimate gss costs on complex invocations, by adding more gas (refuel) during the process (but also helps giving more GAS during execution, if necessary). Here, the issue is how to give the starting GAS, in order to begin the process. Like @ixje mentioned above, this is related to the issue of a contract providing GAS to user that is bound to some specific scope. For example, I give you gas and you use it to execute other contract, not mine... I feel this is not desired on practice. |
Summary or problem description
This change makes it easier for contracts to decide during
verify()
if they should authorize or not the spending of its assets. I believe that contracts are likely to authorize GAS spendings only if executions are limited to the scope of that contract itself, or contract group.Related to: neo-project/proposals#137
Do you have any solution you want to propose?
Update ApplicationEngine and include scope together with variables such as
GasLeft
and other GAS controlling systems. The gas taken fromsigners[0]
, akasender
, should respect the scope of this signature/verification (if global, then GAS is global; if limited, then GAS is limited).There can exist situations where one wants to have global GAS, while limiting signature into some specific contract (or calledByEntry). We can discuss if these cases are real problems on practice, or if some other behavior needs adjustments for this to work.
Neo Version
Where in the software does this update applies to?
The text was updated successfully, but these errors were encountered: