Git Product home page Git Product logo

eth-possim's Introduction

eth-possim

Run full-featured Ethereum PoS simulator (private net) locally or in CI/CD, with PBS (MEV) emulation support.

This project exists to provide convenient and reliable testing environment with predictable performance for Ethereum API users, such as developers of PoS blockchain automation.

Execution client support:

  • Geth
  • Nethermind
  • Besu
  • Erigon

Consensus client support:

  • Lighthouse
  • Teku
  • Prysm
  • Nimbus
  • Lodestar

Validator client support:

  • Lighthouse
  • Teku
  • Prysm
  • Nimbus
  • Lodestar

The aim is to eventually support all Ethereum clients featured at official documentation.

How to use

The primary interface for users is the container one, accessed via docker compose utility (docker compose v2, do not confuse with v2 of the docker-compose spec, which is obsolete).

First, chose how you want to run the project and save your configuration in the .env file:

  • if you're using the opus devpod (internal chorus one project) run:
echo "COMPOSE_FILE=compose-devpod.yaml" > .env
echo "COMPOSE_PROJECT_NAME=${C1_DOCKER_NAMESPACE}-possim" >> .env
echo "POSSIM_DOCKER_NETWORK=${C1_DOCKER_NETWORK}" >> .env
echo "POSSIM_BINDMOUNT_PATH=$(host-path-outside-of-docker.sh .)" >> .env
echo "POSSIM_HOSTNAME=possim.devel" >> .env
  • otherwise for linux host networking configuration run:
echo "COMPOSE_FILE=compose-host.yaml" > .env
echo "POSSIM_HOSTNAME=127.0.0.1" >> .env

Once you've set up your env you can get the privatenet up and running using:

docker compose build possim
docker compose run --use-aliases --rm possim

Once running, you can connect using:

source .env
curl -v http://$POSSIM_HOSTNAME:15050

To run with overridden config:

docker compose run --use-aliases --rm possim CONFIG=/opt/privatenet/pbs_config.yaml

See configuration.yaml for the default values.

How to test

docker compose run --rm possim test

How it works inside the container

First, a command python3 -m eth_possim generate generates configuration for all the components.

Then, tilt up command starts the blockchain.

And finally, make file binds generation and tilt start together.

eth-possim's People

Contributors

enriquefynn avatar mksh avatar qaston avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eth-possim's Issues

Increment ID on every restart

Right now restart of the simulator requires reinstalling web3 clients like Metamask if they used the recycled instance, since clients cache the operations such as transaction using chain id as a cache key.

We need to provide functionality to increment chain ID upon every restart so the new chain can be added to web3 clients without reinstall.

Switch to source code build of Haproxy

Currently we use vbernat ppa to install Haproxy 2.8+, but that leads to breaking build when vbernat version is upgraded. Need to switch to source build of Haproxy to avoid this.

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.