Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

Latest commit

 

History

History

geth_and_k8s

[experiment] deploy a private ethereum blockchain on kubernetes


tl;dr


  • deploy it with your own geth and a customized genesis file and all.

  • geth implements Clique, a proof-of-authority mechanism to reach consensus. Moreover, a number of accounts a defined to produce new blocks in the chain.

  • a custom Ethereum testnet contains three components: * a custom [genesis file](/genesis.json * a custom data directory, which we define with GETH_DATADIR * a custom NetworkID , which we set 137




documentation for this work





nodes


  • running nodes are responsible for the following tasks:

    • store blockchain data,
    • participates in block validation (verifying blocks and states),
    • serve the network and provides data on request.
  • interacting with the client:


getting total coinbase
web3.fromWei(eth.getBalance(eth.coinbase), "ether")
getting a balance from an account
web3.fromWei(eth.getBalance("2ee8D80de1c389f1254e94bc44D2d1Bc391eD402"), "ether")
txpool api
  • access to several non-standard RPC methods to inspect the contents of the transaction pool containing all the currently pending transactions as well as the ones queued for future processing:
txpool
useful checks
admin.nodeInfo
setting this chain on metamask
  • click a custom RPC network and add:
Network Name: "<project name>"
New RPC URL: localhost
Chain ID: 137



rsources