用steem官方docker镜像中的命令行钱包cli_wallet将账号提升为见证人witness账号
目录
1. 目标
2. 主要流程
3. 搭建本地环境
4. 获取官方镜像
5. docker方式运行 cli_wallet
6. 导入账号的密钥
7. 生成见证人需要的密钥对
8. 更新见证人到steem链上
9. 投票给新发布的见证人
1. 目标
steem中的见证人witness账号,只是普通账号,最一个特别的声明.但可惜的是,网络上找不到完整有效的最新中文教程,怎么把普通账号升级为见证人账号.
目前steem刚完成硬分叉22,在源代码中的代号为HF22,网络上的英文教程和以及第三方工具都已经无法操作.
所以本文不依赖第三方工具,直接利用steem官方docker镜像中的命令行钱包 cli_wallet
,将账号提升为见证人账号.这样做,更加安全.
cli_wallet 是 Steem 的命令行钱包,可直接和 Steem 节点交互,完成很多重要的钱包相关的操作;升级账号为见证人,也可以通过这个钱包实现.
不过cli_wallet需要Steem节点支持WebSocket RPC(ws/wss),暂时以比较容易访问的wss://steemd.privex.io
作为交互节点服务器.后续可以出专门的教程,搭建自己的节点服务器.
2. 主要流程
- 搭建本地环境
- 获取官方镜像
- docker方式运行 cli_wallet
- 导入账号的密钥
- 生成见证人需要的密钥对
- 更新见证人到steem链上
- 投票给新发布的见证人
3. 搭建本地环境
ubuntu18.04 安装 docker
这里以ubuntu18.04为例,安装docker包:
$ sudo apt update && sudo apt install git containerd docker.io -y
启动服务:$ service docker restart
查看日志:$ systemctl status docker.service
添加专用系统账户 steemd
添加专用系统账户 steemd,并加入到 docker 组,steemd用户可直接运行docker:
$ sudo adduser steemd
$ sudo usermod -aG sudo steemd
$ sudo usermod -aG docker steemd
$ sudo su - steemd
4. 获取官方镜像
使用steem官方的 docker 镜像(也可以自己从github上下载源码编译):
$ docker pull steemit/steem
查看获取情况 :
$ docker images | grep steemit
steemit/steem latest 1326e0 1 weeks ago 2.24GB
如果无法访问官方 docker.com/docker.io ,可修改镜像源:
$ sudo vi /etc/docker/daemon.json
{
"registry-mirrors": ["https://registry.docker-cn.com","http://hub-mirror.c.163.com"]
}
其他可选:
- 中国科技大学:https://docker.mirrors.ustc.edu.cn
- Docker 官方中国区:https://registry.docker-cn.com
- 网易:http://hub-mirror.c.163.com
- 阿里云:https://pee6w651.mirror.aliyuncs.com
5. docker方式运行 cli_wallet
以docker镜像方式运行 cli_wallet:
$ docker run -it steemit/steem /usr/local/steemd-default/bin/cli_wallet -s wss://steemd.privex.io
返回信息:
Logging RPC to file: logs/rpc/rpc.log
Starting a new wallet
36ms main.cpp:169 main ] wdata.ws_server: wss://steemd.privex.io
Please use the set_password method to initialize a new wallet before continuing
new >>>
首次使用,需要设置本地钱包密码:
new >>> set_password yourpwd
返回信息:
new >>> set_password yourpwd
set_password yourpwd
null
locked >>>
解锁钱包:
locked >>> unlock yourpwd
返回信息:
locked >>> unlock yourpwd
unlock yourpwd
null
unlocked >>>
如无反应,可能是 cli_wallet 断开了和steem节点间的连接;则ctrl+d退出,重新登录 cli_wallet
6. 导入账号的密钥
导入账号的钱包密钥(active key):
unlocked >>> import_key 5J-account-active-key
返回信息:
import_key 5J-account-active-key
3571ms wallet.cpp:42 save_wallet_file ] saving wallet to file wallet.json
true
unlocked >>>
7. 生成见证人需要的密钥对
生成见证人打包区块所需要的密钥对:
unlocked >>> suggest_brain_key
suggest_brain_key
{
"brain_priv_key": "WACE be your words COGNATE",
"wif_priv_key": "5J-wif_priv_key-str",
"pub_key": "STM-pub_key-str"
}
unlocked >>>
其中:
wif_priv_key
为私钥,见证人节点服务器运行steemd时需要配置的密钥,用来生产区块时的签名;pub_key
为公钥,需要发布到steem区块链上,供全网应用。
8. 更新见证人到steem链上
用 'update_witness' 命令将公钥
pub_key
发布到链上:unlocked >>> update_witness "tex.fund" "https://tex.fund" "STM-pub_key-str" {"account_creation_fee":"3.000 STEEM","maximum_block_size":655360,"sbd_interest_rate":0} true
其中:
- "tex.fund" : 为见证人账号
- "https://tex.fund": 为见证人链接,可以是独立官网,也可以是steemit官网 #witness-category 标签下的见证人公告贴子,方便别人了解.
返回信息:
{
"ref_block_num": 26255,
"ref_block_prefix": 597975414,
"expiration": "2019-10-13T15:03:09",
"operations": [[
"witness_update",{
"owner": "tex.fund",
"url": "https://tex.fund",
"block_signing_key": "STM6MiTh",
"props": {
"account_creation_fee": "3.000 STEEM",
"maximum_block_size": 655360,
"sbd_interest_rate": 0,
"account_subsidy_budget": 797,
"account_subsidy_decay": 347321
},
"fee": "0.000 STEEM"
}
]
],
"extensions": [],
"signatures": [
"1f6b5aba87d2da1"
],
"transaction_id": "fe24df02c",
"block_num": 37250704,
"transaction_num": 14
}
9. 投票给新发布的见证人
自己先给自己的见证人投一票吧:浏览器打开 https://steemitwallet.com/~witnesses .
太详细了,很多教程都是把账号的active key作为见证人的密钥,很显然不符合逻辑.还是这篇文章讲密钥对,比较合理.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
因为详细,所以被毙了(downvote),呵呵
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
见证人不需要节点服务器吗?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
老大,咱是不是也搞一个?很高大上啊
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
靠,你们搞帮派啦?还是拖拉机啊!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
高啊搞啊!shop
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
搞吧,呵呵
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
你好鸭,manabot3!
@manabank给您叫了一份外卖!
由 @annepink 萍萍 迎着闪电 徒步 给您送来
四喜丸子
吃饱了吗?跟我猜拳吧! 石头,剪刀,布~
如果您对我的服务满意,请不要吝啬您的点赞~
@onepagex
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
需要啊,节点服务不需要见证人账号(但是不能生产区块数据了).见证人账号也设置到节点服务的配置中,全网才能计算有效时间,还需要投票数量,连着累积,才能出块,获得奖励呢.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
都是牛人啊
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
这样啊,我明天搭一个见证人试试!thumbup
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
除非用于研发,否则没有人投票,很难参与区块生产吧?很费钱?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
那要是不要了,能取消见证人吗?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
庆祝一下!shop
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hello @acu.fund! You are amazing!
command: !thumbup is powered by witness @justyy and his contributions are: https://steemyy.com
More commands are coming!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
你好鸭,acu.fund!
@sherryzhou给您叫了一份外卖!
由 @honoru 米高 迎着台风 骑着飞鸽 给您送来
高端大气巧克力
吃饱了吗?跟我猜拳吧! 石头,剪刀,布~
如果您对我的服务满意,请不要吝啬您的点赞~
@onepagex
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
进不了TOP20,好像都亏钱呢,目前steem都跌倒TOP 88了,谁敢投啊?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
就当一个博客内容的备份平台,不花钱,不是挺好的?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
进TOP20不太容易呢,中文区一个也没有,没见过不重视中文市场,能搞好的区块链项目.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
靠这个挣钱?想钱想疯了吧?你
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Flagged for collusive voting @steemflagrewards
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Steem Flag Rewards mention comment has been approved for SFR Token Issuance!
Tokens will be transferrred when the flagged content reaches payout.
Thank you for reporting this abuse, @lebin.
The votes on the content follows a repeated pattern suggestive of collusion between multiple users and /or alt accounts resulting in signficant overvaluation of content.
This post was submitted via our Discord Community channel. Check us out on the following link!
SFR Discord
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
我也想搭建一个见证人服务器呢,要不我帮你把这个教程翻译英文版?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
是应该扩大中文社区的世界影响力,好文就要走出世界,应该组织一个翻译队,也翻译成韩文、日文.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
可惜,我也只会英文.
很期待会日韩文,是什么样子?:)美女比较多吧?
steem上中文社区美女不多吧?
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
学习了.
那些老外文章,真心看不懂
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
写得真够详细,想操作错误,都难:)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
中文区有哪些见证人啊?应该有个中文区的群组,大家即时交流互动.
别用WX了,都FQ了,还用!discord最好
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
中文区有几个见证人大牛啊?有TOP20的吗?扶持一下新手吗:(
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
老大,怎么被downvote了?默哀一下!呵呵
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@ocdb25 @threespeak
能知道你们为何为这篇文章downvote吗?这是篇原创文章啊?!内容有问题吗?谢谢
Can I know why you downvote for this article? This is an original article?! Is there a problem with the content?thanks
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@tipu nominate
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Flagged for collusive voting @steemflagrewards
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Steem Flag Rewards mention comment has been approved for SFR Token Issuance!
Tokens will be transferrred when the flagged content reaches payout.
Thank you for reporting this abuse, @lebin.
The votes on the content follows a repeated pattern suggestive of collusion between multiple users and /or alt accounts resulting in signficant overvaluation of content.
This post was submitted via our Discord Community channel. Check us out on the following link!
SFR Discord
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@tipu curate 8
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Flagged for collusive voting @steemflagrewards
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Steem Flag Rewards mention comment has been approved for SFR Token Issuance!
Tokens will be transferrred when the flagged content reaches payout.
Thank you for reporting this abuse, @lebin.
The votes on the content follows a repeated pattern suggestive of collusion between multiple users and /or alt accounts resulting in signficant overvaluation of content.
This post was submitted via our Discord Community channel. Check us out on the following link!
SFR Discord
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Upvoted 👌
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
支持您的DIY贴子
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @tex.fund! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
Do not miss the last post from @steemitboard:
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
好注意呢,赶紧的吧
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
很有道理哎,支持搞起
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Flagged for collusive voting @steemflagrewards
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Steem Flag Rewards mention comment has been approved for SFR Token Issuance!
Tokens will be transferrred when the flagged content reaches payout.
Thank you for reporting this abuse, @lebin.
The votes on the content follows a repeated pattern suggestive of collusion between multiple users and /or alt accounts resulting in signficant overvaluation of content.
This post was submitted via our Discord Community channel. Check us out on the following link!
SFR Discord
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
搞一个中文区的见证人联盟:)!BEER
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
好主意,算我一个:)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Downvoted for vote farming.
@steemflagrewards
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Steem Flag Rewards mention comment has been approved for SFR Token Issuance!
Tokens will be transferrred when the flagged content reaches payout.
Thank you for reporting this abuse, @enforcer48.
You're churning out content (often low quality), in quick successions with abnormal number and/or upvote size.
This post was submitted via our Discord Community channel. Check us out on the following link!
SFR Discord
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Sorry, you don't have enough staked BEER in your account. You need 6 BEER in your virtual fridge to give some of your BEER to others. To view or trade BEER go to steem-engine.com
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit