您当前的位置: 首页 >  网络
  • 2浏览

    0关注

    284博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

运行shiden网络节点

区块链(Web3)开发工程师 发布时间:2022-02-26 22:57:02 ,浏览量:2

1. 启动服务器

最低 4+8+200G

推荐 8+16+500G

2. 下载shiden
wget https://github.com/AstarNetwork/Astar/releases/download/v3.9.0/astar-collator-3.9.0-ubuntu-x86_64.tar.gz
tar -zxvf astar-collator-3.9.0-ubuntu-x86_64.tar.gz
3. 启动shiden
./astar-collator \
--base-path /home/polkadot/shiden \
--name  Summer_Node \
--port 30333 \
--ws-port 9944 \
--rpc-port 9933 \
--telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \
--rpc-cors all \
--validator


创建秘钥
curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9933

{"jsonrpc":"2.0","result":"0x1a00d44408a21d51bd3e8c39f6bbcd9dba00c273c955912873ed0d935ef92c15","id":1}
4. 下载ksm
wget https://ksm-rocksdb.polkashots.io/kusama-11574721.RocksDb.tar.lz4

apt-get install liblz4-tool

cd /home/polkadot/shiden/polkadot/chains/ksmcc3

lz4 -d ~/ksm/kusama-11574721.RocksDb.tar.lz4

tar -xf kusama-14482975.RocksDb.tar 
5. 后台运行项目
打开screen 创建 screen 终端
# screen //创建 screen 终端

重新连接离开的 screen 终端
# screen -ls  //显示已创建的screen终端 
There are screens on:
2433.pts-3.linux    (2013年10月20日 16时48分59秒)    (Detached)
2428.pts-3.linux    (2013年10月20日 16时48分05秒)    (Detached)
2284.pts-3.linux    (2013年10月20日 16时14分55秒)    (Detached)
2276.pts-3.linux    (2013年10月20日 16时13分18秒)    (Detached)
4 Sockets in /var/run/screen/S-root.

# screen -r 2276 //连接 screen_id 为 2276 的 screen终端

退出终端
quit

输出日志到run.log
./astar-collator \
--base-path /home/polkadot/shiden \
--name  Summer_Node \
--port 30333 \
--ws-port 9944 \
--rpc-port 9933 \
--telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' \
--rpc-cors all \
--validator > run.log 2>&1 &

启动脚本:

start.sh
/www/collator/shiden/astar-collator --base-path /www/collator/shiden --name Summer_Node --port 30333 --ws-port 9944 --rpc-port 9933 --telemetry-url 'wss://telemetry.polkadot.io/submit/ 0' --rpc-cors all --validator > /www/collator/shiden/run.log 2>&1 & 

6. 创建运行者身份 

Set session keys​

Go to the Polkadot.js portal: Developper > Extrinsic

Select your collator account and extrinsic type: session / setKeys

Enter the session keys and set proof to 0x00

Submit the transaction.

Identity​

Set identity​

Go to the Polkadot.js portal: Accounts

Open the 3 dots next to your collators address: Set on-chain Identity

Enter all fields you want to set.

Send the transaction.

Request judgment​

Go to the Polkadot.js portal: Developper > Extrinsic

Select your collator account and extrinsic type: identity / requestJudgment

Send the transaction.

Bond funds​

To start collating, you need to have 32 000 SDN tokens for Shiden or 3 200 000 ASTR tokens for Astar.

Go to the Shibuya Polkadot.js portal: Developper > Extrinsic

Select your collator account and extrinsic type: CollatorSelection / registerAsCandidate

Submit the transaction.

生产区块​

Onboarding takes place at n+1 session

Once your collator is active, you will see your name inside Network tab every time you produce a block:

关注
打赏
1665194163
查看更多评论
立即登录/注册

微信扫码登录

0.0343s