

Zilliqa RPC节点(seed节点)搭建说明-mainnet(开发用,docker方式,非挖矿)
source link: http://www.blogjava.net/fangw/archive/2021/11/14/436047.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Zilliqa RPC节点(seed节点)搭建说明-mainnet(开发用,docker方式,非挖矿)
posts - 20,comments - 14,trackbacks - 0
前言:zilliqa开发用的RPC节点只需要启动个seed节点即可,非常方便,40多G空间,几十分钟就可以同步完,资源占用极小。否则如果部署full节点就不是这么简单了。
1.服务器
zilliqa的seed节点 需要100G SSD(建议NVMe)硬盘,实际数据占用40多G,docker占用1.3G多。cpu内存均不需要太高,4核8G足够。
建议国外服务器,10M以上,不需要cn2线路
3.操作系统
建议centos7/8,或ubuntu,这里均以centos为例
4.准备环境:
yum update -y
yum install screen iftop iotop -y
4.1.安装docker
略,不会的可以搜索或参考:
5.创建一个screen
screen -S zil
*注意1:最后退出时用ctrl+ad(顺序按a和d字母即可),不要用exit或ctrl+d退出会话。
*注意2:退出会话后,可以用screen -x heco重新连接到会话。
6.docker模式安装
mkdir /root/seed
cd /root/seed
wget https://mainnet-join.zilliqa.com/seed-configuration.tar.gz
tar -xvf seed-configuration.tar.gz
7.设置防火墙
firewall-cmd --permanent --zone=public --add-port=33133/tcp
firewall-cmd --permanent --zone=public --add-port=4201/tcp
firewall-cmd --reload
不懂防火墙配置的,可以先禁用防火墙,关于firewalld的使用技巧,之后会单独写一篇教程
8.启动seed节点(docker模式)
cd /root/seed
sh /root/seed/launch_docker.sh
按提示输入,注意ip要填写下(尽量服务器本机具备ipv4的公网ip)
成功后,会提示:
Use 'docker ps' to check the status of the docker
Use 'docker stop zilliqa' to terminate the container
Use 'tail -f zilliqa-00001-log.txt' to see the runtime log
If you have successfully completed the above steps,
you should have a functioning seed node that exposes an RPC API on localhost:4201.
You may further check the logs at zilliqa-00001-log.txt.
注意,默认4201端口暂时没有打开,这里翻译为人话,就是必须等同步完所有区块数据,才会开放4201端口。
9.查看日志
tail -f /root/seed/zilliqa-00001-log.txt
tail -f /root/seed/py_download_incr_DB.log
这里可以看到下载的日志
10.测试验证
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"GetNetworkId","params":[],"id":1}' http://127.0.0.1:4201
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"GetBlockchainInfo","params":[],"id":1}' http://127.0.0.1:4201
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"GetLatestDsBlock","params":[],"id":1}' http://127.0.0.1:4201
11.停止节点
docker stop zilliqa
注意,重启docker可能不会自动启动zilliqa的服务,可以通过:
docker exec -it zilliqa /bin/bash
进入docker的shell,执行:
ps -ef
查看是否有zilliqa的进程,如果重启服务器后,端口一直没有侦听,要注意下是否真的有启动起来zilliqa进程。
12.接口文档参考
RPC接口文档,如:
Introduction | Zilliqa Developer Portal
Introduction | Zilliqa Developer Portal
Introduction | Zilliqa Developer Portal
其它参考:
Zilliqa链github地址:
https://viewblock.io/zilliqa
https://devex.zilliqa.com/
https://explorer.zilliqa.com/
ZilLab Explorer -- Mainnet
13.注意事项
*同步到最高区块大概最快20分钟左右。
*相比来说,seed节点的资源和空间消耗非常低,一般可以与eth等节点部署在同一台,以节省成本。
Recommend
-
45
Today, one of the biggest problems plaguing the blockchain industry from moving forward is its inabi...
-
10
Gate.io芝麻开门已上线 Theta(THETA)和 Zilliqa(ZIL)永续合约交易(USDT结算)
-
90
区块链开发的体验还是有点差。 随着 Defi 的发展,智能合约开始相互调用。这给开发和测试带来了一定的难度。我们可以在本地搭建测试链,然后部署需要调用的外部合约。也可以直接使用测试网络,调用部署上面的外部合约。这两种方法都很麻烦。对于第一种...
-
11
基于 docker 搭建 zookeeper(3.4.14) 集群 (5个节点)docker-zk 基于 docker 搭建 zookeeper(3.4.14) 集群 (5个节点) 创建网络. docker network create -d bridge --subnet=192.168.0.0/24 --gateway=...
-
12
ETH 以太坊RPC节点部署搭建说明-mainnet(开发用,替代infura,非挖矿) 方伟的博客 j2ee技术、网络、web等,同名的人真多,我的QQ是20025404
-
19
HECO 火币生态链RPC节点部署搭建说明-mainnet(开发用,非挖矿) 方伟的博客 j2ee技术、网络、web等,同名的人真多,我的QQ是20025404 ...
-
262
bsc币安智能链RPC节点搭建说明-mainnet(非挖矿) - 方伟的博客 - BlogJava 方伟的博客 j2ee技术、网络、web等,同名的人真多,我的QQ是20025404 ...
-
5
PI官方推特再次说明做节点获得额外的挖矿奖励! huaren posted @ 2022年3月17日 21:54 in PI资讯新闻 , 26 阅读
-
9
2022-03-26 03:11 Zilliqa将于4月2日发布元宇宙即服务平台Metapolis 据Cryptoninjas报道,公链项目Zilliqa将于4月2日发布扩展现实(XR)元宇宙Metapolis,为其合作伙伴提供元宇宙即服务(MaaS)平台。借助Metapolis,Zilliqa...
-
6
新浪VR > 正文页 Zilliqa推出支持游戏引擎Unity的软件开发包Zilliqia SDK...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK