EOS:EOS Dawn 3.0 安裝指南
連結: https://zhuanlan.zhihu.com/p/35387518
連結: http://blog.eosdata.io/index.php/2018/04/07/eos-dawn-30-an-zhuang-zhi-nan/
連結:https://steemit.com/eos/@anantanand/eos-dawn-3-0-setup-instructions-for-developers-a-beginning-to-dawn-3-0
1. 下載原始碼
git clone https://github.com/EOSIO/eos --recursive
2. 編譯(安裝過程中需要下載依賴,需要翻牆)
cd eos
sudo ./eosio_build.sh
cd eos/build
sudo make install
3. 配置
a. 執行sudo nodeos
執行幾秒鐘,使用Ctrl+C退出。這樣會建立一個配置檔案,稍後修改。
b. 查詢配置檔案
find / -name genesis.json
/home/系統賬號/.local/share/eosio/nodeos/config/genesis.json
/home/eos目錄/programs/snapshot/genesis.json
c. 修改配置(/home/系統賬號/.local/share/eosio/nodeos/config/config.ini)
http-server-address = 0.0.0.0:8888(本機IP:埠)
genesis-json = /home/系統賬號/.local/share/eosio/nodeos/config/genesis.json
enable-stable-production = true
producer-name = eosio
#plugins:
plugin=eosio::producer_plugin
plugin=eosio::wallet_api_plugin
plugin=eosio::chain_api_plugin
plugin=eosio::http_plugin
plugin=eosio::account_history_api_plugin
可能遇到的問題
1. cleos get account eosio(返回:Failed to connect)
1351247ms thread-0 main.cpp:1158 main ] Failed with error: connect: 拒絕連線 (13)
connect: 拒絕連線:
解決辦法1:
cleos -H 192.168.1.11 -p 8888 --wallet-host 192.168.1.11 --wallet-port 8888 get account eosio(192.168.1.11是你自己的IP)
解決辦法2:
vim ~/.bash_aliases
alias cleos='cleos -H 192.168.1.11 -p 8888 --wallet-host 192.168.1.11 --wallet-port 8888'
重新開啟終端
2. fatal error: 'eosio.token/eosio.token.wast.hpp' file not found
/home/santi/bin/eos/libraries/testing/test.cpp:4:10: fatal error: 'eosio.token/eosio.token.wast.hpp' file not found
#include <eosio.token/eosio.token.wast.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
libraries/testing/CMakeFiles/chain_tester.dir/build.make:62: recipe for target 'libraries/testing/CMakeFiles/chain_tester.dir/test.cpp.o' failed
make[2]: *** [libraries/testing/CMakeFiles/chain_tester.dir/test.cpp.o] Error 1
CMakeFiles/Makefile2:2004: recipe for target 'libraries/testing/CMakeFiles/chain_tester.dir/all' failed
make[1]: *** [libraries/testing/CMakeFiles/chain_tester.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
>>>>>>>>>>>>>>>>>>>> MAKE building EOSIO has exited with the above error.
解決辦法:
cd build/contracts
sudo make
sudo eosio_build.sh
3. 升級到4.0後報錯
a. account_history_api_plugin -> history_api_plugin
b. 啟動nodeos時,新增引數--replay-blockchain或--resync-blockchain,否則會報錯
[email protected]:~$ sudo nodeos
130386ms thread-0 chain_plugin.cpp:125 plugin_initialize ] initializing chain plugin130391ms thread-0 main.cpp:101 main ] /home/santi/bin/eos/libraries/chainbase/src/chainbase.cpp(70): Throw in function chainbase::database::database(const bfs::path &, chainbase::database::open_flags, uint64_t)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: database created by a different compiler, build, boost version, or operating system