eos区块链(第三代区块链技术EOS,本地安装)
本地安装EOS
EOS是bm(比特股创始人)最新研发的第三代区块链技术,每秒交易可达到百万级,以太坊每秒也只能达到几十笔。更适合高并发场景。
EOS的代码在github上开源,本文主要内容是如何在本地部署EOS。
-
系统:Mac最新版
-
依赖:Boost
-
OpenSSL
-
secp256k1-zkp
依赖环境安装
因为eos是由c++编写,所以我们需要安装cmake等编译工具。比特币价格如果是linux无需安装,mac需要安装xcode后才可
brew install automake autoconf libtool cmake
这里我们用homebrew包管理工具,更加简单方便些。
/usr/bin/ruby -e "$(curl -fsSL https!//raw。githubusercontent。com/Homebrew/install/master/install)"
Boost
brew install Boost
OpenSSL
brew install OpenSSL
注意⚠️:因为新版mac已经移除openssl,这里我们安装完需要配置下环境变量
export OPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1。0。2k
export OPENSSL_INCLUDE_DIR=/usr/local/Cellar/openssl/1。0。2k/includes
secp256k1-zkp
git clone https!//github。com/cryptonomex/secp256k1-zkp。git
Cd secp256k1-zkp
。/autogen。sh
。/configure
make
sudo make install
获取eos代码
git clone https!//github。com/eosio/eos --recursive
cd eos
cmake 。
make
我们跑一下测试代码
在tests/目录下,双击chain_test即可运行
运行eos
找到programs目录下eosd中,双击执行eosd
这时候会报错,需要我们修改下config。ini文件,全局搜索下此文件
加入
# Load the testnet genesis state, which creates some initial block producers with the default key
genesis-json = /path/to/eos/source/genesis。json
# Enable production on a stale chain, since a single-node test chain is pretty much always stale
enable-stale-production = true
# Enable block production with the testnet producers
producer-id = {"_id"!0}
producer-id = {"_id"!1}
producer-id = {"_id"!2}
producer-id = {"_id"!3}
producer-id = {"_id"!4}
producer-id = {"_id"!5}
producer-id = {"_id"!6}
producer-id = {"_id"!7}
producer-id = {"_id"!8}
producer-id = {"_id"!9}
producer-id = {"_id"!10}
# Load the block producer plugin, so we can produce blocks
plugin = eos!!producer_plugin
当然可以以Docker方式安装
https!//github。com/EOSIO/eos/里有
","content_hash"!"7149128f
评论