Feedback Which Commands Do You Use?

Discussion in 'Technical Development' started by _ingsoc, Apr 27, 2016.

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

    _ingsoc Hero Member

    Dec 7, 2015
    410
    1,133
    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.
     
    zero likes this.
  2. Tivra

    Tivra Member
    Advocate (BitcoinTalk)

    Dec 30, 2015
    120
    60
    Europe
    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.
     
    _ingsoc likes this.
  3. tpruvot

    tpruvot Jr. Member
    Pool Operator (PoW)

    Feb 16, 2016
    43
    38
    Male
    #3 tpruvot, Apr 27, 2016
    Last edited: Apr 27, 2016
    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
     
    _ingsoc and Tivra like this.
  4. brencelj

    brencelj New Member

    Jan 10, 2016
    49
    17
    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
     
    _ingsoc likes this.
  5. Johnshpon3

    Johnshpon3 Member

    Dec 25, 2015
    210
    86
    Male
    Telecommunications
    Slovenia
    * 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
     
    _ingsoc likes this.
  6. MarSas

    MarSas New Member

    Feb 12, 2016
    54
    14
    Male
    --wallet getbalance "default" 0 all
    --wallet getbalance
    --wallet getstakeinfo
     
    _ingsoc likes this.
  7. Emilio Mann

    Emilio Mann Full Member
    Advocate (Facebook)

    Jan 9, 2016
    185
    162
    Male
    help
    getinfo
    getstakeinfo
    getpeerinfo
    sendtoaddress
    listtransactions
    purchaseticket
    getaccountaddress
    getnewaddress
    setticketmaxprice
     
    _ingsoc likes this.
  8. Dyrk

    Dyrk Sr. Member
    Developer

    Jan 7, 2016
    518
    376
    Male
    Wonderland
    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)
     
    _ingsoc likes this.
  9. kripto

    kripto New Member

    Jan 13, 2016
    17
    3
    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
     
    _ingsoc likes this.
  10. nikos64

    nikos64 New Member

    Feb 3, 2016
    1
    1
    Male
    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
     
    _ingsoc likes this.
  11. Canth

    Canth New Member

    Jan 11, 2016
    7
    4
    Male
    In addition to what others have posted, I also use getbalancetomaintain and setbalancetomaintain.
     
    _ingsoc likes this.
  12. drunkenmugsy

    drunkenmugsy Sr. Member
    Advocate (Reddit)

    Dec 28, 2015
    405
    218
    Male
    * 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
     
    _ingsoc likes this.
  13. root

    root Member

    Feb 3, 2016
    381
    76
    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
     
    _ingsoc likes this.
  14. _ingsoc

    _ingsoc Hero Member

    Dec 7, 2015
    410
    1,133
    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.
     
    drunkenmugsy likes this.
  15. drunkenmugsy

    drunkenmugsy Sr. Member
    Advocate (Reddit)

    Dec 28, 2015
    405
    218
    Male
    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.
     
  16. Ayush

    Ayush Full Member
    Advocate (Facebook)

    Jan 9, 2016
    512
    100
    Male
    .
    .
    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
     
    _ingsoc likes this.
  17. BoMBeR

    BoMBeR New Member

    Jan 17, 2016
    75
    21
    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)
     
    _ingsoc likes this.
  18. chiguireitor

    chiguireitor New Member

    Apr 23, 2016
    7
    2
    Male
    Caracas, Venezuela
    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.
     
    _ingsoc likes this.
  19. _ingsoc

    _ingsoc Hero Member

    Dec 7, 2015
    410
    1,133
    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
    
     
  20. drunkenmugsy

    drunkenmugsy Sr. Member
    Advocate (Reddit)

    Dec 28, 2015
    405
    218
    Male
    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.
     

Share This Page