{"id":413,"date":"2020-08-26T08:36:18","date_gmt":"2020-08-26T07:36:18","guid":{"rendered":"http:\/\/blog.bellanca-web.com\/?p=413"},"modified":"2020-08-28T20:49:52","modified_gmt":"2020-08-28T19:49:52","slug":"theta-network-installer-un-noeud-et-explorer","status":"publish","type":"post","link":"https:\/\/blog.bellanca-web.com\/?p=413","title":{"rendered":"Theta Network &#8211; Installer un noeud et explorer"},"content":{"rendered":"\n<p>EN COURS DE REDACTION<\/p>\n\n\n\n<p>Ce petit tuto a pour but d&rsquo;installer tout ce qui est n\u00e9cessaire afin d&rsquo;avoir un explorateur de blockchain sur une machine locale.<\/p>\n\n\n\n<p>Il consiste en les \u00e9tapes suivantes :<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Installer un noeud Theta<\/li><li>Installer un une base de donn\u00e9es NoSQL (Blockchain Data Crawler)<\/li><li>Installer l&rsquo;API d&rsquo;application en arri\u00e8re-plan<\/li><li>Installer l&rsquo;application web de l&rsquo;explorateur<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Installations<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Noeud Theta<\/h3>\n\n\n\n<p>On commence par installer un noeud Theta ledger. Toutes les indications sont donn\u00e9es ici : <a href=\"https:\/\/github.com\/thetatoken\/theta-mainnet-integration-guide\/blob\/master\/docs\/setup.md\">https:\/\/github.com\/t<\/a><a href=\"https:\/\/github.com\/thetatoken\/theta-mainnet-integration-guide\/blob\/master\/docs\/setup.md\" target=\"_blank\" rel=\"noreferrer noopener\">hetatoken\/theta-mainnet-integration-guide\/blob\/master\/docs\/setup.md<\/a><\/p>\n\n\n\n<p>L&rsquo;installation d\u00e9marre un noeud en mode \u00ab\u00a0private\u00a0\u00bb (local).<\/p>\n\n\n\n<p>Ensuite, il faut connecter le noeud sur le Mainnet. Suite les instructions suivantes : <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/thetatoken\/theta-mainnet-integration-guide\/blob\/master\/docs\/mainnet.md#connect-to-the-mainnet\" target=\"_blank\">https:\/\/github.com\/thetatoken\/theta-mainnet-integration-guide\/blob\/master\/docs\/mainnet.md#connect-to-the-mainnet<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Mise \u00e0 jour du noeud<\/h4>\n\n\n\n<p>D\u00c9CRIRE LES OPERATIONS N\u00c9CESSAIRES POUR FAIRE LA MISE A JOUR DU NOEUD.<\/p>\n\n\n\n<p>Tester la m\u00e9thode <a href=\"https:\/\/www.coincashew.com\/coins\/overview-eth\/guide-how-to-stake-on-eth2-with-lighthouse\" target=\"_blank\" rel=\"noreferrer noopener\">\u00ab\u00a0git pull\u00a0\u00bb<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Charger les fichiers de l&rsquo;explorer<\/h3>\n\n\n\n<p>Pour charger les fichiers, il faut taper la commande suivante :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git clone --branch master https:\/\/github.com\/thetatoken\/theta-infrastructure-ledger-explorer.git $GOPATH\/src\/github.com\/thetatoken\/theta-infrastructure-ledger-explorer<\/code><\/pre>\n\n\n\n<p>Il faut \u00e9galement installer node.js et npm.<\/p>\n\n\n\n<p>Pour se faire, il suffit de taper les commandes suivantes :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install nodejs\nsudo apt install npm<\/code><\/pre>\n\n\n\n<p>Il faut \u00e9galement installer node-schedule :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npm install node-schedule<\/code><\/pre>\n\n\n\n<p>Lors de l&rsquo;installation, il y aura peut-\u00eatre une indication de vuln\u00e9rabilit\u00e9. Il suffit de suivre les indications pour les r\u00e9soudre.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Base de donn\u00e9e NoSQL<\/h3>\n\n\n\n<p>L&rsquo;installation de la base de donn\u00e9es NoSQL MongoDB est <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/thetatoken\/theta-infrastructure-ledger-explorer#blockchain-data-crawler\" target=\"_blank\">expliqu\u00e9e ici, sous le chapitre \u00ab\u00a0Blockchain Data Crawler\u00a0\u00bb<\/a>.<\/p>\n\n\n\n<p>Il est possible de modifier la localisation de stockage de MongoDB (pour par exemple le faire pointer sur un autre disque). Pour ce faire, il faut modifier le fichier \/etc\/mongod.conf (<a rel=\"noreferrer noopener\" href=\"https:\/\/docs.mongodb.com\/manual\/tutorial\/install-mongodb-on-ubuntu\/\" target=\"_blank\">explication compl\u00e8te ici<\/a>) :<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>The official MongoDB package includes a&nbsp;<a href=\"https:\/\/docs.mongodb.com\/manual\/reference\/configuration-options\/#conf-file\">configuration file<\/a>&nbsp;(<code>\/etc\/mongod.conf<\/code>). These settings (such as the data directory and log directory specifications) take effect upon startup. That is, if you change the configuration file while the MongoDB instance is running, you must restart the instance for the changes to take effect.<\/p><\/blockquote>\n\n\n\n<p><span class=\"has-inline-color has-vivid-red-color\">V\u00e9rifier s&rsquo;il n&rsquo;est pas n\u00e9cessaire de faire de la configuration<\/span> (\u00e0 compl\u00e9ter lors des tests) avant le d\u00e9marrage du data crawler (il me semble que oui, d&rsquo;apr\u00e8s ce que j&rsquo;ai vu sur le fichier de config).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">API en backend<\/h3>\n\n\n\n<p>Cette \u00e9tape est facultative. Elle permets d&rsquo;activer <a href=\"https:\/\/github.com\/thetatoken\/theta-infrastructure-ledger-explorer\/blob\/master\/docs\/api.md#api-reference\" target=\"_blank\" rel=\"noreferrer noopener\">une API REST<\/a>.<\/p>\n\n\n\n<p>Suivre les indications pr\u00e9sent\u00e9s <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/thetatoken\/theta-infrastructure-ledger-explorer#backend-api-application\" target=\"_blank\">ici dans le chapitre \u00ab\u00a0Backend API Application\u00a0\u00bb<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Explorateur Web<\/h3>\n\n\n\n<p>Cette \u00e9tape est facultative. Elle permet d&rsquo;avoir une application Web pour explorer la blockchain Theta.<\/p>\n\n\n\n<p>Il suffit de suivre les indications pr\u00e9sent\u00e9es <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/thetatoken\/theta-infrastructure-ledger-explorer#frontend-web-application\" target=\"_blank\">ici, dans le chapitre \u00ab\u00a0Frontend Web Application\u00a0\u00bb<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Interroger la base MongoDB<\/h2>\n\n\n\n<p>Quelles sont les structures des donn\u00e9es stock\u00e9es ?<\/p>\n\n\n\n<p>Comment r\u00e9cup\u00e9rer le total de rewards (staking) d&rsquo;une adresse sur une p\u00e9riode donn\u00e9e ?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>EN COURS DE REDACTION Ce petit tuto a pour but d&rsquo;installer tout ce qui est n\u00e9cessaire afin d&rsquo;avoir un explorateur de blockchain sur une machine locale. Il consiste en les \u00e9tapes suivantes : Installer un noeud Theta Installer un une base de donn\u00e9es NoSQL (Blockchain Data Crawler) Installer l&rsquo;API d&rsquo;application en arri\u00e8re-plan Installer l&rsquo;application web &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.bellanca-web.com\/?p=413\" class=\"more-link\">Continuer la lecture<span class=\"screen-reader-text\"> de &laquo;&nbsp;Theta Network &#8211; Installer un noeud et explorer&nbsp;&raquo;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37,5,38,6],"tags":[],"class_list":["post-413","post","type-post","status-publish","format-standard","hentry","category-cryptomonnaie","category-linux","category-theta","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/blog.bellanca-web.com\/index.php?rest_route=\/wp\/v2\/posts\/413","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bellanca-web.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bellanca-web.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bellanca-web.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bellanca-web.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=413"}],"version-history":[{"count":11,"href":"https:\/\/blog.bellanca-web.com\/index.php?rest_route=\/wp\/v2\/posts\/413\/revisions"}],"predecessor-version":[{"id":425,"href":"https:\/\/blog.bellanca-web.com\/index.php?rest_route=\/wp\/v2\/posts\/413\/revisions\/425"}],"wp:attachment":[{"href":"https:\/\/blog.bellanca-web.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bellanca-web.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bellanca-web.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}