Skip to content

Example of private Ethereum cluster running on Cloud Foundry

Notifications You must be signed in to change notification settings

micahyoung/ethereum-cf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ethereum on Cloud Foundry

Example of private ethereum cluster running on Cloud Foundry

Overview

The up.sh script will stand up 3 apps:

  • bootnodes - one instance of the service discovery node for the network
  • miners - one instance of a geth miner node for block creation
  • nodes - one instance of a geth node to execute transactions

You can access any of these nodes with cf ssh and use the geth binary at app/geth and the data dir at app/data. The genesis file and accounts used are provided with the repo and should not be reused in any production environment.

The miner comes up in a stopped state to prevent run-away CPU usage.

Testing

The test.sh script will:

  1. Stop the miner if running
  2. Mine 1 block to create ETH for account 0
  3. Initiate a transfer of ETH from account 0 to account 1
  4. Mine 1 block to complete the transfer
  5. Show the balances of each account to confirm the transfer has occured

Prerequisites

Usage

  • Install the cf cli network policy plugin

    cf install-plugin network-policy
    
  • Log in to Cloud Foundry and target an org and space

    cf login -a https://api.your-cf.com -u your-email@example.com -o your-org -s your-space
    
  • Run up.sh and wait for it to finish

  • Run test.sh. Read the prompts and compare it to the output to confirm the cluster is working

Notes

  • Verbosity is turned up on geth and bootnodes so the logs show lots of false positive errors. Examples:
    <log stamp> Dial error                               task="dyndial 8ba26367c9651a53 10.253.245.133:33445" err="dial tcp 10.253.245.133:33445: getsockopt: connection refused"
    ...
    <log stamp> Bumping findnode failure counter         id=8ba26367c9651a53 failcount=2
    

References

About

Example of private Ethereum cluster running on Cloud Foundry

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages