Lighthouse安装

首先体验了Lighthouse的安装,Lighthouse是基于Rust开发的,可查看下面官方提供的文档 LightHouse官方安装指南

Windows上安装

Rust在win上面安装比在Linux下面麻烦很多,经历了如下操作。

  • Download and install “Build Tools for Visual Studio:”
    You can get it at this link: https://aka.ms/buildtools.
    Run the installation file: vs_buildtools.exe.
    Ensure the “Windows 10 SDK” component is included when installing the Visual C++ Build Tools.
    Restart your computer.
  • Install LLVM: https://releases.llvm.org/download.html
  • Install OpenSSL with vcpkg:
mkdir C:Tools
cd C:Tools
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
.bootstrap-vcpkg.bat
.vcpkg.exe install openssl:x64-windows-static 

  • Finally, install cmake: https://cmake.org/download/

安装OpenSSL的时候使用vcpkg无法安装,下载了安装包OpenSSL-Win64,手动配置了环境变量。

OPENSSL_DIR  D:Program FilesOpenSSL-Win64
PATH %OPENSSL_DIR%bin

配置完这些发现,使用cargo build还是不能编译

error[E0433]: failed to resolve: could not find `unix` in `os`--> C:Usersmec.cargoregistrysrcgithub.com-1ecc6299db9ec823leveldb-sys-2.0.5src/build.rs:6:14|
6 | use std::os::unix::fs::PermissionsExt;|              ^^^^ could not find `unix` in `os`error[E0599]: no method named `mode` found for struct `std::fs::Permissions` in the current scope--> C:Usersmec.cargoregistrysrcgithub.com-1ecc6299db9ec823leveldb-sys-2.0.5src/build.rs:178:30|
178 |     let current_mode = perms.mode();|                              ^^^^ method not found in `std::fs::Permissions`error[E0599]: no method named `set_mode` found for struct `std::fs::Permissions` in the current scope--> C:Usersmec.cargoregistrysrcgithub.com-1ecc6299db9ec823leveldb-sys-2.0.5src/build.rs:179:11|
179 |     perms.set_mode(0o100 | current_mode);|           ^^^^^^^^ method not found in `std::fs::Permissions`error: aborting due to 3 previous errorsSome errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.

Lighthouse应该不支持Windows下开发,只支持类unix系统,欢迎高手解答。

Ubutu上安装

使用如下命令倒是很快就安装好了,

git clone https://github.com/sigp/lighthouse.git
cd lighthouse
make

编译的时候,还是出了如下错误

Compiling deposit_contract v0.2.0 (/home/mec/lighthouse/common/deposit_contract)
error: failed to run custom build command for `eth2_testnet_config v0.2.0 (/home/mec/lighthouse/common/eth2_testnet_config)`Caused by:process didn't exit successfully: `/home/mec/lighthouse/target/release/build/eth2_testnet_config-f6c233f0fcaa4ae3/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Failed to download boot_enr.yaml: error sending request for url (https://raw.githubusercontent.com/sigp/witti/6d079b0f10f6bed75cd003e5f0ea5ecbe2044455/lighthouse/boot_enr.yaml): error trying to connect: tcp connect error: Connection refused (os error 111)', common/eth2_testnet_config/build.rs:23:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtracewarning: build failed, waiting for other jobs to finish...
error: failed to compile `lighthouse v0.1.2 (/home/mec/lighthouse/lighthouse)`, intermediate artifacts can be found at `/home/mec/lighthouse/target`Caused by:failed to run custom build command for `deposit_contract v0.2.0 (/home/mec/lighthouse/common/deposit_contract)`Caused by:process didn't exit successfully: `/home/mec/lighthouse/target/release/build/deposit_contract-01a6d2323a5a771c/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'No abi file found. Failed to download from github: reqwest::Error { kind: Request, url: "https://raw.githubusercontent.com/ethereum/eth2.0-specs/v0.11.1/deposit_contract/contracts/validator_registration.json", source: hyper::Error(Connect, ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })) }', common/deposit_contract/build.rs:27:19
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

此问题是导致的,由于我是使用的虚拟机操作的,linux下shadowssock还没使用过,所以Lighthouse未编译通过。

Prysm安装

Prysm的安装可参考如下链接。Prysm安装指南

mkdir prysm && cd prysm
curl https://raw.githubusercontent.com/prysmaticlabs/prysm/master/prysm.bat --output prysm.bat
reg add HKCUConsole /v VirtualTerminalLevel /t REG_DWORD /d 1
.prysm.bat beacon-chain

这个好像是直接下载可行性程序,不需要源码编译,如果你只想运行验证人节点,不研究代码,到这就可以了。

mec@DESKTOP-5N9GNCR MINGW64 /d/GoSpace/src/github.com/prysmaticlabs/prysm/dist (master)
$ ls
beacon-chain-v1.0.0-alpha.11-windows-amd64.exe*        beacon-chain-v1.0.0-alpha.11-windows-amd64.exe.sig  beacon-chain-v1.0.0-alpha.9-windows-amd64.exe.sha256
beacon-chain-v1.0.0-alpha.11-windows-amd64.exe.sha256  beacon-chain-v1.0.0-alpha.9-windows-amd64.exe*      beacon-chain-v1.0.0-alpha.9-windows-amd64.exe.sig$ ./beacon-chain-v1.0.0-alpha.9-windows-amd64.exe
2020/06/16 13:11:55 maxprocs: Leaving GOMAXPROCS=8: CPU quota undefined
time="2020-06-16 13:11:55" level=info msg="Checking DB" database-path="C:UsersmecAppDataRoamingEth2/beaconchaindata" prefix=node
time="2020-06-16 13:11:55" level=info msg="Starting beacon node" prefix=node version="Prysm/Git commit: 3fe47c00433907176d44521d01ee97b1b0cab8ca. Built at: 2020-06-01 15:12:10+00:00"
time="2020-06-16 13:11:55" level=info msg="RPC-API listening on port" address="0.0.0.0:4000" prefix=rpc
time="2020-06-16 13:11:55" level=warning msg="You are using an insecure gRPC connection! Provide a certificate and key to connect securely" prefix=rpc
time="2020-06-16 13:11:56" level=info msg="Starting initial chain sync..." prefix=initial-sync
time="2020-06-16 13:11:56" level=info msg="Waiting for enough suitable peers before syncing" prefix=initial-sync required=3 suitable=0
time="2020-06-16 13:11:56" level=info msg="Blockchain data already exists in DB, initializing..." prefix=blockchain
time="2020-06-16 13:11:57" level=info msg="Connected to eth1 proof-of-work chain" endpoint="wss://goerli.prylabs.net/websocket" prefix=powchain
time="2020-06-16 13:11:58" level=info msg="Started discovery v5" ENR="enr:-LK4QL_gfZteEQHv0LWVPRiGJymGtsDwwNDAB2ZatNdMJoEvRgIWXR0st-0QjEYSI0vOKGCz8U5esULjLZUcBVGn2kYBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpDwccZsAAAAAP__________gmlkgnY0gmlwhMCoAQSJc2VjcDI1NmsxoQO9xYmOXZ2r6k97e0bsDGXKu6NxJ5d4CgXPqozcuPRFFYN0Y3CCMsiDdWRwgi7g" prefix=p2p
time="2020-06-16 13:12:00" level=info msg="Node started p2p server" multiAddr="/ip4/192.168.1.4/tcp/13000/p2p/16Uiu2HAmRRn7FK9y5CpvqFrsfFVSsmNVJhAxShxNsSuikABcuP8Q" prefix=p2p
time="2020-06-16 13:12:01" level=info msg="Waiting for enough suitable peers before syncing" prefix=initial-sync required=3 suitable=0
time="2020-06-16 13:12:17" level=info msg="Peer Connected" activePeers=1 direction=2 multiAddr="/ip4/139.9.179.216/tcp/13000/p2p/16Uiu2HAkyxw3s9cXNGHdrwi8aXujs6roro6n28Nsb8CAcnjRaSQs" peer=16Uiu2HAkyxw3s9cXNGHdrwi8aXujs6roro6n28Nsb8CAcnjRaSQs prefix=p2p
time="2020-06-16 13:12:17" level=info msg="Peer disconnected" active=0 peer=16Uiu2HAkyxw3s9cXNGHdrwi8aXujs6roro6n28Nsb8CAcnjRaSQs prefix=p2p
time="2020-06-16 13:12:21" level=info msg="Waiting for enough suitable peers before syncing" prefix=initial-sync required=3 suitable=0

Prysm代码配置

Prysm里面使用了go module,把代码下载下来,发现代码里面都是标红的。

https://github.com/prysmaticlabs/prysm.git
go get -t -v github.com/prysmaticlabs/prysm/...

起初以为是Go Module配置有问题,查阅了很多资料,使用如下命令老是超时。

go mod download
go mod tidy

直到找到了Goproxy 中国,设置了下代理。

# Go 1.13 及以上
$ go env -w GO111MODULE=on
$ go env -w GOPROXY=https://goproxy.cn,direct

代码很快就下载完了,里面的错误也没有了,终于可以运行里面的测试用例,和查看调用逻辑了。

=== RUN   TestCommitteeKeyFn_OK
--- PASS: TestCommitteeKeyFn_OK (0.00s)
PASS

