-
Notifications
You must be signed in to change notification settings - Fork 338
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
Audit charging of per-kilobyte fees #216
Comments
It makes more sense to charge size-based fees on an operation-wide basis, i.e. you serialize the operation, see how big it is, and then charge based on that. Which would give a single size-based fee for all operations, instead of placing size-based fees on each operation. This makes more sense, as size fees are not meant to raise revenue, merely to protect network resources. Therefore size-based fees should be the same for all operation types -- there is no reason to allow them to be settable for each operation individually. Moreover, as pointed out in the OP, setting size-based fees for each operation individually requires careful auditing to be sure that every operation of potentially unbounded size includes a size-based fee. Having unified size-fee logic would ensure that if an operation with a large serialization occurred, an appropriate fee would always be charged. |
The transaction signatures can potentially grow very large, e.g. if you create a large number of multisig accounts with maximum fan-out and use a |
Some |
This issue was moved to bitshares/bitshares-core#59 |
Any operation with potentially unbounded size needs to charge a size fee. Determining whether an operation is variable-size is non-trivial. An operation is variable size if it contains a
vector
,flat_set
or other potentially variable-size element.Note that this containment may be through any number of intermediate
struct
s. For example, any operation which contains anauthority
has potentially unbounded size.We should be able to audit this in a semi-automatic way with logic similar to
js_operation_serializer
which traverses all operations, and noting any variable-size types found (in any number of sub-structures), allowing us to flag each operation as variable-sized (or not). We will still have to manually specify whether any base type is variable-size or not.The text was updated successfully, but these errors were encountered: