Hey everyone, As the software continues to mature, it is very important that the project expands and improves test coverage alongside development. A commitment of development is to achieve and maintain a high level of test coverage as such coverage improves the quality of the software and helps prevent future regressions. An important step toward improved testing is to develop exhaustive behavioural tests that ensure you can use the software reliably as new features are introduced and/or improvements are made to the existing codebase. The project is developing a new RFP that focuses specifically on software testing and these behavioural tests. To assist in the development of a high quality RFP that improves testing of what you use, the developers would like to know which RPC commands you use most frequently and which ones are the most important to you (i.e., getnewaddress, sendfrom, sendtoaddress, etc.). In other words, please post examples of commands you use as this information will directly feed into testing, which is extremely valuable information to developers as it helps them understand how you use the software. It is very important for the project to stay in touch with users and ensure you have representation even in matters such as testing. The project will also consult proof-of-work pool operators, future proof-of-stake operators, and exchanges on the same topic to make sure everyone has representation and can give feedback on the RPC commands they use. Thank you very much for your time, feedback, and helping the project improve the software! Yours sincerely, Decred Project TLDR: Please post commands you use so that testing can improve and a new RFP can be released to develop exhaustive behavioural tests of the software.
The most common I use daily: ./dcrwallet -u username -P password --dcrdusername=xxx --dcrdpassword=xxx --enablestakemining --balancetomaintain=0.0 --ticketmaxprice=X ./dcrctl -u user -P password --wallet sendtoaddress XXXXXXXXXXX xx.x ./dcrctl -u user -P password --wallet settxfee 0.xx ./dcrctl -u user -P password --wallet consolidate 99999 default ./dcrctl -u user -P password --wallet getbalance default 0 all ./dcrctl -u user -P password --wallet getbalance default 1 all ./dcrctl -u user -P password --wallet getbalance ./dcrctl -u user -P password --wallet getstakeinfo ./dcrctl -u user -P password --wallet walletpassphrase passphrase 0 Edit: I also use, occasionally: listtransactions. And very rarely: getnewaddress, getaddressbyaccount.
help getinfo getstakeinfo getpeerinfo sendmany sendtoaddress listtransactions purchaseticket getaccountaddress getaddressesbyaccount getnewaddress settxfee setgenerate walletpassphrase walletinfo getwork setticketmaxprice livetickets getconnectioncount and fixes most needed on -> addnode / node connect / listtransactions
When I start it ./dcrwallet -u XX -P XX -dcrdusername=XX --dcrdpassword=XX --reuseaddresses --enablestakemining --balancetomaintain=XX --ticketmaxprice=XX ./dcrctl -u XX -P XX --wallet walletpassphrase XX 0 ./dcrctl -u XX -P XX rebroadcastmissed A few times in between ./dcrctl -u XX -P XX --wallet settxfee XX ./dcrctl -u XX -P XX --wallet setticketfee XX ./dcrctl -u XX -P XX --wallet setticketmaxprice XX Every time I run my report script which is a few time per day ./dcrctl -u XX -P XX --wallet getbalance 'default' 0 all ./dcrctl -u XX -P XX --wallet getbalance 'default' 0 locked ./dcrctl -u XX -P XX --wallet getbalance 'default' 0 spendable ./dcrctl -u XX -P XX --wallet getstakeinfo ./dcrctl -u XX -P XX --wallet getticketmaxprice ./dcrctl -u XX -P XX --wallet getticketfee` ./dcrctl -u XX -P XX getblockcount
* dcrwallet -u username -P password --dcrdusername=xxx --dcrdpassword=xxx --enablestakemining --balancetomaintain=0.0 --ticketmaxprice=X --reuseaddresses * dcrctl -u username -P password --wallet getstakeinfo * dcrctl -u username -P password --wallet getbalance * dcrctl -u username -P password --wallet getbalance * 0 all * dcrctl -u username -P password --wallet walletinfo * dcrctl -u username -P password --wallet setticketfee x.xx * dcrctl -u username -P password --wallet purchaseticket x * dcrctl -u username -P password --wallet getpeerinfo * dcrctl -u username -P password --wallet diconnect node x * dcrctl -u username -P password --wallet sendtoaddress "address" x * dcrctl -u username -P password --wallet listtransactions * dcrd --rpcuser user --rpcpass password --miningaddr=mininaddress
help getinfo getstakeinfo getpeerinfo sendtoaddress listtransactions purchaseticket getaccountaddress getnewaddress setticketmaxprice
Code: getblockhash getblock getmininginfo ticketfeeinfo getstakeinfo getticketpoolvalue getcoinsupply Every new block I also use getrawtransaction + decoderawtransaction to parse 25 SStx transactions and fetch amount of YES / NO votes in the block. I think it will be good just to add new rpc call to display all time history of votes. Here is what we have in dcrstats db: blocks 1 - 23042: - 2323 NO votes - 89636 YES votes - 2776 missed votes Btw, few weeks ago there were ~ 100 times less "NO" votes interesting, who and why started to vote "no", and how many new "no" votes will appear when 10 PoS pool become live in mainnet. (if you don't know, it is easy as 1 click to switch all your tickets to "NO" using stakepool Web GUI)
I'm developing a gaming/betting system and want to understand how to properly handle user deposits/withdrawals. Currently I'm struggling with: listtransactions ("account" count=10 from=0 includewatchonly=false) sendfrom "fromaccount" "toaddress" amount (minconf=1 "comment" "commentto") getnewaddress ("account" verbose=false) gettransaction "txid" (includewatchonly=false) gettxout "txid" vout (includemempool=true) Currently my main problem is understanding listtransactions. I tried to explain the issue with concrete samples here: https://forum.decred.org/threads/listtransactions-how-does-it-work.3374/ Regards, kripto
A simple set really... Code: dcrwallet -u user -P password --enablestakemining --balancetomaintain=0 --ticketmaxprice=10 dcrctl -u user -P password --wallet walletpassphrase x 0 dcrctl -u user -P password --wallet getbalance dcrctl -u user -P password --wallet getbalance default 0 all dcrctl -u user -P pass --wallet gettickets 1
* dcrctl -u username -P password --wallet getpeerinfo * dcrctl -u username -P password --wallet disconnect node x temp/perm (Specifically what is the timeout for temp and is it changeable?) +1
I checked command history, I use "-l" and "help" the most, then apart from those already mentioned : getmaxticketprice getreceivedbyaddress gettxfee getwalletinfo stop validateaddress ... and the new ticketinfo command will try soon
Adding bspus's input from Bitcointalk: Code: start daemon: dcrd --rpcuser [user] --rpcpass [password] start wallet: dcrwallet -u [user]-P [password]--enablestakemining --ticketmaxprice=0 --ticketaddress=[address] unlock wallet: dcrctl -u [user] -P [password] --wallet walletpassphrase [passphrase] 0 get stake info: dcrctl -u [user] -P [password] --wallet getstakeinfo get balances: dcrctl -u [user] -P [password] --wallet getbalance * 0 locked dcrctl -u [user] -P [password] --wallet getbalance * 0 spendable dcrctl -u [user] -P [password] --wallet getbalance * 0 all buy ticket: dcrctl -u [user] -P [password] --wallet purchaseticket "default" [maxprice] 1 [address] The user notes that they have each command as a separate batch file with the parameters they want. They also would like getbalance to show unconfirmed coins. They currently calculate it using a batch file as well [all - (spendable + locked)], but would like a way to do it natively.
I agree it would be nice to be able to see coins still 'up in the air'! With an ETA? 24hr total + X. 48hr total +x+y. 96hr total +x+y+z. Meaning I can see I have 50 coins floating but I have no concrete timeline of when they will be spendable.
I use very basic commands - Starting daemon - dcrd -u xxxxx -P xxxxx Starting wallet- dcrwallet -u xxxx -P xxxx --walletpass xxxx --dcrdusername=xxxx --dcrdpassword=xxxx Balance and stakeinfo- dcrctl -u xxxx -P xxxx --wallet getstakeinfo dcrctl -u xxxx -P xxxx --wallet getbalance "*" 0 all dcrctl -u xxxx -P xxxx --wallet getbalance "default" 0 all Unlocking - dcrctl -u xxxx -P xxxx --wallet walletpassphrase xxxx 0 Buying tickets (stakepool) - dcrctl -u xxxx -P xxxx --wallet purchaseticket "default" 20 1 Dcxxxxxxx Sometimes settxfee
dcrd -u XXxx -P XXxx--externalip XXxx dcrwallet -u XXxx -P XXxx --walletpass XXxx 0 --enablestakemining --ticketmaxprice=Xx --ticketaddress=Xx dcrctl -u XXxx -P XXxx --wallet getbalance default 0 spendable dcrctl -u XXxx -P XXxx --wallet getbalance default 0 all dcrctl -u XXxx -P XXxx --wallet getbalance * 0 all dcrctl -u XXxx -P XXxx --wallet getstakeinfo dcrctl -u XXxx -P XXxx --wallet validateaddress dcrctl -u XXxx -P XXxx --wallet sendtoaddress dcrctl -u XXxx -P XXxx --wallet help (because im very forgetful! lol)
My two most used are: getbalance ACCOUNT 0 all semaxtticketprice X It would be nice to have a per-account list of balances with maturity and type of balance. PS: Also, a list of tickets with their current age and buy price would rock.
Adding slv126's input from Bitcointalk: Code: dcrwallet -u [user] -P [pass] --dcrdusername=[user] --dcrdpassword=[pass] --walletpass=[passphrase] --enablestakemining --balancetomaintain=0 --ticketmaxprice=0 --ticketaddress=[address] --reuseaddresses dcrctl -u [user] -P [pass] --wallet walletpassphrase [passphrase] 0 dcrctl -u [user] -P [pass] --wallet getbalance "*" 0 all dcrctl -u [user] -P [pass] --wallet getbalance "*" 0 spendable dcrctl -u [user] -P [pass] --wallet getbalance "*" 0 locked dcrctl -u [user] -P [pass] --wallet purchaseticket default 10 dcrctl -u [user] -P [pass] --wallet getstakeinfo dcrctl -u [user] -P [pass] --wallet setticketfee 0.01 dcrctl -u [user] -P [pass] --wallet settxfee 0.01 dcrctl -u [user] -P [pass] --wallet setticketmaxprice 0 dcrctl -u [user] -P [pass] --wallet setbalancetomaintain 0 dcrctl -u [user] -P [pass] --wallet consolidate 99999 default
I know for me the most pressing cmd is the new purchase ticket method. Auto purchase is still working for me on 0.1.0. To be most effective though there are several new parameters not yet defined clearly.