Comment installer un nœud EOS complet sur votre ordinateur ?
La documentation complète est disponible sur GitHub.
# dpkg-reconfigure tzdata
# apt-get update # apt-get install ntpdate # ntpdate pool.ntp.br
# apt-get install ntp
# mkdir /eos # cd /eos # git clone https://github.com/EOSIO/eos --recursive
# cd eos # ./eosio_build.sh
Do you wish to install these packages? 1) Yes 2) No #? 1
common.copy /root/opt/boost_1_66_0/lib/libboost_test_exec_monitor.a …failed updating 54 targets… …skipped 6 targets… …updated 15206 targets…
Installation of boost libraries failed. 1 Exiting now.
# ./eosio_build.sh
[ 86%] Building CXX object src/mongocxx/test [ 87%] Building CXX object src/mongocxx/test [ 88%] Building CXX object src/mongocxx/test
# /root/opt/mongodb/bin/mongod -f /root/opt/mongodb/mongod.conf &
# export PATH=${HOME}/opt/mongodb/bin:$PATH
# cd /eos/build
# make testRunning tests… Test project /eos/build Start 1: test_cypher_suites 1/31 Test #1: test_cypher_suites ………………… Passed 0.02 sec Start 2: validate_simple.token_abi 2/31 Test #2: validate_simple.token_abi ………….. Passed 0.02 sec
# cd /eos/build # make install
# nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::chain_api_plugin --plugin eosio::account_history_api_plugin
Vous devriez voir les messages de production de blocs :
* ------ NEW CHAIN ------ * * - Welcome to EOSIO! - * * ----------------------- * eosio generated block 5987ac50… #1 @ 2018-04-19T03:45:55.000 with 0 trxs, lib: 0 eosio generated block 1142d387… #2 @ 2018-04-19T03:45:55.500 with 0 trxs, lib: 1 eosio generated block 78e6a7be… #3 @ 2018-04-19T03:45:56.000 with 0 trxs, lib: 2 eosio generated block 5e1e5990… #4 @ 2018-04-19T03:45:56.500 with 0 trxs, lib: 3
$ git clone https://github.com/EOSIO/eos.git --recursive $ cd eos/Docker $ docker build -t eosio/eos
$ docker run --name nodeos -p 8888:8888 -p 9876:9876 -t eosio/eos nodeosd.sh arg1 arg2
Votre nœud complet local est désormais fonctionnel !
Panneau de configuration -> Mise à jour et sécurité -> Pour les développeur. Activer l’option “Mode développeur” dans la section “Utiliser les fonctionnalités de développement”.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
sudo apt update sudo apt full-upgrade
Ce chemin d‘accès sera représenté sous Linux par “mnt/c/EOS”.
Ensuite, les commandes suivantes devront être exécutée dans la console Ubuntu de Visual Studio Code (“Afficher” -> “Terminal Intégré” ou Ctrl + ù.)
export WORKSPACE_DIR=/mnt/c/EOS
export EOSIO_INSTALL_DIR=${WORKSPACE_DIR}/eos
export EOS_PROGRAMS=${EOSIO_INSTALL_DIR}/build/programs
export TEMP_DIR=/tmpecho "export WORKSPACE_DIR=${WORKSPACE_DIR}" >> ~/.bashrc
echo "export EOSIO_INSTALL_DIR=${EOSIO_INSTALL_DIR}" >> ~/.bashrc
echo "export EOS_PROGRAMS=${EOS_PROGRAMS}" >> ~/.bashrcsudo apt install cmake sudo apt install git
cd ${WORKSPACE_DIR}
git clone https://github.com/eosio/eos --recursivecd ${EOSIO_INSTALL_DIR}
./eosio_build.sh ubuntu fullcd /eos/build sudo make install
cd ${EOS_PROGRAMS}/nodeos &&./nodeos
Production des blocs :
Localiser le chemin d’accès au fichier genesis.json. Dans notre exemple, il s’agit de /mnt/c/EOS/eos/build/genesis.json
Éditer le fichier config.ini (dans notre exemple, il se trouve ici : C:\EOS\eos\build\programs\nodeos\data-dir\config.ini) en utilisant le bloc-note ou tout autre éditeur de texte; localiser l’entrée enable-stale-production et la changer en : enable-stale-production = true.
Ensuite, ajouter au fichier config.ini les lignes ci-dessous :
genesis-json = /mnt/c/EOS/eos/build/genesis.json producer-name = inita producer-name = initb producer-name = initc producer-name = initd producer-name = inite producer-name = initf producer-name = initg producer-name = inith producer-name = initi producer-name = initj producer-name = initk producer-name = initl producer-name = initm producer-name = initn producer-name = initq producer-name = initr producer-name = inits producer-name = initt producer-name = initu plugin = eos::producer_plugin plugin = eos::chain_api_plugin plugin = eos::wallet_api_plugin plugin = eos::account_history_api_plugin plugin = eos::http_plugin
cd ${EOS_PROGRAMS}/nodeos && ./nodeos
232901ms thread-0 chain_plugin.cpp:80 plugin_initialize ] initializing chain plugin 232902ms thread-0 producer_plugin.cpp:159 plugin_initialize ] Public Key: EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV 232903ms thread-0 http_plugin.cpp:132 plugin_initialize ] host: 127.0.0.1 port: 8888 232905ms thread-0 http_plugin.cpp:135 plugin_initialize ] configured http to listen on 127.0.0.1:8888 232998ms thread-0 producer_plugin.cpp:170 plugin_startup ] producer plugin: plugin_startup() begin 232999ms thread-0 producer_plugin.cpp:175 plugin_startup ] Launching block production for 19 producers. ******************************* * * * ------ NEW CHAIN ------ * * - Welcome to EOS! - * * ----------------------- * * * ******************************* Your genesis seems to have an old timestamp Please consider using the --genesis-timestamp option to give your genesis a recent timestamp 233012ms thread-0 producer_plugin.cpp:185 plugin_startup ] producer plugin: plugin_startup() end 233012ms thread-0 http_plugin.cpp:147 plugin_startup ] start processing http thread 233059ms thread-0 http_plugin.cpp:224 add_handler ] add api url: /v1/account_history/get_transaction 233060ms thread-0 http_plugin.cpp:224 add_handler ] add api url: /v1/account_history/get_transactions 237003ms thread-0 chain_controller.cpp:235 _push_block ] initq #1 @2017-09-29T16:03:57 | 0 trx, 0 pending, exectime_ms=0 237005ms thread-0 producer_plugin.cpp:233 block_production_loo ] initq generated block #1 @ 2017-09-29T16:03:57 with 0 trxs 0 pending 240003ms thread-0 chain_controller.cpp:235 _push_block ] initc #2 @2017-09-29T16:04:00 | 0 trx, 0 pending, exectime_ms=0 240004ms thread-0 producer_plugin.cpp:233 block_production_loo ] initc generated block #2 @ 2017-09-29T16:04:00 with 0 trxs 0 pending 243003ms thread-0 chain_controller.cpp:235 _push_block ] initd #3 @2017-09-29T16:04:03 | 0 trx, 0 pending, exectime_ms=0
cd ${EOSIO_INSTALL_DIR} git pull rm -r build && mkdir build && cd build export BOOST_ROOT=${HOME}/opt/boost_1_64_0 cmake -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_C_COMPILER=clang-4.0 \ -DCMAKE_CXX_COMPILER=clang++-4.0 \ -DWASM_LLVM_CONFIG=${HOME}/opt/wasm/bin/llvm-config \ -DBINARYEN_BIN=${HOME}/opt/binaryen/bin \ -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl \ -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib \ ../ && make