Ethereum Geth problem and lighthouse
The Ethereum network is based on the Geth blockchain engine to perform transactions, account management and confirm intelligent contracts. The Geth client is responsible for interaction with Ethereum Mainnet, while the lighthouse provides a safe programming environment (SDE) for writing and testing the Ethereum of the Agreement.
susceptibility to docker compesters
However, in the “docker-compose.ymlfile there is a problem that can potentially lead to a problem with the connection between the Geth container and the lighthouse tank. Especially:
- The "world" of the service is not correct to contribute to the service. "
- Etherscan-Uap
and 'Infura.i
services are not included in the” docker-clipose.ymlfile.
Repair of the problem with embroidery
To solve this problem, you need to add the necessary configurations for the lighthouse and Ethereum Mainnet. Here is the updated filedocker-lupose.yml, which should solve the problem with the connection:
Yaml
Version: “3”
Services:
Geth:
Container_Name: Geth
clouds:
– /mnt/external/geth:/root/.ethereum
-/MNT/Geth-Data:/VAR/Lib/Etherscan
lighthouse:
Photo: Ethereum/Go-Ethereum/Lighthouse: V1.0
Ports:
– “8080: 8080”
Depends:
– Geth
Environment:
– etherscan_api_key = Your_etherscan_api_key
– infura_project_id = your_infura_project_id
Ethercan-Aapi:
Photo: Ethereum/Go-Ethereum/Etherscan-Aapi: V1.4.2
Ports:
– “8543: 8543”
Infura.io:
Photo: Ethereum/Go-Ethereum/Infura-Go: V0.24.2
Ports:
– “5008: 5008”
`
In this updated docker-compose.yml
:
- We have added the necessary configurations for the lighthouse and Ethereum Mainnet.
- The “Ethercan-Aapi” photo is used to connect to the Ethereum API.
- Picture
Infura.i
is used to connect to the infur network.
- For each service, environmental variables
etherscan_api_key
iinfura_project_id
was set up.
Starting the updated compiler file
After updating the docker-frupose.yml
file, you can start it with:
`Bash
Docker -pose up -d -s -Construction
This will launch all free -standing services and build Doocker images if they have not yet been built.
After starting your services, you should have access to the lighthouse, visiting http: // Localhost: 8080
(assuming that the container works at the connection 8551). You can also use the Ethereum API end point by visiting https: //api.etherscan.io/api/? Action = leaf+blockchain+records & apikey = your_etherscan_api_key
.
By adding these configurations to the “docker- compose.yml` file, you should now be able to connect the lighthouse with the Geth container and access Ethereum Mainnet.