Minimal Ethereum fee data viewer for the terminal, contained in a single python script.

Overview

fee-feed

Minimal Ethereum fee data viewer for the terminal, contained in a single python script. Connects to your node and displays some metrics in real-time.

Boxplots of fees for the past few hundred blocks to give context to the fee market.

img

See how much ether is burned recently.

img

See the fee parameters for the last block in detail.

img

Installation

Optionally create an environment with python 3.x

python3 -m venv venv
source venv/bin/activate

Install dependencies

pip install requests python-dotenv

Node configuration

Create a file called '.env' and populated it with the url for your node as follows:

RPC_URL='http://localhost:8545'

Operation

(optional) activate environment:

source venv/bin/activate

Run

python fee-feed.py

On startup, details of transactions in the first block will be displayed. After the display is started, the receipts of the last 200 blocks are fetched, which can take a minute for a local node.

Control with the keyboard:

  • number to change mode
  • q to quit.

Stats

See boxplots with outliers removed

Mainnet: img

Standard deviation of the priority fees.

See what multiple of the base fee the average max fee is.

Mainnet: img

Goerli: img


What is the gas utilisation percentage?

How does the minimum fee change as block size changes, ignoring MEV transactions?

How many transactions are of the new type vs legacy?

Mainnet: img

Goerli: img


Dynamically adjusts if you resize the window to handle large or small monitors.

img

Pop it to the side to keep an eye on things.

img

Keep it out of the way.

img

Networks

Functions with any testnet without configuration, tested on:

  • Mainnet pre-London
  • Goerli post-London.

Upgrades

You can add new modes pretty easily:

  1. Add a mode the configuration section at the top of the file, replicating what is already there, and changing the names and button.
  2. Add a function to populate your newly named data. Search for "# Add new data functions here."

Issues

The boxplots are calculated on quartiles for maxPriorityFeePerGas, weighted by gas - but the gas value is gas limit, rather than gas used for that transaction. The prices are correct, but the distribution might be off compared with feeHistory API results.

Disclaimer

This is provided as-is for education purposes and should not be used as critical infrastructure.

Feedback

PRs welcome. If you like it, or have ideas and feedback reach out to me on twitter @eth_worm

You might also like...
Python script to generate a visualization of various sorting algorithms, image or video.
Python script to generate a visualization of various sorting algorithms, image or video.

sorting_algo_visualizer Python script to generate a visualization of various sorting algorithms, image or video.

A python script and steps to display locations of peers connected to qbittorrent
A python script and steps to display locations of peers connected to qbittorrent

A python script (along with instructions) to display the locations of all the peers your qBittorrent client is connected to in a Grafana worldmap dash

A script written in Python that generate output custom color (HEX or RGB input to x1b hexadecimal)
A script written in Python that generate output custom color (HEX or RGB input to x1b hexadecimal)

ColorShell ─ 1.5 Planned for v2: setup.sh for setup alias This script converts HEX and RGB code to x1b x1b is code for colorize outputs, works on ou

A python script editor for napari based on PyQode.
A python script editor for napari based on PyQode.

napari-script-editor A python script editor for napari based on PyQode. This napari plugin was generated with Cookiecutter using with @napari's cookie

A simple python script using Numpy and Matplotlib library to plot a Mohr's Circle when given a two-dimensional state of stress.
A simple python script using Numpy and Matplotlib library to plot a Mohr's Circle when given a two-dimensional state of stress.

Mohr's Circle Calculator This is a really small personal project done for Department of Civil Engineering, Delhi Technological University (formerly, D

A python script to visualise explain plans as a graph using graphviz

README Needs to be improved Prerequisites Need to have graphiz installed on the machine. Refer to https://graphviz.readthedocs.io/en/stable/manual.htm

Python script for writing text on github contribution chart.
Python script for writing text on github contribution chart.

Github Contribution Drawer Python script for writing text on github contribution chart. Requirements Python 3.X Getting Started Create repository Put

Apache Superset is a Data Visualization and Data Exploration Platform
Apache Superset is a Data Visualization and Data Exploration Platform

Superset A modern, enterprise-ready business intelligence web application. Why Superset? | Supported Databases | Installation and Configuration | Rele

Apache Superset is a Data Visualization and Data Exploration Platform
Apache Superset is a Data Visualization and Data Exploration Platform