vcpkg安装_以太坊2.0客户端(Prysm,lighthouse)安装体验相关推荐

  1. 以太坊2.0客户端Prysm缺陷导致信标链节点共损失15ETH,即将发布更新

    据官方消息,以太坊 2.0 客户端 Prysm 的开发团队 Prysmatic Labs 披露了昨日客户端缺陷的细节,他们表示使用 Prysm 的信标节点无法产生区块持续了 18 个纪元(约两小时), ...

  2. 以太坊2.0客户端Lighthouse发布v1.3.0版本,为高优先级建议立即更新

    官方消息,以太坊2.0客户端Lighthouse开发团队Sigma Prime表示,发布Lighthouse v1.3.0版本.该版本包括对信标链节点的重要错误修复,应将其视为所有质押者的高优先级,应 ...

  3. eos和以太坊有什么关系_以太坊 2.0是什么?

    ETH2.0 是以太坊的计划升级方案.在接下来的几年里,ETH2.0 的设计者们计划完全革新以太坊的共识系统,并引入以太坊现有的世界状态.由于涉及面极广,我们也无法准确地说明 ETH2.0 将包括或者 ...

  4. 以太坊怎么注册_以太坊2.0将至,牛市即将到来??

    以太坊2.0是一个宏大的项目,我们说它"宏大"不仅表现在性能的提升上,而且体现在整体架构的改变上.而以太坊性能的提升根本也是因为它整体架构的改变,当以太坊进化到20时,它现在架构中 ...

  5. 以太坊2.0怎么挖矿_以太坊2.0即将上线 现在正是挖矿红利期 普通人如何参与挖矿?...

    以太坊2.0 吹响牛市号角!以太坊从诞生至今,共经历了四个阶段,分别是Frontier.Homestead.Metropolis和Serenity,此次以太坊升级疏于第四阶段Serenity,其中最核 ...

  6. 以太坊 2.0:如何实现最终性

    首先,我们试着来理解什么是finality (最终性).[备注:也有译文将 finality 译为「确定性」] 你一定已经注意到,加密货币平台和 Dapps (去中心化应用) 通常都会等待几个区块被敲 ...

  7. 以太坊2.0 POS挖矿(ETH2 Staking)教程(一)Topaz测试网

    引言 由以太坊2.0客户端构建团队之一的Prysmatic Labs发布的以太坊2.0的第一个主网配置的测试网Topaz终于在4.15正式启动了.该测试网针对的是以太坊2.0第0阶段的测试,即实现信标 ...

  8. 来,让我们逐一澄清以太坊 2.0 五大误解

    来源 | 链闻ChainNews 作者 | Trenton Van Epps 译者 | 卢江飞 封图| CSDN 下载于视觉中国 以太坊 2.0 备受区块链行业关注,但外界也对其误解不少,本文选取了五 ...

  9. phpstduy8 redisClient 2.0 点不了_关于以太坊 2.0,你想知道的都在这里

    前天晚上 12 点左右,以太坊测试网的开发者宣布,ETH 2.0 的发布日期定在了 12 月 1 日(区块高度大于 1,606,824,000),主网的存款合约地址也正式生效.对于这则消息,V 神(V ...

最新文章

  1. HenCoder Android UI 部分 2-3 定制 Layout 的内部布局
  2. c#窗体程序生成错误_用C#语言做的窗体程序中出错恶劣怎么办?
  3. 收货地址 - 设置默认收货地址
  4. Uva 11354 LCA 倍增祖先
  5. Leetcode--438. 找到字符串中所有字母异位词
  6. [错误记录] --- rocketmq批量消费设置参数的问题
  7. 关于JS中使用JSON.parse长整型数丢失精度的问题解决
  8. 线程同步--信号量内核对象
  9. 方法大纲_社会工作师(中级)中级实务 考试大纲 附使用方法
  10. 基于变步长扰动观察法的最大功率点跟踪
  11. 三星系列机型 刷机的一些基本常识
  12. Python opencv局部直方图均衡增强
  13. Intel(R) WiFi Link 5100 AGN 破解无线网络 BT4正式版U盘启动
  14. docker中安装mongo3.2
  15. 网格交易法以及在数字货币中基于Python的量化实现
  16. cdr怎么把矩形去掉一个边_cdr画矩形怎么把中间弄掉
  17. 全靠这套面试题,历经一年学弟从家里到了阿里,只要有梦想总会实现的
  18. python RTL自动生成_利用python自动生成证件照
  19. win7电脑开不了机,CPU风扇转一下,停一下
  20. 开源项目车牌识别EasyPR的使用

热门文章

  1. Asp.Net中自以为是的Encode
  2. dd-wrt 定时重连 pppoe 更换ip地址
  3. 【Java并发编程】之十六:深入Java内存模型——happen-before规则及其对DCL的分析(含代码)...
  4. POJ_2478 Farey Sequence 【欧拉函数+简单递推】
  5. Bat脚本处理ftp超强案例解说
  6. vue2.0 element学习
  7. V-rep学习笔记:机器人逆运动学数值解法(Cyclic Coordinate Descent Method)
  8. 《校园封神榜》个人工作总结——第十天
  9. POJ 3159 Candies 差分约束dij
  10. ios沙盒机制与文件操作