INFO:在 Ubuntu 系统中使用 HECO 二进制文件部署 HECO 主网同步节点_IDO价格

本文作者:toString

heco官网:https://www.hecochain.com/zh-cn/

heco链github地址:https://github.com/HuobiGroup/huobi-eco-chain/releases

主网区块链浏览器:https://hecoinfo.com/

主网链官方部署文档:https://docs.hecochain.com/#/dev/install

heco主网相关信息:https://docs.hecochain.com/#/mainnet

手续费:https://tc.hecochain.com/price/prediction

创世文件介绍:https://docs.hecochain.com/#/genesis

开发者文档:https://docs.hecochain.com/#/

注:因监管问题,hecochain.com域名相关的网页无法进行查看。

本篇文档开始之前,大概说明一下本次HECO同步的情况:

服务器环境服务器:阿里云服务器CPU:8核内存:32GB数据盘:1TSSD数据盘带宽:独享30M

软件环境Ubuntu20.04.3

一、下载HECO二进制文件

下载HECO二进制文件cd/data/hecowgethttps://github.com/HuobiGroup/huobi-eco-chain/releases/download/v1.2.0/geth-linux-amd64

授予可执行权限chmodxgeth-linux-amd64

二、编辑heco主网配置文件

编辑heco主网配置文件,主网配置文件可参考:https://docs.hecochain.com/#/dev/deploycd/data/hecocatconfig.tomlSyncMode="fast"TrieCleanCacheRejournal=300000000000GasFloor=8000000GasCeil=8000000GasPrice=0Recommit=3000000000Noverify=falseCacheDir="ethash"CachesInMem=2CachesOnDisk=3CachesLockMmap=falseDatasetDir="/data/heco/data/.ethash"DatasetsInMem=1DatasetsOnDisk=2DatasetsLockMmap=falsePowMode=0Locals=NoLocals=falseJournal="transactions.rlp"Rejournal=3600000000000PriceLimit=1PriceBump=10AccountSlots=16GlobalSlots=4096AccountQueue=64GlobalQueue=1024Lifetime=10800000000000DataDir="/data/heco/data"InsecureUnlockAllowed=trueNoUSB=trueIPCPath="geth.ipc"HTTPHost="0.0.0.0"HTTPPort=8545HTTPCors=HTTPVirtualHosts=HTTPModules=WSHost="0.0.0.0"WSPort=8546WSModules=GraphQLVirtualHosts=MaxPeers=50NoDiscovery=falseListenAddr=":32668"EnableMsgEvents=falseReadTimeout=30000000000WriteTimeout=30000000000IdleTimeout=120000000000

修改HECO主网配置文件HTTPHost:HTTP-RPC服务连接白名单,此参数的值默认为"localhost",仅允许本地可访问,可设置为:"0.0.0.0"

HTTPVirtualHosts:HTTP-RPC服务监听接口,此参数的值默认为,可设置为:HTTPVirtualHosts=

三、二进制启动HECO主网

3.1下载bsc主网快照数据

安装linux下的窗口管理器工具:screenapt-getinstallscreen-y

3.2启动HECO主网节点

screen-Sheco/data/heco/geth-linux-amd64--config/data/heco/config.toml--logpath/data/heco/logs

参数说明:

--config:指定HECO节点配置文件--logpath:指定HECO节点日志目录