Apache Superset is a Data Visualization and Data Exploration Platform

Comments
  • KeyError: 'result'

    KeyError: 'result'

    Hey, just ran pip install request and ran into this error when starting the application.

     ✘ username@hostname  ~/CodeDirectory/fee-feed   main  python fee-feed.py
    Traceback (most recent call last):
      File "/home/username/CodeDirectory/fee-feed/fee-feed.py", line 906, in <module>
        curses.wrapper(main)
      File "/usr/lib/python3.9/curses/__init__.py", line 94, in wrapper
        return func(stdscr, *args, **kwds)
      File "/home/username/CodeDirectory/fee-feed/fee-feed.py", line 893, in main
        active = cycle(sc, win, keypress, interval, modes, 
      File "/home/username/CodeDirectory/fee-feed/fee-feed.py", line 866, in cycle
        fetch_missing_and_prepare(data_manager, modes)
      File "/home/username/CodeDirectory/fee-feed/fee-feed.py", line 806, in fetch_missing_and_prepare
        data_manager.get_missing_blocks(
      File "/home/username/CodeDirectory/fee-feed/fee-feed.py", line 511, in get_missing_blocks
        retrieved = get_blocks(missing_numbers, mode=None)
      File "/home/username/CodeDirectory/fee-feed/fee-feed.py", line 400, in get_blocks
        return [
      File "/home/username/CodeDirectory/fee-feed/fee-feed.py", line 401, in <listcomp>
        block_analysis(res["result"]) 
    KeyError: 'result'
    
    

    Am I missing something obvious or could this be a problem with my curses version?

    opened by 0xrin1 4
Owner
null
nvitop, an interactive NVIDIA-GPU process viewer, the one-stop solution for GPU process management

An interactive NVIDIA-GPU process viewer, the one-stop solution for GPU process management.

Xuehai Pan 1.3k Jan 2, 2023
Interactive chemical viewer for 2D structures of small molecules

?? mols2grid mols2grid is an interactive chemical viewer for 2D structures of small molecules, based on RDKit. ➡️ Try the demo notebook on Google Cola

Cédric Bouysset 154 Dec 26, 2022
A minimal Python package that produces slice plots through h5m DAGMC geometry files

A minimal Python package that produces slice plots through h5m DAGMC geometry files Installation pip install dagmc_geometry_slice_plotter Python API U

Fusion Energy 4 Dec 2, 2022
Script to create an animated data visualisation for categorical timeseries data - GIF choropleth map with annotations.

choropleth_ldn Simple script to create a chloropleth map of London with categorical timeseries data. The script in main.py creates a gif of the most f

null 1 Oct 7, 2021
termplotlib is a Python library for all your terminal plotting needs.

termplotlib termplotlib is a Python library for all your terminal plotting needs. It aims to work like matplotlib. Line plots For line plots, termplot

Nico Schlömer 553 Dec 30, 2022
Render Jupyter notebook in the terminal

jut - JUpyter notebook Terminal viewer. The command line tool view the IPython/Jupyter notebook in the terminal. Install pip install jut Usage $jut --

Kracekumar 169 Dec 27, 2022
Plot, scatter plots and histograms in the terminal using braille dots

Plot, scatter plots and histograms in the terminal using braille dots, with (almost) no dependancies. Plot with color or make complex figures - similar to a very small sibling to matplotlib. Or use the canvas to plot dots and lines yourself.

Tammo Ippen 207 Dec 30, 2022
Automatically Visualize any dataset, any size with a single line of code. Created by Ram Seshadri. Collaborators Welcome. Permission Granted upon Request.

AutoViz Automatically Visualize any dataset, any size with a single line of code. AutoViz performs automatic visualization of any dataset with one lin

AutoViz and Auto_ViML 1k Jan 2, 2023
Automatically Visualize any dataset, any size with a single line of code. Created by Ram Seshadri. Collaborators Welcome. Permission Granted upon Request.

AutoViz Automatically Visualize any dataset, any size with a single line of code. AutoViz performs automatic visualization of any dataset with one lin

AutoViz and Auto_ViML 299 Feb 13, 2021
A customized interface for single cell track visualisation based on pcnaDeep and napari.

pcnaDeep-napari A customized interface for single cell track visualisation based on pcnaDeep and napari. ?? Under construction You can get test image

ChanLab 2 Nov 7, 2021