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

Gas allowance for sys_fee and net_fee (fees paid by somebody else) #1104

Closed
lock9 opened this issue Sep 19, 2019 · 5 comments
Closed

Gas allowance for sys_fee and net_fee (fees paid by somebody else) #1104

lock9 opened this issue Sep 19, 2019 · 5 comments
Labels
consensus Module - Changes that affect the consensus protocol or internal verification logic discussion Initial issue state - proposed but not yet accepted feature Type: Large changes or new features ledger Module - The ledger is our 'database', this is used to tag changes about how we store information

Comments

@lock9
Copy link
Contributor

lock9 commented Sep 19, 2019

Summary
We need a way to make transactions 'free' again. The problem is that new users can't join the network without going through an exchange. We didn't have this problem with neo 2 because we had free tx and in other chains, you can either mine or have someone else to pay for the fee.

Do you have any solution you want to propose?
Contract owners should be able to pay for user else fee, using some kind of allowance mechanism.
This allowance should allow a smart contract owner to pay for the sys_fee and net_fee when some pre-authorized user is invoking his contract.
Something like IncreaseAllowance(owner, spender, contractHash, amount)
The ideal would be having 3 types of allowances (I think that the third one may not be possible):
FullAllowance(owner, spender) (any smart contract)
PartialAllowance(owner, spender, contractHash) (only one particular smart contract)
RestrictedAllowance(owner, spender, contractHash, operation) (only one specific method from SC ABI)

(Can we reuse the witness scope concept to solve this?)

Where in the software does this update applies to?

  • Consensus
  • Ledger
@lock9 lock9 added the discussion Initial issue state - proposed but not yet accepted label Sep 19, 2019
@lock9 lock9 changed the title Gas allowance for sys_fee and net_fee Gas allowance for sys_fee and net_fee (fees paid by somebody else) Sep 19, 2019
@lock9 lock9 added consensus Module - Changes that affect the consensus protocol or internal verification logic ledger Module - The ledger is our 'database', this is used to tag changes about how we store information feature Type: Large changes or new features labels Sep 20, 2019
@igormcoelho
Copy link
Contributor

igormcoelho commented Sep 26, 2019

I would love this feature, free tx is a fundamental feature for broader acceptance and applications... but I don't think it is feasible anymore in this format @lock9
@canesin had raised several critical issues on the matter, that are still holding up... one of these is that, even if contracts manage to pay tx for clients, this basic verification would have a cost (who would pay for that, if that fails?). We could manage to reduce risks and costs (see backward jump proposal), but still, requiring Storage access would always incur in non-zero costs (possibly not low). From the contract perspective, it's also hard to give fee to customers, because these customers could simply get this fee to have an opportunity to execute third-party contracts... how could the contract know which fees are actually being useful to the platform? How to manage contract costs just to setup customer free gas?

I think a much better direction involves granting this as a Consensus Node support, on Neo governance. This strategy brings zero cost to users, zero cost to contracts, only the workforce of CN and user voting with good parameters will already solve this for us in a smooth way.
(See NeoResearch report on Governance and novel consensus)

Finally, if proposal #1115 is accepted (and I hope), no contract will ever pay network and system fees, so this proposal will be definitely doomed (let's go for the governance direction)

@lock9
Copy link
Contributor Author

lock9 commented Sep 26, 2019

(who would pay for that, if that fails?)

I think this is pre-paid by the owner. What do you mean the transaction fails? It will always be charged first, the result won't matter. If there is no allowance and no fee, the transaction won't be propagated.

@igormcoelho in your proposal, who pays the fees?

@igormcoelho
Copy link
Contributor

igormcoelho commented Sep 27, 2019

In the proposal #1115 only (verification) users will pay for fees, not deployed contracts.

This could work in conjunction with a governance proposal we are making (together with new Consensus algorithm),which allows nodes to sponsor specific contracts. This doesnt incur (allowance register) costs for any of the parts, and allowance would be much more strict than just gas fee (other contracts would be blocked from Entry invocation, effectively making sponsorship allowance work as expected)

@lock9
Copy link
Contributor Author

lock9 commented Sep 30, 2019

@igormcoelho what kind of node will pay for the fee? I didn't understand it yet. For that to work, the node should participate actively in the network?
Is there a draft of the proposal?

@igormcoelho
Copy link
Contributor

@lock9 please see: #1147

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus Module - Changes that affect the consensus protocol or internal verification logic discussion Initial issue state - proposed but not yet accepted feature Type: Large changes or new features ledger Module - The ledger is our 'database', this is used to tag changes about how we store information
Projects
None yet
Development

No branches or pull requests

3 participants