2019独角兽企业重金招聘Python工程师标准>>>
20181022 DAC测试链(TestNet)记录
1、DAC 文档
https://github.com/linkdt-tech/DAC/blob/master/doc/createAsset.md
2、按照文档安装后,进入 dacd 目录
cd /opt/
cd dacd_testnet/
** 直接在安装目录下运行,省却了 cfg 文件指定
3、启动 dacd
sudo ./dacd --conf="dacd.cfg"
*** 保持运行,请安装 pm2 (尝试失败,不认识 --conf ,待处理)
*** PM2 执行 dacd
pm2 start ./dacd
*** 查看 PM2 任务
pm2 list
4、查询是否运行
ps -ef |grep dacd
5、验证节点是否成功
sudo watch ./dacd -q --conf="dacd.cfg" server_info
查看服务器信息
./dacd server-info
6、生成网关(包含了钱包地址、私钥等)
sudo ./dacd wallet_propose
返回结果:
Loading: "/opt/dacd_testnet/dacd.cfg"
2018-Oct-22 05:19:45 HTTPClient:NFO Connecting to 127.0.0.1:15006
{
"id" : 1,
"result" : {
"account_id" : "z3gzHnHFh5URrvi1FBAodH4BLKmYbiRqvJ",
"key_type" : "secp256k1",
"master_key" : "WIT BEET OBOE BLOC ON GAIL COT BOOT TROD LEO ITCH BURY",
"master_seed" : "xnQiGESjh1NUwEdSyzAgxRc5peXss",
"master_seed_hex" : "C2FA1992BF9FCB0B10F7B2AC1BB78A45",
"public_key" : "cB4cBG8fK9Lu1FbGDQ7Qiw5DoKX9SSLGxCxXZaJAj4Fed743XXvE",
"public_key_hex" : "02116E8758889F3F6478DD064A11A03351A174F79A8C6980D10534626D5A92DE43",
"status" : "success"
}
}
*** 说明 ** account_id 是我的钱包地址 ** master_seed 是我的私钥
7、DAC 测试链浏览器,只能看到区块数据,没有账号、钱包、登录信息
http://test.dacindex.io/home
8、申明地址为网关(即打开网关标志)
sudo ./dacd submit xnQiGESjh1NUwEdSyzAgxRc5peXss
返回结果:
'{"Account":"z3gzHnHFh5URrvi1FBAodH4BLKmYbiRqvJ","Flags":0,"SetFlag":8,"TransactionType":"AccountSet"}'
*** 命令说明 sudo ./dacd submit master_seed '{"Account":"account_id","Flags":0,"SetFlag":8,"TransactionType":"AccountSet"}' master_seed : 不带引号 account_id : 带有引号
9、查询服务器信息
./dacd server_info
10、查询账户系统币信息
./dacd account_info z3gzHnHFh5URrvi1FBAodH4BLKmYbiRqvJ
11、再生成一个地址
./dacd wallet_propose
返回结果:
Loading: "/opt/dacd_testnet/dacd.cfg"
2018-Oct-22 07:05:03 HTTPClient:NFO Connecting to 127.0.0.1:15006
{
"id" : 1,
"result" : {
"account_id" : "zf4cFDSdGms8kWENAD2GX7pNz4NvxRsJgt",
"key_type" : "secp256k1",
"master_key" : "VERY ABEL CAN SLOG WONT DARN RUNS ADDS EYE BALD OATH POT",
"master_seed" : "xhw7v3VNVUhT4ovMX8ADcNoiLWaDD",
"master_seed_hex" : "696AAC284A1C49D4DFD2BFEF29F088F4",
"public_key" : "cBPQfnXdoUcjDJhr4vNyVuV5vZhBQ7gCMukT4GoDZLwJrsu4fmeH",
"public_key_hex" : "02BDD5B987435180562EC10BA505A33B1C57DAAED3E33E33341ECB988C3232D863",
"status" : "success"
}
}
./dacd wallet_propose
Loading: "/opt/dacd_testnet/dacd.cfg"
2018-Oct-22 07:19:02 HTTPClient:NFO Connecting to 127.0.0.1:15006
{
"id" : 1,
"result" : {
"account_id" : "z4yQ8uroT2eRHyM9vS8MwfaxfvDjMWhsyx",
"key_type" : "secp256k1",
"master_key" : "JUG BEE COIL HUGO SIP KEG REIN DRUM PAD DINE TEEM WOO",
"master_seed" : "xhexiiXwxX3sWqdXQqCBcP58VKnqT",
"master_seed_hex" : "8B88AE39C6E86ECE43C233CEA5D52021",
"public_key" : "cBP7Xfto8NgvxoS25S3EMzYtt4p73jG4y17fq2cMS6q44XVb9jYR",
"public_key_hex" : "02C7DBC7AFCCFE135A1162126F00DD65AEAF720F8B6AF66793409D3988926F7792",
"status" : "success"
}
}
12、转账测试 (以上 2 个地址之间: 地址1 给 地址2 10 DAC 试试)
./dacd submit xnQiGESjh1NUwEdSyzAgxRc5peXss '{"Account":"z3gzHnHFh5URrvi1FBAodH4BLKmYbiRqvJ","Amount":"10000000","Destination":"z4yQ8uroT2eRHyM9vS8MwfaxfvDjMWhsyx","TransactionType":"Payment"}'
说明:
./dacd submit master_seed '{"Account”:”source account_id","Amount”:”10000000”,”Destination”:”dest account_id","TransactionType":"Payment"}'