Author

Topic: [PULL] More configurable fee schedule and clearer fees (Read 1520 times)

hero member
Activity: 588
Merit: 500
Nice, but you should remove the word 'miners' and replace it with something more understandable, like 'transaction processors.'
hero member
Activity: 755
Merit: 515
Just to clarify here is how the new system looks/works:
Note that no changes have been made to the default/required fees, only to how the user is presented with fees and how they can mange them.

First of all, a new pane in the Options dialog has been added:

I think those are pretty clear Smiley.

Also, the transaction fee error messages have been updated to be much more clear, as you can see below:
Additionally setautocommit has been added for RPC which is used as follows:
Code:
matt@Desktop666:~/Downloads/bitcoin/git/bitcoin/src$ ./bitcoin -rpcuser=user -rpcpassword=pass setautocommit false
true
matt@Desktop666:~/Downloads/bitcoin/git/bitcoin/src$ ./bitcoin -rpcuser=user -rpcpassword=pass sendtoaddress miGuMc6qtVEKS6Pf1jKddaa81DeHjMzkpB 10
error: {"code":-4,"message":"Based on your fee settings, this transaction requires a fee of at least 200.00, putting its total over your balance. You can change those settings in the Options dialog, or via the settxfee RPC command."}
matt@Desktop666:~/Downloads/bitcoin/git/bitcoin/src$ ./bitcoin -rpcuser=user -rpcpassword=pass setbasetxfee 0
true
matt@Desktop666:~/Downloads/bitcoin/git/bitcoin/src$ ./bitcoin -rpcuser=user -rpcpassword=pass setoverridesanetxfee true
1
matt@Desktop666:~/Downloads/bitcoin/git/bitcoin/src$ ./bitcoin -rpcuser=user -rpcpassword=pass sendtoaddress miGuMc6qtVEKS6Pf1jKddaa81DeHjMzkpB 10
49154359bab3a5530ea78093870cbca6aa18b1df766acbd126dc8aa84c342523
matt@Desktop666:~/Downloads/bitcoin/git/bitcoin/src$ ./bitcoin -rpcuser=user -rpcpassword=pass gettransaction 49154359bab3a5530ea78093870cbca6aa18b1df766acbd126dc8aa84c342523
{
    "amount" : -10.00000000,
    "fee" : 0.00000000,
    "confirmations" : 0,
    "txid" : "49154359bab3a5530ea78093870cbca6aa18b1df766acbd126dc8aa84c342523",
    "time" : 0,
    "details" : [
        {
            "account" : "",
            "address" : "miGuMc6qtVEKS6Pf1jKddaa81DeHjMzkpB",
            "category" : "send",
            "amount" : -10.00000000,
            "fee" : 0.00000000
        }
    ]
}
matt@Desktop666:~/Downloads/bitcoin/git/bitcoin/src$ ./bitcoin -rpcuser=user -rpcpassword=pass rejecttransaction 49154359bab3a5530ea78093870cbca6aa18b1df766acbd126dc8aa84c342523
true
matt@Desktop666:~/Downloads/bitcoin/git/bitcoin/src$ ./bitcoin -rpcuser=user -rpcpassword=pass gettransaction 49154359bab3a5530ea78093870cbca6aa18b1df766acbd126dc8aa84c342523
error: {"code":-5,"message":"Invalid or non-wallet transaction id"}
matt@Desktop666:~/Downloads/bitcoin/git/bitcoin/src$ ./bitcoin -rpcuser=user -rpcpassword=pass sendtoaddress miGuMc6qtVEKS6Pf1jKddaa81DeHjMzkpB 10
5247ecf60e0991dd9d85588607e0db7b6a30e22f9139c6ee7be48152a6f78d6f
matt@Desktop666:~/Downloads/bitcoin/git/bitcoin/src$ ./bitcoin -rpcuser=user -rpcpassword=pass gettransaction 5247ecf60e0991dd9d85588607e0db7b6a30e22f9139c6ee7be48152a6f78d6f
{
    "amount" : -10.00000000,
    "fee" : 0.00000000,
    "confirmations" : 0,
    "txid" : "5247ecf60e0991dd9d85588607e0db7b6a30e22f9139c6ee7be48152a6f78d6f",
    "time" : 0,
    "details" : [
        {
            "account" : "",
            "address" : "miGuMc6qtVEKS6Pf1jKddaa81DeHjMzkpB",
            "category" : "send",
            "amount" : -10.00000000,
            "fee" : 0.00000000
        }
    ]
}
matt@Desktop666:~/Downloads/bitcoin/git/bitcoin/src$ ./bitcoin -rpcuser=user -rpcpassword=pass committransaction 5247ecf60e0991dd9d85588607e0db7b6a30e22f9139c6ee7be48152a6f78d6f
5247ecf60e0991dd9d85588607e0db7b6a30e22f9139c6ee7be48152a6f78d6f
matt@Desktop666:~/Downloads/bitcoin/git/bitcoin/src$ ./bitcoin -rpcuser=user -rpcpassword=pass gettransaction 5247ecf60e0991dd9d85588607e0db7b6a30e22f9139c6ee7be48152a6f78d6f
{
    "amount" : -10.00000000,
    "fee" : 0.00000000,
    "confirmations" : 0,
    "txid" : "5247ecf60e0991dd9d85588607e0db7b6a30e22f9139c6ee7be48152a6f78d6f",
    "time" : 1307034266,
    "details" : [
        {
            "account" : "",
            "address" : "miGuMc6qtVEKS6Pf1jKddaa81DeHjMzkpB",
            "category" : "send",
            "amount" : -10.00000000,
            "fee" : 0.00000000
        }
    ]
}
legendary
Activity: 1072
Merit: 1181
These are nice ideas. Cleaner messages and dialogs are always an improvement, and the ability to inspect a transaction before sending it is really needed, i believe.

I'm not sure yet how fee calculation and prioritization should be done in the future, it's certainly good to allow users to force a particular fee when sending (after enough warning).
hero member
Activity: 755
Merit: 515
I wrote up what I think should be acceptable to make fees clearer and easier to manage.
https://github.com/TheBlueMatt/bitcoin/commits/feefix.
It is separated into 3 commits as follows:
Quote
Make the fee error/dialog messages much clearer.
Quote
Update fee policy to be much more customizable.

This changes nTransactionFee into nBaseTransactionFee and
nPerKBTransactionFee where nBaseTransactionFee is applied to each
transaction once and nPerKBTransactionFee is applied per KB to
each transaction.

Also, fOverrideTransactionFee has been added to allow the ignoring
of GetMinFee() when creating transactions.
These can be set via command line options, rpc commands, and in the Options dialog (in a new second tab called "Transaction fees")
Quote
Add setautocommit, reject transaction and committransaction.

Here is the help for setautocommit:
If is false, the send* functions will return a txid,
which must be manually committed instead of being immediately committed.
Once a new transaction has been created, you can get information about it by using
gettransaction . It can then be commited or rejected using
committransaction or rejecttransaction respectively.
Jump to: