Errors Sendtoaddress

Discussion in 'Transactions' started by Dyrk, Feb 25, 2016.

  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. Dyrk

    Dyrk Sr. Member
    Developer

    Jan 7, 2016
    518
    376
    Male
    Wonderland
    Any thoughts why is this happening?
    • First attempt of 26.4 DCR was ok, but it was refused with weird message about "26.4 Coin output + 0.15 Coin fee", wtf is 0.15 coin fee.
    • Second attempt of 26.3 DCR was ok, but it was refused with "1025260 is dust" message. So it tried to send 26.3 with 0.15 DCR fee and 0.01025260 rest.
    • Third attempt of 26.2 DCR was ok and it was accepted with the fee 0.1 DCR.
    Why this fee is adjusting automatically. It seems to be not possible to force it be 0.05;
    And it just try to send it with 0.15 - 0.10 fees.

    Code:
    dcrctl --wallet settxfee 0.05
    > true
    
    dcrctl --wallet getbalance default 0
    > 26.4602526
    
    dcrctl --wallet sendtoaddress XXX 26.4
    > insufficient funds: transaction requires 26.55 Coin input (26.4 Coin output + 0.15 Coin fee) but only 26.4602526 Coin spendable
    
    dcrctl --wallet sendtoaddress XXX 26.3
    > TX rejected: transaction YYY is not standard: transaction output 0: payment of 1025260 is dust
    
    dcrctl --wallet sendtoaddress XXX 26.2
    > ZZZ
     
  2. ay-p

    ay-p Full Member
    Developer

    Dec 7, 2015
    148
    106
    Male
    #2 ay-p, Feb 25, 2016
    Last edited: Feb 25, 2016
    Hey so I think we have figured out what is going on here:

    2 different issues really.

    The 26.4 tx: settxfee does currently work as expected. But this sets the fee per kb, so this 26.4 tx probably included another vin that caused the estimated size to breach the barrier to then think it should need fee for 3 kb tx. This fee calculation is obviously not correct and should accurately reflect tx size and not step up from 0.1 to 0.15 based on 1 additional vin. (https://github.com/decred/dcrwallet/issues/50) I am in the process of working on this issue now.

    The other 2: 26.2 sends fine since it doesn't need to create a vout that is considered dust by dcrd. Wallet shouldn't even create (and send) that transaction due to the creation of a dust vout. Then it would alert you to consolidate your utxos to avoid this from happening. @cjepson has just submitted a PR for a consolidate RPC command, so that will be in shortly after testing. Making wallet more intelligent about not making dust vouts will take some more time, but we hope to have that in 2/26-27. (https://github.com/decred/dcrwallet/issues/62)

    Thanks for the report and hopefully we'll have this fixed shortly.
     
    chappjc likes this.
  3. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    Thanks god we will soon have some kind of consolidation command. Although I would be delighted if GUI wallet comes with full coin control feature. Why let inputs fragment so much when it is known to cause high fee & dust problems. I think advanced users must have choice to control there coins. You know, i loose weight & sleep every day i cant use coin control. To use current wallet is like seeing your precious being shred to pieces all day every day. :eek::mad::eek::mad:
     
  4. ay-p

    ay-p Full Member
    Developer

    Dec 7, 2015
    148
    106
    Male
    Yah we had quite an extensive discussion concerning input selection yesterday.

    Consolidation will be the first step in helping that process along.

    The current way seems sufficient for the majority of users (who may stake a little, send a few small tx, etc). Just selecting whatever inputs the fastest to construct the tx works fine But you're right to point out the difference in needs for different groups of users. Complete input control is one option that we'd love to get going. Although, for major power users (exchanges/mining pools) that accumulate thousands of utxos, manually selecting inputs is not feasible so we'll still need an algo.

    I think the idea that @jrick presented was to have 3-4 different algos that fulfil different users' needs. So for instance the default would be: lowest fees, which would just select the largest utxos to construct the smallest tx possible. Another would be: dust collecting, which would use the smallest utxos first. And then also add the complete input control as well.

    I guess the upshot of the whole thing is: yes, input selection needs work. But there is no silver bullet for all users. So we feel like offering a few different options should cover the far majority of users, and those that remain could just use the manual input selection to do whatever they'd like.
     
    chappjc and sambiohazard like this.
  5. rohit pawar

    rohit pawar Member
    Advocate (Reddit)

    Dec 26, 2015
    166
    87
    Male
    India
    is this issue still open ?
    Facing samething again .
    Code:
    windows-amd64>dcrctl -u  -P xxx --wallet sendtoaddress DsVyGmQT83RWFaRCRewrhWzSykoky8cNiEJ 195
    -32603: insufficient funds: transaction requires 195.6 Coin input (195 Coin outp
    ut + 0.6 Coin fee) but only 195.16750931 Coin spendable
    
    dcrctl -u qm2 -P xxx --wallet sendtoaddress DsVyGmQT83RWFaRCRewrhWzSykoky8cNiEJ 190
    -32603: insufficient funds: transaction requires 190.55 Coin input (190 Coin out
    put + 0.55 Coin fee) but only 190.19824097 Coin spendable
    
    dcrctl -u qm2 -P xxx --wallet getbalance 195.87465801
    
    dcrctl -u qm2 -P xxx --wallet getbalance "default" 0 spendable
    195.87465801
    
    dcrctl -u qm2 -P xxx --wallet sendtoaddress DsVyGmQT83RWFaRCRewrhWzSykoky8cNiEJ 190
    -32603: insufficient funds: transaction requires 190.55 Coin input (190 Coin out
    put + 0.55 Coin fee) but only 190.19824097 Coin spendable
     
  6. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    What you need to do is basic maths. In your case you can transfer 195.16750931 - 0.6 = 194.56750931 DCR due to big tx size, which is infact due to many inputs from staking rewards & change from various tx.
    All the needed info is provided there, maybe devs can just put what can be spent instead of what fee is required and how many coins you have lol. but that will be overkill, i hope everyone can do maths. :D
     
  7. rohit pawar

    rohit pawar Member
    Advocate (Reddit)

    Dec 26, 2015
    166
    87
    Male
    India
    Lol read all lines first . Then ul learn what was my problem . That was happening because of dust . Consolidating fixed this . And ya i think everybody can do basic maths . But not everone can read each line .
     
  8. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    lol my bad. i had a similar message but i was able to consolidate with just basic maths, heh. Maybe you let it become too "dusty" before cleaning it :D
     

Share This Page