Difference between revisions of "Geth"

From UVOO Tech Wiki
Jump to navigation Jump to search
imported>Jeremy-busk
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 +
# Methods
 +
 +
https://www.quicknode.com/guides/infrastructure/how-to-install-and-run-a-geth-node
 +
https://messari.io/article/running-an-ethereum-node-on-kubernetes-is-easy
 +
 +
 +
 
## Geth in 60 seconds
 
## Geth in 60 seconds
  

Latest revision as of 13:55, 21 December 2021

Methods

https://www.quicknode.com/guides/infrastructure/how-to-install-and-run-a-geth-node https://messari.io/article/running-an-ethereum-node-on-kubernetes-is-easy

Geth in 60 seconds

  • lxc launch ubuntu:xenial geth
  • lxc exec geth /bin/bash
  • run the commands bellow preferably in a bash script file
# The easiest using Ubuntu Bionic/Debian Buster, ppa & systemd
# You can donwload go and ethereum seperately as wellfrom source
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y ethereum


cat > /etc/systemd/system/geth.service <<EOF
[Unit]
Description=Ethereum Go Client
After=network.target

[Service]
User=geth
WorkingDirectory=/var/lib/geth
ExecStart=/usr/bin/geth --ws --rpc --rpcaddr 0.0.0.0 --rpcport 9999
Restart=on-failure

[Install]
WantedBy=multi-user.target
EOF
chmod +x /etc/systemd/system/geth.service
mkdir /var/lib/geth
useradd --home /var/lib/geth geth
chown geth:geth /var/lib/geth

systemctl enable geth.service
systemctl start geth.service

Do some checks if you want.

ss -lnt

journalctl -f -u geth.service

geth attach http://localhost:9999

Refs

Geth commands

geth attach
> eth.
eth._requestManager            eth.getBlockUncleCount         eth.getWork                    
eth.accounts                   eth.getCode                    eth.hashrate                   
eth.blockNumber                eth.getCoinbase                eth.iban                       
eth.call                       eth.getCompilers               eth.icapNamereg                
eth.coinbase                   eth.getGasPrice                eth.isSyncing                  
eth.compile                    eth.getHashrate                eth.mining                     
eth.constructor                eth.getMining                  eth.namereg                    
eth.contract                   eth.getPendingTransactions     eth.pendingTransactions        
eth.defaultAccount             eth.getProtocolVersion         eth.protocolVersion            
eth.defaultBlock               eth.getRawTransaction          eth.resend                     
eth.estimateGas                eth.getRawTransactionFromBlock eth.sendIBANTransaction        
eth.filter                     eth.getStorageAt               eth.sendRawTransaction         
eth.gasPrice                   eth.getSyncing                 eth.sendTransaction            
eth.getAccounts                eth.getTransaction             eth.sign                       
eth.getBalance                 eth.getTransactionCount        eth.signTransaction            
eth.getBlock                   eth.getTransactionFromBlock    eth.submitTransaction          
eth.getBlockNumber             eth.getTransactionReceipt      eth.submitWork                 
eth.getBlockTransactionCount   eth.getUncle                   eth.syncing                    

> personal.
personal._requestManager personal.getListWallets  personal.newAccount      
personal.constructor     personal.importRawKey    personal.sendTransaction 
personal.deriveAccount   personal.listAccounts    personal.sign            
personal.ecRecover       personal.listWallets     personal.unlockAccount   
personal.getListAccounts personal.lockAccount     

> admin.
admin.addPeer              admin.importChain          admin.startRPC             
admin.constructor          admin.isPrototypeOf        admin.startWS              
admin.datadir              admin.nodeInfo             admin.stopRPC              
admin.exportChain          admin.peers                admin.stopWS               
admin.getDatadir           admin.propertyIsEnumerable admin.toLocaleString       
admin.getNodeInfo          admin.removePeer           admin.toString             
admin.getPeers             admin.sleep                admin.valueOf              
admin.hasOwnProperty       admin.sleepBlocks          

> miner.
miner.constructor          miner.setEtherbase         miner.toLocaleString       
miner.getHashrate          miner.setExtra             miner.toString             
miner.hasOwnProperty       miner.setGasPrice          miner.valueOf              
miner.isPrototypeOf        miner.start                
miner.propertyIsEnumerable miner.stop