Page MenuHomePhabricator

[WIP] Add fee for excessive utxo creation.
AbandonedPublic

Authored by schancel on Jan 16 2018, 00:43.

Details

Reviewers
deadalnix
sickpig
Group Reviewers
Restricted Project
Maniphest Tasks
T300: Per UTXO Billing
Summary

Depends on D962

Test Plan

Run functional and unit tests

Diff Detail

Repository
rABC Bitcoin ABC
Branch
utxos
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2094
Build 2334: Bitcoin ABC Buildbot (legacy)
Build 2333: arc lint + arc unit

Event Timeline

I don't think this approach makes any sense. We want to do as follow:
1/ Define the priority based on utxo creation, size and age.
2/ Consider low priority transaction as free.
3/ When mempool is full, start ejecting low priority transactions.

Adding yet a new place where fee are handled is only making the whole situation more complex and convoluted.

I agree with what you've said. We'll need to do more shuffling to clean this up.

deadalnix requested changes to this revision.Feb 28 2018, 15:04
deadalnix added inline comments.
src/primitives/transaction.cpp
113 ↗(On Diff #2532)

Looks like you need a ssize_t .

src/validation.cpp
791 ↗(On Diff #2532)

I think we should count age as

sum(coinage for all inputs) / sum(amount for all inputs)
810 ↗(On Diff #2532)

I don't think the -1 makes any sense.

This revision now requires changes to proceed.Feb 28 2018, 15:04

Remove extra complexity and rebase

src/primitives/transaction.cpp
113 ↗(On Diff #3175)

Tried this as a ssize_t but it was ambiguous under the current Amount * operators. Can add one for ssize_t if necessary, but it may overlap with other things on some platforms since it's a typedef.

I am considering dropping the minRelayFee some, and adding a base UTXO fee. So that for a normal transaction the minimum would be the same, but for ones with lots of outputs it would cost something extra.

I would like feedback on that idea.

Rebase and add in a small UTXO fee