-
Notifications
You must be signed in to change notification settings - Fork 46
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
Collect fixed fees for certain transactions #232
Comments
SHould work with batch. eg. if I send a batch with 3 setName tx, it will deduct 3 times the cost of registering a setName (same as if I submitted those messages as three independent transactions). This just means that the fee deduction should happen "downstream" from the batch decorator/middleware |
@alpe @ethanfrey As I'm looking into this - it does not make much sense to use gconf directly for these values, as since we need to look them up from the client - it would make more sense to use initializer pattern and load all that into a bucket on startup. Let me know if this makes sense |
Also, whenever we need to extend this with lookups by message contents for dynamic fees - that'd be definitely stored in a bucket and communicated via transactions and not genesis. |
Please read update at end....
The current
fee
module is designed to request a user-specified fee that can be used to control priority among multiple competing transactions. There is the idea of a global minimum fee, but this just works as a spam filter for transactions, rather than anything fine-grained to charge for specific transactions.One essential part of the economics at launch is to charge for name registration, and especially for name-space registration. Eventually there should be a more dynamic fee definition, but for start, we can have a fixed fee for certain transactions that is defined in the genesis file. (This means it is stored in the kv store, and we can theoretically add a transaction to modify it later).
Please not answers were updated on 22.1.2019
Please use gconf style for configuring fees in genesis file. The message path can be used to lookup the fees. If a message is not configured, then this implies no product fees (no panic)
Answers:
fee
section (failing iffees
is smaller than required tx cost)Where do we store these fees? Is this defined on a per-package basis, or is there a global lookup table, separate module, that store all fee definitions.?
This should provide a basic product fee implementation we can start using in the client, but this will be interated upon in the future, so please code for extensibility.
update
After discussion in #323 I have decided to break this into three tasks:
Note that this architecture makes the generic decorator just one way of adding fees, and we could instead use custom code in a handler to do deeper introspection of a type and use custom logic to determine required fee.
The text was updated successfully, but these errors were encountered: