erigon-pulse/docs/readthedocs/source/installation.rst

51 lines
1.6 KiB
ReStructuredText
Raw Normal View History

2020-10-01 20:31:07 +00:00
==================
Installation Guide
==================
Prerequisite
============
To follow up this guide you need to have Golang installed, since we are going to use it to compile the code itself. you can find a tutorial on how to install Golang here: https://golang.org/doc/install.
Additionally, you may want to have git installed (but you can also download directly from Github): https://git-scm.com/book/en/v2/Getting-Started-Installing-Git.
Compiling
=========
In order to download the code and compile you need the following commands:
.. code-block:: sh
$ git clone https://github.com/ledgerwatch/turbo-geth
$ cd turbo-geth
$ make
Running
=======
After this is done, you can run turbo-geth by executing.
.. code-block:: sh
$ ./build/bin/tg
what this will do is start a sync process in mainnet.
RPC Daemon
==========
Unlike Go-Ethereum (geth), Turbo-Geth has a separate RPC service called rpcdaemon, this service is used for managin JSON RPC API. In fact, they are not present in turbo-geth with `--rpc` flag but we have to start a separate service for it. first of all turbo-geth must give access to the rpcdaemon to the database through an API. so we need to run turbo-geth with the flag **--private.api.addr** which by convention should be set to **localhost:9090**.
.. code-block:: sh
$ ./build/bin/tg --private.api.addr=localhost:9090
then to run the rpcdaemon attached to our node we just run
.. code-block:: sh
$ ./build/bin/rpcdaemon
now we can make use of the JSON RPC API at localhost:8545. in order to change the address in which we serve the API we can use the flag **--http.api=<something>**