查看节点日志启动状态#head-100chain.logINFOStartingGethonEthereummainnet...INFOBumpingdefaultcacheonmainnetprovided=1024updated=4096INFOMaximumpeercountETH=50LES=0total=50INFOSmartcardsocketnotfound,disablingerr="stat/run/pcscd/pcscd.comm:nosuchfileordirectory"WARNOptionnousbisdeprecatedandUSBisdeactivatedbydefault.Use--usbtoenableWARNSanitizingcachetoGo'sGClimitsprovided=4096updated=2606INFOSetglobalgascapcap=25,000,000WARNSanitizinginvalidminergaspriceprovided=0updated=1,000,000,000INFOAllocatedtriememorycachesclean=390.00MiBdirty=651.00MiBINFOAllocatedcacheandfilehandlesdatabase=/data/heco/data/geth/chaindatacache=1.27GiBhandles=32767INFOOpenedancientdatabasedatabase=/data/heco/data/geth/chaindata/ancientreadonly=falseINFOWritingdefaultmain-netgenesisblockINFOPersistedtriefrommemorydatabasenodes=5size=742.00Btime="37.858μs"gcnodes=0gcsize=0.00Bgctime=0slivenodes=1livesize=0.00BINFOInitialisedchainconfigurationconfig="{ChainID:128Homestead:0DAO:DAOSupport:trueEIP150:0EIP155:0EIP158:0Byzantium:0Constantinople:0Petersburg:0Istanbul:0,MuirGlacier:,RedCoastBlock:6618800,Berlin:8577000,London:8577000,Engine:congress}"INFOInitialisingEthereumprotocolnetwork=128dbversion=INFOLoadedmostrecentlocalheadernumber=0hash=5751d1..4cb144td=1age=10mo3w10hINFOLoadedmostrecentlocalfullblocknumber=0hash=5751d1..4cb144td=1age=10mo3w10hINFOLoadedmostrecentlocalfastblocknumber=0hash=5751d1..4cb144td=1age=10mo3w10hWARNFailedtoloadsnapshot,regeneratingerr="missingorcorruptedsnapshot"INFORebuildingstatesnapshotINFOJamConfigsanityPeriodsSecsold=0new=3INFOJamConfigsanityJamSecsold=0new=15INFOJamConfigsanityUnderPricedFactorold=0new=3INFOJamConfigsanityPendingFactorold=0new=1INFOJamConfigsanityMaxValidPendingSecsold=0new=300INFOResumingstatesnapshotgenerationroot=51729b..61d32faccounts=0slots=0storage=0.00Belapsed="544.689μs"INFOGeneratedstatesnapshotaccounts=4slots=0storage=259.00Belapsed="780.136μs"INFORegeneratedlocaltransactionjournaltransactions=0accounts=0INFOAllocatedfastsyncbloomsize=1.27GiBINFOGaspriceoracleisignoringthresholdsetthreshold=2INFOPredictionstartedcheckBlocks=20Interval=3ff=2mf=5lf=8minMi=500minLi=1000fp=75mp=90minCnt=100WARNErrorreadinguncleanshutdownmarkerserror="leveldb:notfound"INFOStartingpeer-to-peernodeinstance=Geth/v1.2.0-stable-f7849a80/linux-amd64/go1.13.4INFOStoredcheckpointsnapshottodisknumber=0hash=5751d1..4cb144INFONewlocalnoderecordseq=1id=ef7e229d842043a6ip=127.0.0.1udp=32668tcp=32668INFOStartedP2Pnetworkingself=enode://e1f394741c1e2e77797d04e42da63b9f52f3717d89a33f7317ef70f3b87511869127.0.0.1:32668INFOIPCendpointopenedurl=/data/heco/data/geth.ipcINFOHTTPserverstartedendpoint=:8545prefix=cors=*vhosts=*INFOWebSocketenabledurl=ws://:8546INFOInitializedstatebloomitems=9errorrate=0.000elapsed=18.155msERRORSnapshotextensionregistrationfailedpeer=98998f1aerr="peerconnectedonsnapwithoutcompatibleethsupport"INFONewlocalnoderecordseq=2id=ef7e229d842043a6ip=47.242.166.213udp=32668tcp=32668INFOBlocksynchronisationstartedINFOLookingforpeerspeercount=2tried=139static=0INFOLookingforpeerspeercount=2tried=98static=0INFOImportednewstateentriescount=273elapsed="3.638μs"processed=273pending=4369trieretry=0coderetry=0duplicate=0unexpected=0......INFOImportednewblockreceiptscount=2048elapsed=381.770msnumber=875,712hash=8f1f86..3a8931age=9mo2w5dsize=5.63MiB

四、查询是否同步完成

查看当前最新区块#curl-H"Content-Type:application/json"-XPOST--data'{"jsonrpc":"2.0","method":"eth_blockNumber","params":,"id":1}'http://127.0.0.1:8545{"jsonrpc":"2.0","id":1,"result":"0xa352a4"}

查看当前同步状态#curl-H"Content-Type:application/json"-XPOST--data'{"jsonrpc":"2.0","method":"eth_syncing","params":,"id":1}'http://127.0.0.1:8545{"jsonrpc":"2.0","id":1,"result":false}

注:结果为false为同步完成

以上,就是今天分享的全部内容了。

希望大家通过以上方式可以解决自己的实际需求,解决自己目前所遇到的问题。

如果在部署过程中有任何疑问,可以添加我的个人微信,备注:地区-职业方向-昵称,欢迎来撩,加入区块链技术交流群,与更多的区块链技术大佬学习交流。

原创不易,码字不易。觉得这篇文章对你有点用的话,麻烦你为本文点个赞,留言或转发一下,因为这将是我输出更多优质文章的动力,感谢!

参考资料

toString:https://learnblockchain.cn/people/3835

heco官网:https://www.hecochain.com/zh-cn/

heco链github地址:https://github.com/HuobiGroup/huobi-eco-chain/releases

主网区块链浏览器:https://hecoinfo.com/

主网链官方部署文档:https://docs.hecochain.com/#/dev/install

heco主网相关信息:https://docs.hecochain.com/#/mainnet

手续费:https://tc.hecochain.com/price/prediction

创世文件介绍:https://docs.hecochain.com/#/genesis

开发者文档:https://docs.hecochain.com/#/

免责声明:作为区块链信息平台,本站所发布文章仅代表作者个人观点,与链闻ChainNews立场无关。文章内的信息、意见等均仅供参考,并非作为或被视为实际投资建议。

本文来源于非小号媒体平台:

登链社区

现已在非小号资讯平台发布105篇作品,

非小号开放平台欢迎币圈作者入驻

入驻指南:

/apply_guide/

本文网址:

/news/10420204.html

免责声明:

1.资讯内容不构成投资建议,投资者应独立决策并自行承担风险

2.本文版权归属原作所有,仅代表作者本人观点,不代表非小号的观点或立场

上一篇:

每周编辑精选WeeklyEditors'Picks

郑重声明: 本文版权归原作者所有, 转载文章仅为传播更多信息之目的, 如作者信息标记有误, 请第一时间联系我们修改或删除, 多谢。

大币网

[0:0ms0-9:871ms