Dd-3: V0.0.7 (03/09/16)

Discussion in 'Development Dispatches' started by tacotime, Mar 9, 2016.

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

    drunkenmugsy Sr. Member
    Advocate (Reddit)

    Dec 28, 2015
    405
    218
    Male
    I am purchasing tickets just fine both manually pricing and automatically after setting a maxprice. I am running 0.0.7 linux-arm.
     
  2. deceiver

    deceiver New Member

    Dec 30, 2015
    13
    0
    Male
    You downloaded binaries or compiled the version?
     
  3. drunkenmugsy

    drunkenmugsy Sr. Member
    Advocate (Reddit)

    Dec 28, 2015
    405
    218
    Male
    This is with the latest 0.0.7 download. I did not compile.
     
  4. Reynold

    Reynold Member

    Jan 28, 2016
    198
    70
    Male
    Programmer
    Hello,

    Can someone give an example command line for using "purchaseticket"? I've not been able to purchase manually yet.

    I have a bat file named purchaseticket.bat
    Code:
    dcrctl.exe -u YourUserName -P YourPassword --wallet purchaseticket default %1
    
    From the wallet help info, I thought this was sufficient.

    I run this command:
    Code:
    purchaseticket.bat 20
    
    Assuming that "20" is the max that I want to spend. When the ticket price is for example "8" and I have spendable coins that will cover it, I get the dreaded error:
    Code:
    -4: not enough to purchase sstx
    
    Although I verified my spendable by running:
    Code:
    dcrctl -u YourUserName -P YourPassword --wallet getbalance default 1 spendable
    
    I admit, I never tried doing this on testnet or any other previous versions. I am using version 7 now.

    Edit: I am running Windows and the automatic purchase is working fine but seems to be slow in purchasing even when I have funds, but if I let it run all night, I see that tickets were purchased automatically.
     
    Noah likes this.
  5. drunkenmugsy

    drunkenmugsy Sr. Member
    Advocate (Reddit)

    Dec 28, 2015
    405
    218
    Male
    #46 drunkenmugsy, Mar 17, 2016
    Last edited: Mar 17, 2016
    Even though your spendable may report 10dcr. You may not actually have 10dcr available to spend. I do not know the exact internals of how this works but suffice it to say you have dcr spread across many 'change' tickets. Meaning you purchased a ticket for x but the transaction was actually x+y. This is also why your wallet will go down to zero balance even though you had 80dcr and stake only 50dcr. Another transaction happens once your ticket is recorded to send you back the 'change' y - fees. If you open dcrwallet with the --prunetickets --reuseaddresses flags I think it cleans up some of this. I have heard this change referred to as dust? However due to the way transactions work it will never be exact. Like I said I do not fully understand the internals but this has been my experience. At once point I had over 1500 addresses used in my wallet from PoS staking activity.

    From my understanding this results in addresses with less than .05dcr on them. The tx fee is .05dcr so these 'dust' addresses are just floating around unusable?
     
  6. h3rtl31n

    h3rtl31n New Member
    Translator (Deutsch)

    Dec 28, 2015
    34
    2
    Male
    Wouldn't it be possible to set the TX fee to 0.00 ? Since the network doesn't have so many transactions at the moment it could still be mined into a block.
     
  7. Reynold

    Reynold Member

    Jan 28, 2016
    198
    70
    Male
    Programmer
    I'm wondering, can this be fixed? It's confusing to see "spendable" as 10 but you can't buy a ticket worth 8.
     
    Noah likes this.
  8. drunkenmugsy

    drunkenmugsy Sr. Member
    Advocate (Reddit)

    Dec 28, 2015
    405
    218
    Male
    I do not think you can control transaction price on these change transactions. I remember reading it is not even .05 txfee. But it adds up when you start getting north of 1500 addresses it would seem.
     
  9. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    tx fee depends on size in bytes of the tx, which inturn depends on no of inputs a tx has. So if you have 10 inputs of 1 DCR instead of 1 input 10 DCR it will need higher tx fee as you are sending more data into the block where your tx will be included. This can sometime make the total amount of tx + fee go over your balance. Also i think there is a threshold amount after which inputs are considered too small/dust to use in tx.

    So it is advisable to consolidate your funds from time to time to avoid creating too many small amount inputs.
     
  10. root

    root Member

    Feb 3, 2016
    381
    76
  11. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    I though this would be asked, so here you go.

    Code:
    dcrctl --wallet help consolidate consolidate inputs ("account")
    
    Consolidate n many UTXOs into a single output in the wallet.
    
    Arguments:
    1. inputs  (numeric, required) Number of UTXOs to consolidate as inputs
    2. account (string, optional)  Optional: Account to use
    
    Result:
    "value" (string) Transaction hash for the consolidation transaction
    In place of "inputs" you can use a big number like 99999
     
  12. dave

    dave New Member

    Jan 11, 2016
    27
    10

    I get -22: TX rejected: tried to spend zero value output from input 9f36ec50ba09fe67b72e0fc5024cab8c7637cf48b18e92903d7302834be4f302, idx 2
     
  13. sambiohazard

    sambiohazard Sr. Member

    Jan 21, 2016
    844
    372
    @dave no idea, its a strange tx where 0DCR are sent to an address. Maybe @davecgh or @ceejep can explain? Could be some kind of bug.
     
  14. root

    root Member

    Feb 3, 2016
    381
    76
  15. ceejep

    ceejep Sr. Member
    Developer

    Dec 14, 2015
    192
    220
    There was a bug in waller for 0.0.7 that caused corruption on restarting a wallet with staking transactions. Restoring from seed will fix this. Back up the old wallet first.
     
  16. root

    root Member

    Feb 3, 2016
    381
    76
    #57 root, Mar 19, 2016
    Last edited: Mar 19, 2016

Share This Page