Giter VIP home page Giter VIP logo

race's Introduction

race

A speed benchmark replaying transactions on a Uniswap V3 pool.

Setup

scripts/setup.sh

We recommend to use an INFURA node, alchemy rate limits will timeout the first async benchmark.

Running this script will do 3 things:

  1. Install foundry, an EVM manager which is used to fork mainnet.
  2. Install node dependencies
  3. Install Python dependencies

Quick Start

  1. Create a .env file and fill in the RPC_URL environment variable, similar to .env.example

  2. Run:

    scripts/run_all.sh

What does success look like?

You should see an output that looks something like:

➜  race git:(main) ✗ scripts/run_all.sh
RUNNING DIRECT ARCHIVE NODE REQUESTS OVER ASYNC HTTP
Loaded 58 transactions
Async HTTP archive node: 1.31 seconds

RUNNING DIRECT ARCHIVE NODE REQUESTS OVER HTTP
Loaded 58 transactions
100%|███████████████████████████████████████████| 58/58 [00:06<00:00,  9.06it/s]
HTTP archive node: 6.41 seconds

RUNNING ON ANVIL LOCAL FORK OVER HTTP WITH WEB3.PY
Could not kill process on port 7545. No process running on port.
Loaded 194 transactions
100%|█████████████████████████████████████████| 194/194 [00:06<00:00, 27.86it/s]
Web3.py HTTP Anvil: 6.97 seconds

RUNNING ON ANVIL LOCAL FORK OVER IPC WITH WEB3.PY
Process on port 7545 killed
Loaded 194 transactions
100%|█████████████████████████████████████████| 194/194 [00:06<00:00, 32.08it/s]
Web3.py IPC Anvil: 6.05 seconds

race's People

Contributors

09tangriro avatar scheuclu 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.