I am purchasing tickets just fine both manually pricing and automatically after setting a maxprice. I am running 0.0.7 linux-arm.
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.
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?
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.
I'm wondering, can this be fixed? It's confusing to see "spendable" as 10 but you can't buy a ticket worth 8.
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.
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.
Consolidate your funds - how ? btw - new version : https://forum.decred.org/threads/dd-4-v0-0-8-03-18-16.1336/
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
I get -22: TX rejected: tried to spend zero value output from input 9f36ec50ba09fe67b72e0fc5024cab8c7637cf48b18e92903d7302834be4f302, idx 2
@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.
Same here. My wallet was not recreated from seed, just upgraded binaries to 0.0.8. @dave can check his transaction through mainnet block explorer. Any ideas what is wrong ?
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.
I may sound like a coward, although I saw a post about successful wallet's recovery from the seed, I am not ready to try my luck yet. Edit : successful recovery