Giter Site home page Giter Site logo

jake-sb / eth4nos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eth4nos/go-ethereum

0.0 0.0 0.0 146 MB

Official Go implementation of the Ethereum protocol

Home Page: https://geth.ethereum.org

License: GNU Lesser General Public License v3.0

Shell 0.04% JavaScript 5.10% Ruby 0.01% C++ 0.95% Python 0.37% C 5.89% Java 0.31% Go 86.20% Assembly 0.33% Makefile 0.12% HTML 0.12% NSIS 0.24% M4 0.26% Dockerfile 0.01% Solidity 0.06%

eth4nos's Introduction

⛓️Ethanos

Ethanos is a lightweight Ethereum clients to accelerate bootstrapping.

🌵 ​About repository

The repository has 7 branches including master branch forked from Geth/v1.9.1-unstable-dad5759a-20190727/linux-amd64/go1.13.4. Other 6 branches can be separated by clients type and sync mode.

Clients

  • Ethanos : Lightweight ethereum client we implemented
  • Geth : Baseline client for evaluation (Geth/v1.9.1)

Sync mode

  • Archive node downloads and replays all the transactions from the genesis block to the current block to reproduce the entire state histories of the blockchain.
  • Fast sync node downloads all the transactions but replays only the transactions after the pivot block by downloading the pivot block state.
  • Compact sync node is the same as fast sync except not downloading transactions before the pivot block.

🌐 Running an archive node

Environments

  • Prerequisite : > go1.10.4
  • There are 2 branches for running an archive node.
    • eth4nos_archive_30, geth_archive_30
  • There are some python scripts for simulations in go-ethereum/build/bin/experiment/.
    • Please refer to the readme file there

Setup

In go-ethereum/build/bin/,

  1. Set genesis.json as you want
  2. Set fullDataDir in init.sh
  3. Set datadir, rpcport, port in full.sh

Run

1. Switch to the target archive branch and build

make geth

2. Init client and run

sh init.sh
sh full.sh

3. (Optional) Run the simulation script you want in go-ethereum/build/binexperiment/

💡 Running an sync node

Environments

  • Prerequisite : Archive node for syncing
  • There are 4 branches for sync experiments.
    • eth4nos_fast_30, eth4nos_compact_30, geth_fast_30, geth_compact_30
  • There are 3 python scripts for simulations in go-ethereum/build/bin/sync-experiment/.
    • fullnode.py : Run full(archive) sync node
    • fastsync.py : Run fast(or compact) sync node
    • simulation.py : Control the execution & termination of full-fast node every epoch

Setup

  1. Genesis file must be the same as archive node's.
  2. Set GENESIS_PATH and DB_PATH(archive DB path) in fullnode.py
  3. Set GENESIS_PATH and DB_PATH(where the sync DB will be stored) in fastsync.py
  4. Set DB_PATH(where the sync log will be stored) and sync_boundaries in simulation.py

Run

1. Switch to the target sync branch and build

make geth

2. (Optional) Start 3 new screen sessions

screen -S full
screen -S sync
screen -S simulation

3. Run fullnode.py in full session

python3 fullnode.py

4. Run fastsync.py in sync session

python3 fastsync.py

5. Run simulation.py in simulation session with 2 arguments

python3 simulation.py [directory prefix] [# of sync in each epoch]

📊 Analysis

After the sync done,

1. Move analysis.sh in go-ethereum/build/bin/sync-experiment/ to the log directory

2. Run the shell script

sh analysis.sh [fast | compact]
  • This script assumed that..
    • There are db_fast/, db_compact/ directories in the same location.
    • Log files are named with *_log/*.txt pattern in db_fast/(or db_compact/).

eth4nos's People

Contributors

obscuren avatar karalabe avatar fjl avatar tgerring avatar zelig avatar cjentzsch avatar debris avatar holiman avatar zsfelfoldi avatar rjl493456442 avatar nonsense avatar gballet avatar janos avatar acud avatar gluk256 avatar gavofyork avatar arachnid avatar vbuterin avatar holisticode avatar cubedro avatar jsvisa avatar nolash avatar matthalp-zz avatar jpeletier avatar frncmx avatar kielbarry avatar egonelbre avatar kurkomisi avatar lmars avatar ligi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.