The old automatic ticket purchase function will be replaced soon by dcrtickeybuyer. This program is in alpha and will soon migrate to the main organization on github.com. In the meantime, it would be appreciated if people test it and give feedback. I would recommend testnet, so you can not lose any coins. https://github.com/decred/dcrticketbuyer To install: Code: go get -u -v github.com/decred/dcrticketbuyer cd $GOPATH/src/github.com/decred/dcrticketbuyer glide install go install dcrticketbuyer --help
started on testnet, but : * noclienttls does not seem to be working, certificate required anyway * default values do not seem to be used, e.g. I had to specify dcrdserv * highpricepenality wrong spelling * waitfortickets is true by default, so how to set it to false ? and it is not buying tickets even after 20 blocks. Diff around 30, maxprice 37. No errors present in any log. I'll try to investigate ...
I didn't succeed too. Here is some output: Code: 14:30:31 2016-05-04 [TRC] TKBY: Scaled fee is 0, but min fee is 0.01; using min 14:30:31 2016-05-04 [TRC] RPCC: Sending command [setticketfee] with id 105 14:30:31 2016-05-04 [TRC] RPCC: Received response for id 105 (result true) 14:30:31 2016-05-04 [DBG] TKBY: Mean fee for the last blocks or window period was 0; this was scaled to 0.01 14:30:31 2016-05-04 [TRC] TKBY: All tickets have been purchased, aborting further ticket purchases It says "All tickets have been purchased", but It didn't purchase any. Here is what I have in config file: testnet=true maxperblock=1 txfee=0.00001
Should be fixed, pull on master. Why it is not buying am not sure. Try to add '-d TKBY=trace' and see what gets print out.
Do you have any more output? It may not have bought tickets because price was too high and exponential penalty said not to.
The reason of my previous problem may be here : https://forum.decred.org/threads/dd-9-v0-1-2-05-03-16.3576/#post-19504 With the latest I get : (1) TKBY: Attempting to connect to dcrd RPC 127.0.0.1:19108 is incorrect, I still have to use dcrdserv=localhost:19109 (2) if balancetomaintain > actualBalance - numberOfTickets * ticketPrice; it refuses to buy even single one even if it still could other than that it seems to be buying tickets on testnet
Thanks for testing. (1) is fixed, (2) I will look at today. Are there any other features you would like to see?
I did go get -u -v ... and go build, but (1) still present (2) seems fine, purchased less than --maxperblock and stopped buying above balancetomaintain (3) waitfortickets is true by default, so how to set it to false ? great work, thanks !
(1) Should be fixed. (3) Also fixed (is now --dontwaitfortickets). Many new features added today. Code: --minprice= Attempt to prevent the stake difficulty from going below this value by manipulation (default: 0.0 Coin) --feesource= The fee source to use for ticket fee per KB (median or mean, default: mean) (mean) --maxinmempool= The maximum number of tickets allowed in mempool before purchasing more tickets (default: 0) Of biggest important is minprice. Now you can set the software to automatically prevent the blockchain from going below some ticket difficulty if you have a enough money. New bug found that I am working on: If ticket address and pool address unset, setting expiry fails.
That was a good one with minprice Thanks for updates, (1) seems fine, I'l check the rest hopefully soon
Thanks. I am going to change maxprice to a new function and move old maxprice to "maxpriceabsolute" which does what that used to. New maxprice will prevent you from buying tickets if it drives the price too high based on estimates. Also will adjust how maxprice and minprice work to make them dynamic and based around the 'ideal' ticket price estimate, which is the (2880 block VWAP+ticket pool avg value)/2.
OK, repository updated. maxprice and minprice have been replaced by maxpricescale and minpricescale. Please see the updated repo for more information about how they work. This should let most common users purchase tickets at the network average price while stabilizing the ticket price.
Adding a new graphic HTTP server interface so you can better see what the tool is doing. Will push soon.
As @ceejep said it will give you "HTTP server interface", so you use a binary compiled for Windows with your favorite web browser. On the other hand I had a strange behaviour with --maxperblock=4 I saw a lot of "All tickets have been purchased, aborting further ticket purchases". Even when some free funds were available. When restarted, dcrticketbuyer bought some more, but then again, some free funds, and no tickets bought. I have to check logs to get a better view on what happened. In the meantime I used --maxperblock=999 and --maxinmempool=4 and it worked fine, probably, but I have to double check ... Also https://docs.decred.org/mining/proof-of-stake/ points to the old cjepson repo. Thanks for great work !
There is an exponential penalty applied when the price is above the average ticket price. Right now the average price is about 17 DCR. The software is intended to purchase tickets that trail the VWAP and average pool price of tickets over weeks or months. This is most useful for large stakers who are reinvesting constantly. If you wish to disable this, set highpricepenalty=1.0.
looking at "height" it seems like sometimes it is sorted left->right, sometimes right->left, sometimes numbers are not sorted at all. Observed on mainnet as well (ticket fees height is not sorted) :