# Ubuntu/Debian Install & Config
# System update
sudo apt-get update
sudo apt-get upgrade -y
# Install additional packages
sudo apt-get install git wget unzip htop mc clef
# Check python varsion
which python
# Add ethereum repo and install geth
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update -y
sudo apt install geth -y
# Install Anaconda
sudo apt install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 -y
sudo apt install libxcomposite1 libasound2 libxi6 libxtst6 curl -y
wget https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh --output anaconda.sh
sudo bash anaconda.sh
# Clone Git project
cd ~/
git clone https://github.com/kylemcdonald/ethereum-emissions.git
# Ethereum node configuration and sync with test repo
geth --ropsten --syncmode "light"
# Here we should note the location of url=* value, should be something like this:
# url=/home/nikola/.ethereum/ropsten/geth.ipc
# Get a specific information from the blockchain via rpcapi (test network)
geth --rinkeby --rpc --rpcapi="personal,eth,network,web3,net" --ipcpath "/home/nikola/.ethereum/rinkebi/geth.ipc"
# Interact with node IPC
geth attach /home/nikola/.ethereum/ropsten/geth.ipc
# Check the node info
> admin.nodeInfo
# Check connectivity and peers
> net.listening
> net.peerCount
# Detailed information about connected peers
> admin.peers
# Connecting to a custom network
geth -—networkid="098234570938147509" console
# Create Anaconda environment and activate (Ethereum Emissions Project)
conda --version
conda create -n ethereum-emissions python=3.9
conda activate ethereum-emissions
cd ethereum-emissions
pip install -r requirements.txt