CTS,建议参考一下Waves,把租赁功能用到见证人体系吧,照顾一下不会做见证人的人群。
虽然看起来很复杂。 我花了三天搞定(我自己的锅,一天只搞两小时,依赖库装了,理解错/自己编译1G内存卡死,实际上直接下载就好了。)。弄一回后/懂行后, 超容易的。 真的超容易的。(只限ubuntu16.04小鸡)
进TG群 手把手教学。 citshares dex .
简单版先行。复杂的等下看下方的 也可以看发起人写的
https://bitsharestalk.org/index.php?topic=28277.15 的28 楼
https://steemit.com/cts/@citshares/6jhdmn-citshares (科学上网,看)
下载 两部分软件
https://github.com/citshares/bitshares-core/releases/download/v1.0.0/cli_wallet 旧了没用了
https://github.com/citshares/bitshares-core/releases/download/v1.0.0/witness_node 旧了没用了
请换成新的
https://github.com/citshares/citshares/releases/download/v1.1/witness_cli_wallet_20190624.tar.gz命令行模式下为
先看你要放在哪个文件夹下, 要放在新的就
mkdir *****
cd *****
然后下载
wget
https://github.com/citshares/citshares/releases/download/v1.1/witness_cli_wallet_20190624.tar.gztar -xzvf witness_cli_wallet_20190624 解压 (提示没有软件, 就 sudo apt-get install ****) 软件名应该是tar
安装依赖包 (下方都是在命令行模式下进行的,crtl+alt+t 打开终端来使用 有点常用命令 cd ls 还有vim软件的命令 按ESC 输入 :wq /保存退出 :q! /不保存强制退出)
sudo apt-get update
sudo apt-get install autoconf cmake make automake libtool git libboost-all-dev libssl-dev g++ libcurl4-openssl-dev
cd 到witness_node 的文件夹
chmod +x witness_node 或者 sudo chmod +x witness_node (修改运行权限)
./witness_node --replay-blockchain --rpc-endpoint 127.0.0.1:11010 (运行命令,等运行下载完区块,去喝水)
chmod +x cli_wallet 或者 sudo chmod +x cli_wallet (一样修改运行权限)
./cli_wallet -s ws://127.0.0.1:11010 (地址为应上面的地址端口)
set_password *******(设置钱包密码,防止被人复制走钱包,被盗资金)
unlock ******(解锁钱包)
import_keys 账户名 私钥 true (导入私钥,私钥是active key/资金秘钥那个)
import_balance 用户名 [私钥] true (导入账户余额,私钥比上面多了, [ ] 符号)
要想挖矿,就要升级账户,与建立见证人。 需要账户内共有1000左右CTS (2019-5-22 价值11.2CNY 左右)
upgrade_account 账户名 true
create_witness 账户名 "
www.citshares.org" true (""里面是你的个人网址链接,想填什么填什么)
get_witness 账户名 (查看自己的见证人ID)
"id": "1.6.**", (在结构里面的这个)
vote_for_witness 账户名 账户名 true true (为自己投票,不投可能也行,但是你想挖,就要有票上名单)
suggest_brain_key (创建一个新密钥对)
"wif_priv_key": "5J8P7YrjVrxU93PYAGpv4SxyZvhGUqMgBZEUr4*******CeTCC",
"pub_key": "CTS5qKNzpPbbaVyX5v6b3Ma6PJLw63dWBgAazS*******d8AAMGuV"
上面的两个KEY 先抄到一边 (复制的,记得用完删掉)
update_witness 账户名 "
https://steemit.com/cts/@citshares/citshares" CTS5qKNzpPbbaVyX5v6b3Ma6PJLw63dWBgAazSG8o7Mu3d****GuV true (广播出去,你要以这个公钥做为挖矿标记)
对 witness_node 进行 ctrl + c 的关闭作业
cd witness_node_data (打开当前 witness_node_data_dir目录)
vim config.ini (打开文件)
使用上下左右 移动光标 找个没有文字的地方。
输入witness-id = "1.6.**" (你的见证人ID)
private-key = ["CTS5qKNzpPbbaVyX5v6b3Ma6PJLw63dWBgAaz********GuV","5J8P7YrjVrxU93PYAGpv4SxyZvhGUqMgB*******W2YCeTCC"] (前面要你保存的 公钥,私钥)
./witness_node --replay-blockchain --rpc-endpoint 127.0.0.1:11010 (重启,等区块同步好了,再等票数够,成为活跃见证人,就自动在挖矿了。)
复杂详细版下面是复杂的,超详细界面结果也写出来
先看上方的下载链接,自行下载。https://github.com/citshares/citshares/releases
解压( tar -xzvf witness_cli_wallet_20190624 解压 (提示没有软件, 就 sudo apt-get install ****) 软件名应该是tar)
sudo apt-get update
sudo apt-get install autoconf cmake make automake libtool git libboost-all-dev libssl-dev g++ libcurl4-openssl-dev
cd 到witness_node 的文件夹
chmod +x witness_node 或者 sudo chmod +x witness_node (修改运行权限)
./witness_node --replay-blockchain --rpc-endpoint 127.0.0.1:11010 (运行命令,等运行下载完区块,去喝水)
--replay-blockchain: 告诉witness_node每次运行时都重新遍历一遍数据。因为CTS不允许喂价低于买单价,因此每次重启witness_node都需要将以往数据遍历一次。这个过程耗时不多。
--rpc-endpoint: rpc的控制端口,接下来要用命令行钱包从这个端口连接
(如果不想每次都输这么长, 可以 touch **.sh 建个文件, 再vim 进去 把./witness_node --replay-blockchain --rpc-endpoint 127.0.0.1:11010 粘贴在里面。 按ESC键 输入 :wq 保存退出, 再chmod +x**.sh 改权限, 以后直接CD到这文件夹 然后 ./**.sh 运行就行了)
chmod +x cli_wallet 或者 sudo chmod +x cli_wallet (一样修改运行权限)
./cli_wallet -s ws://127.0.0.1:11010 (地址为应上面的地址端口 ,也可一样的建个 ***.sh 文件用来运行)
set_password *******(设置钱包密码,防止被人复制走钱包,被盗资金)
unlock ******(解锁钱包)
import_keys 账户名 私钥 true (导入私钥,私钥是active key/资金秘钥那个)
成功示例:
import_key miner-test 5KgqzpMULCcB6eyEAhK64bgErtjgm5nFUgPK3cwPtxRbFEeZi6w true
2854162ms th_a wallet.cpp:799 save_wallet_file ] saving wallet to file wallet.json
2854163ms th_a wallet.cpp:818 save_wallet_file ] saved successfully wallet to tmp file wallet.json.tmp
2854163ms th_a wallet.cpp:824 save_wallet_file ] validated successfully tmp wallet file wallet.json.tmp
2854163ms th_a wallet.cpp:828 save_wallet_file ] renamed successfully tmp wallet file wallet.json.tmp
2854163ms th_a wallet.cpp:835 save_wallet_file ] successfully saved wallet to file wallet.json
2854164ms th_a wallet.cpp:476 copy_wallet_file ] backing up wallet wallet.json to after-import-key-b6856118.wallet
true
unlocked >>>
import_balance 用户名 [私钥] true (导入账户余额,私钥比上面多了, [ ] 符号)
成功示例
unlocked >>> import_balance miner-test [5KgqzpMULCcB6eyEAhK64bgErtjgm5nFUgPK3cwPtxRbFEeZi6w] true
import_balance miner-test [5KgqzpMULCcB6eyEAhK64bgErtjgm5nFUgPK3cwPtxRbFEeZi6w] true
[]
unlocked >>>
要想挖矿,就要升级账户,与建立见证人。 需要账户内共有1000左右CTS
upgrade_account 账户名 true
成功示例:
upgrade_account miner-test true
{
"ref_block_num": 58815,
"ref_block_prefix": 1460128007,
"expiration": "2019-02-01T03:36:00",
"operations": [[
8,{
"fee": {
"amount": 69470219,
"asset_id": "1.3.0"
},
"account_to_upgrade": "1.2.3144",
"upgrade_to_lifetime_member": true,
"extensions": []
}
]
],
"extensions": [],
"signatures": [
"2008c6abb6859eef53c849f45ea11e7292c691b5939ce43bfaeed1f94142fe6e4a7d3d8da98599822675bf5c1e8367881818876507c671d62f8b4e6b19355f169d"
]
}
unlocked >>>
create_witness 账户名 "
www.citshares.org" true (""里面是你的个人网址链接,想填什么填什么)
成功示例
create_witness miner-test "
https://www.citshares.org" true
{
"ref_block_num": 59085,
"ref_block_prefix": 2779994760,
"expiration": "2019-02-01T03:49:30",
"operations": [[
20,{
"fee": {
"amount": 28945924,
"asset_id": "1.3.0"
},
"witness_account": "1.2.3144",
"url": "
https://www.citshares.org",
"block_signing_key": "CTS8EP18sKptFf9J9rZFyrds1L6ysjd2LteHa2zMNhd4Yov8nNxWD"
}
]
],
"extensions": [],
"signatures": [
"1f693ae409818df4cf0156a1744a9737febcf58da6a3be99b3d3dcd882343dc8b5761572af44ccc74f1e64e14b07a8dd76644876e19635eebffb5a4045fe445404"
]
}
unlocked >>>
get_witness 账户名 (查看自己的见证人ID)
"id": "1.6.**", (在结构里面的这个)
成功示例:
get_witness miner-test
{
"id": "1.6.13",
"witness_account": "1.2.3144",
"last_aslot": 0,
"signing_key": "CTS8EP18sKptFf9J9rZFyrds1L6ysjd2LteHa2zMNhd4Yov8nNxWD",
"vote_id": "1:25",
"total_votes": 0,
"url": "
https://www.citshares.org",
"total_missed": 0,
"last_confirmed_block_num": 0
}
vote_for_witness 账户名 账户名 true true (为自己投票,不投可能也行,但是你想挖,就要有票上名单)
成功示例:
vote_for_witness miner-test miner-test true true
{
"ref_block_num": 59130,
"ref_block_prefix": 381798052,
"expiration": "2019-02-01T03:51:45",
"operations": [[
6,{
"fee": {
"amount": 811,
"asset_id": "1.3.0"
},
"account": "1.2.3144",
"new_options": {
"memo_key": "CTS6NWLS4WYQuACRMf8HBjC9yWDPQkcEymwqNbmkYQMKeNLvv7DJz",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [
"1:25"
],
"extensions": []
},
"extensions": {}
}
]
],
"extensions": [],
"signatures": [
"1f0c638e6cc0a969498901d5b607c78a7fd539932b6203048b8c07bb99dfd72edc0e99951406a8f7cf2871c5e42a257f9f0aa6768a14396a161ceb72524aa933b0"
]
}
unlocked >>>
suggest_brain_key (创建一个新密钥对)
成功示例
suggest_brain_key
{
"brain_priv_key": "COMPOLE SCUTULA ANNELID SHINILY LITER LIMNIAD TERRAL OSELA DEFROST MORICHE RABIES SUING CAR SHOEMAN SALITE GLANS",
"wif_priv_key": "5J8P7YrjVrxU93PYAGpv4SxyZvhGUqMgBZEUr4B6D1UW2YCeTCC",
"pub_key": "CTS5qKNzpPbbaVyX5v6b3Ma6PJLw63dWBgAazSG8o7Mu3d8AAMGuV"
}
unlocked >>>
"wif_priv_key": "5J8P7YrjVrxU93PYAGpv4SxyZvhGUqMgBZEUr4*******CeTCC",
"pub_key": "CTS5qKNzpPbbaVyX5v6b3Ma6PJLw63dWBgAazS*******d8AAMGuV"
上面的两个KEY 先抄到一边 (复制的,记得用完删掉)
update_witness 账户名 "
https://steemit.com/cts/@citshares/citshares" CTS5qKNzpPbbaVyX5v6b3Ma6PJLw63dWBgAazSG8o7Mu3d****GuV true (广播出去,你要以这个公钥做为挖矿标记)
成功示例
update_witness miner-test "
https://steemit.com/cts/@citshares/citshares" CTS5qKNzpPbbaVyX5v6b3Ma6PJLw63dWBgAazSG8o7Mu3d8AAMGuV true
{
"ref_block_num": 59201,
"ref_block_prefix": 2203175663,
"expiration": "2019-02-01T03:55:18",
"operations": [[
21,{
"fee": {
"amount": 5789,
"asset_id": "1.3.0"
},
"witness": "1.6.13",
"witness_account": "1.2.3144",
"new_url": "
https://steemit.com/cts/@citshares/citshares",
"new_signing_key": "CTS5qKNzpPbbaVyX5v6b3Ma6PJLw63dWBgAazSG8o7Mu3d8AAMGuV"
}
]
],
"extensions": [],
"signatures": [
"206921a27d7e069e7f08c8013e6e1f66cac7e3524737f64a5406869f83386446867b8091e4261daa63ed3d23871f1969ead8ad48ed1c603033638550f1b76882fa"
]
}
unlocked >>>
对 witness_node 进行 ctrl + c 的关闭作业
cd witness_node_data (打开当前 witness_node_data_dir目录)
vim config.ini (打开文件)
使用上下左右 移动光标 找个没有文字的地方。
输入witness-id = "1.6.**" (你的见证人ID)
private-key = ["CTS5qKNzpPbbaVyX5v6b3Ma6PJLw63dWBgAaz********GuV","5J8P7YrjVrxU93PYAGpv4SxyZvhGUqMgB*******W2YCeTCC"] (前面要你保存的 公钥,私钥)
./witness_node --replay-blockchain --rpc-endpoint 127.0.0.1:11010 (重启,等区块同步好了,再等票数够,成为活跃见证人,就自动在挖矿了。)
unlocked >>> get_global_properties
在其中的active_witnesses 这一项,查看是否包含对应的 "1.6.13" id即可。
提取挖矿收益
正在cli_wallet的命令行下运行:
withdraw_vesting miner-test 1000 CTS true
允许提取的金额可以通过
get_witness miner-test
查看
对于这个 vesting 可在网页钱包的 vesting /可解冻余额 里面看更直观