SproutsのWalletをLinuxで使おう その2
前回の続き
もやしコインこと、Sproutsの2回目です。
もやたすカワイイよもやたす(*´Д`)ハァハァ
ほぼStrongHandsの2回目の使い回し
Bootstrap入れてみる
入れなくても同期は始まりますが、時間かかるので導入推奨です。
Bootstrapのダウンロード
結構容量多いです。
こちらからダウンロードしてください。
現在は「sproutshf_bootstrap_20180709.zip」ですね、更新があった場合は名前が変わると思いますので、適宜判断してください。
wgetだぜ!
wget https://github.com/sprouts-coin-org/sprouts/releases/download/v0.2.0.0/sproutshf_bootstrap_20180709.zip
で、解凍。
sudo unzip sproutshf_bootstrap_20180709.zip
Bootstrapの適用
解凍してできたフォルダの中に「blocks」「chainstate」「peers.dat」っていうのがあるので、「.sproutshf」のディレクトリへまるっとコピーします。
ちょっと注意
sproutsdを一度でも起動させていると、Bootstrapに含まれているディレクトリやファイルが自動で生成されています。
ここにそのままコピーすると、不要ファイルが残ってうまく同期しなくなります。
なので、一度sproutshf内を整理します。
移動して、
cd /root/.sproutshf/
中身を確認すると、だいたいこんな感じかと思います。
xxx@xxx-xxx-xxx-xxx:~/.sproutshf# ls blocks database debug.log sprouts.conf wallet.dat chainstate db.log peers.dat sproutsd.pid
sproutsdを起動させている場合は一度ストップしてから、wallet.dat以外のディレクトリとファイルを移動またはリネームしてください。
念の為wallet.datのバックアップもお忘れなく。
(セルフGOXしても責任取れないので。。。)
Bootstrapの適用が終わって、同期や残高が問題なければ移動/リネームしたファイルは削除してしまって大丈夫です。
「.sproutshf」内が「blocks」「chainstate」「peers.dat」「wallet.dat」だけになったら、sproutsdを起動してください。
以上でBootstrapの適用は終了。
Walletの操作いろいろ
ここからが本番。
ひとまずhelpコマンドで一覧をざっと確認。
やっぱりコマンド一覧が長い。。。
sproutsd help addmultisigaddress<'["key","key"]'> [account] addnode backupwallet checkwallet createmultisig <'["key","key"]'> createrawtransaction [{"txid":txid,"vout":n},...] {address:amount,...} decoderawtransaction dumpprivkey encryptwallet enforcecheckpoint getaccount getaccountaddress getaddednodeinfo [node] getaddressesbyaccount getbalance [account] [minconf=1] getbestblockhash getblock [verbose] [txinfo] getblockcount getblockhash getblocktemplate [params] getcheckpoint getconnectioncount getdifficulty getgenerate gethashespersec getinfo getmininginfo getnetworkghps getnewaddress [account] getpeerinfo getrawmempool getrawtransaction [verbose=0] getreceivedbyaccount [minconf=1] getreceivedbyaddress [minconf=1] gettransaction gettxout [includemempool=true] gettxoutsetinfo getwork [data] help [command] importprivkey [label] [rescan=true] keypoolrefill listaccounts [minconf=1] listaddressgroupings listlockunspent listminting [count=-1] [from=0] listreceivedbyaccount [minconf=1] [includeempty=false] listreceivedbyaddress [minconf=1] [includeempty=false] listsinceblock [blockhash] [target-confirmations] listtransactions [account] [count=10] [from=0] listunspent [minconf=1] [maxconf=9999999] ["address",...] lockunspent unlock? [array-of-Objects] makekeypair [prefix] move [minconf=1] [comment] removetransaction txid repairwallet reservebalance [ [amount]] sendalert [cancelupto] sendcheckpoint sendfrom [minconf=1] [comment] [comment-to] sendmany {address:amount,...} [minconf=1] [comment] sendrawtransaction sendtoaddress [comment] [comment-to] setaccount setgenerate [genproclimit] settxfee showkeypair signmessage signrawtransaction [{"txid":txid,"vout":n,"scriptPubKey":hex,"redeemScript":hex},...] [ ,...] [sighashtype="ALL"] stop submitblock [optional-params-obj] validateaddress verifymessage
まずは、
encryptwallet <passphrase>
を忘れずに。
お好きなパスワードを決めてください。
上記コマンドを実行すると、その後のhelpに下記が追加されます。
walletlock walletpassphrase <passphrase> <timeout> [mintonly] walletpassphrasechange <oldpassphrase> <newpassphrase>
<>は必須、[]はオプションとなっています。
アカウント作成は必須ではないので、setaccountしていなければ<account>欄は全て””と入力してください。
よく使うコマンド
よく使うのは
getaddressesbyaccount <account> getinfo listminting sendtoaddress <stronghandsaddress> <amount>
辺りでしょうか。
順に見てみます。
getaddressesbyaccount “”
[ "your address" ]
そのまんま、Walletのアドレスです。
getinfo
{ "version" : "v0.2.0.0-gfe810be89b87", "protocolversion" : 70002, "walletversion" : 60000, "balance" : 99999999.00000000, "newmint" : 0.00000000, "stake" : 0.00000000, "blocks" : 866441, "moneysupply" : 15656322979288.46093750, "timeoffset" : 0, "connections" : 73, "proxy" : "", "ip" : "xxx.xxx.xxx.xxx", "difficulty" : 226.72180329, "testnet" : false, "keypoololdest" : 1529994689, "keypoolsize" : 101, "paytxfee" : 0.01000000, "checkpoints" : true, "unlocked_until" : 1632302262754, "errors" : "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications" }
とりあえずこれでbalance含めた情報が見れます。
listminting
{ "account" : "", "address" : "your address", "input-txid" : "your transaction", "time" : "1532664243", "amount" : "99999999", "status" : "mature", "age-in-day" : "11", "coin-day-weight" : "599999994", "proof-of-stake-difficulty" : 1220794.18119802, "minting-probability-24h" : 0.00983824, "minting-probability-5d" : 0.06378774, "minting-probability-10d" : 0.15888070, "minting-probability-30d" : 0.63702213, "minting-probability-90d" : 0.99944101, "search-interval-in-sec" : 1, "attempts" : 596835 }
今どのくらいかな~ってのを確認してください。
StrongHandsと違ってamountの桁数が修正されてますね。
見やすくなって良かった。
後は取引所等でSproutsを買って送金すればPoS Mintingが始まります。
おしまい
とりあえずこれでSproutsもPCつけっぱなしから開放されました。
それでは、良いもやしライフをお過ごし下さい。
ディスカッション
コメント一覧
まだ、コメントがありません