|
1 | | -# blockchain-access-layer-ethereum-plugin |
| 1 | +# blockchain-access-layer-ethereum-plugin |
| 2 | + |
| 3 | +### Running a Local geth Node |
| 4 | + |
| 5 | +A geth node is used to access the Ethereum network. For development purposes, it is advised not to connect to the main |
| 6 | +Ethereum network, but rather to one of the testnets. |
| 7 | +(another, more difficult option would be to run a local private Ethereum network). In order to connect a geth node |
| 8 | +to [Rinkeby](https://www.rinkeby.io) (one of Ethereum testnets), you can follow these steps: |
| 9 | + |
| 10 | +1. [Install geth](https://github.com/ethereum/go-ethereum/wiki/Installing-Geth): |
| 11 | + this differs depending on your operating system. |
| 12 | +2. Run geth in the fast-sync mode: This option downlaoads the whole blockchain but does not re-execute all transactions. |
| 13 | + Syncing the whole testnet blockchain (which is done once only) takes about 1-4 hours (depending on the hardware, the |
| 14 | + speed of the network connection, and the availability of peers). To start a geth node in the fast-sync mode, execute |
| 15 | + the following command: |
| 16 | + ``` |
| 17 | + geth --rpcapi personal,db,eth,net,web3 --rpc --rinkeby --cache=2048 --rpcport "8545" |
| 18 | + --bootnodes= |
| 19 | + enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@52.169.42.101:30303, |
| 20 | + enode://343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8@52.3.158.184:30303, |
| 21 | + enode://b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6@159.89.28.211:30303 |
| 22 | + ``` |
| 23 | + If you want your node to be accessible remotely, apart from configuring your firewall, you also need to use the |
| 24 | + following extra option, when running the node: ```--rpcaddr "0.0.0.0"``` |
| 25 | +3. Test connection: you can test your connection to a running geth node using the following command |
| 26 | + (make sure to install geth on the computer where you run this command):```geth attach http://localhost:8545``` |
| 27 | + please replace _localhost_ with the ip address of the computer running the node. |
0 commit comments