Skip to content

nix-community/ethereum.nix

Ethereum.nix = Ethereum 🫶 Nix

Ethereum Ecosystem Built with nix License

Ethereum.nix is a collection of Nix packages and NixOS modules designed to make it easier to operate Ethereum related services and infrastructure.

For the uninitiated, using Ethereum.nix will give you the following benefits:

  • Access to a wide range of Ethereum applications packaged with Nix, ready to run without fuss. Nix guarantees you don't have to worry about version conflicts, missing dependencies or even what state your OS is in.
  • We aim that every Ethereum application stored in the repository is constructed from its source, including all input dependencies. This approach guarantees the code's reproducibility and trustworthiness. Furthermore, with Nix, expert users can tweak and adjust the build process to any degree of detail as required.
  • We develop custom NixOS modules to streamline operations with applications such as Execution and Consensus clients (including performing backups). Moreover, we aim to introduce further abstractions that simplify everyday tasks, such as running a development environment effortlessly without needing docker.

This project is developed entirely in Nix Flakes.

Available Tools

Execution Clients

besu - Besu is an Apache 2.0 licensed, MainNet compatible, Ethereum client written in Java
erigon - Ethereum node implementation focused on scalability and modularity
geth - Official golang implementation of the Ethereum protocol
nethermind - Our flagship Ethereum client for Linux, Windows, and macOS—full and actively developed
reth - Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust

Consensus Clients

grandine - High performance Ethereum consensus client
lighthouse - Ethereum consensus client in Rust
lodestar - TypeScript implementation of the Ethereum consensus specification
prysm - Go implementation of Ethereum proof of stake
teku - Java Implementation of the Ethereum 2.0 Beacon Chain

Validators

charon - Charon (pronounced 'kharon') is a Proof of Stake Ethereum Distributed Validator Client
dirk - An Ethereum 2 distributed remote keymanager, focused on security and long-term performance of signing operations
vouch - An Ethereum 2 multi-node validator client
web3signer - Web3Signer is an open-source signing service capable of signing on multiple platforms (Ethereum1 and 2, Filecoin) using private keys stored in an external vault, or encrypted on a disk

MEV

mev-boost - MEV-Boost allows proof-of-stake Ethereum consensus clients to source blocks from a competitive builder marketplace
mev-boost-relay - MEV-Boost Relay for Ethereum proposer/builder separation (PBS)

SSV

ssv-dkg - The ssv-dkg tool enable operators to participate in ceremonies to generate distributed validator keys for Ethereum stakers.
ssvnode - Secret-Shared-Validator(SSV) for ethereum staking

Account Abstraction

alto - A performant, reliable, and type-safe ERC-4337 Bundler written in TypeScript

Polygon

bor - Official execution client of the Polygon blockchain
heimdall-v2 - Official consensus client of the Polygon blockchain

Development Tools

eth2-testnet-genesis - Create a genesis state for an Eth2 testnet
eth2-val-tools - Some experimental tools to manage validators
ethabi - Encode and decode smart contract invocations
ethdo - A command-line tool for managing common tasks in Ethereum 2
ethereal - A command-line tool for managing common tasks in Ethereum
heimdall - A toolkit for EVM bytecode analysis
kurtosis - CLI for Kurtosis, a framework for building and running distributed systems
sedge - A one-click setup tool for PoS network/chain validators and nodes.
tx-fuzz - TX-Fuzz is a package containing helpful functions to create random transactions
zcli - Eth2 CLI debugging tool

Utilities

blutgang - the wd40 of ethereum load balancers
checkpointz - Ethereum beacon chain checkpoint sync provider
dora - Lightweight beaconchain explorer for Ethereum
rotki-bin - An open source portfolio tracking tool that respects your privacy
tracoor - Ethereum beacon data and execution trace explorer

Uncategorized

formatter - One CLI to format the code tree
nimbus - Nimbus is a lightweight client for the Ethereum consensus layer

Arbitrum

nitro - Arbitrum Nitro node implementation for Ethereum Layer 2

LSP

solidity-language-server - Solidity language server by Nomic Foundation

Optimism

op-batcher - Optimism batcher service that submits L2 transaction batches to L1
op-challenger - Optimism fault proof challenger service that monitors and disputes invalid claims
op-conductor - Optimism sequencer conductor for high-availability setups
op-deployer - Optimism deployer tool for deploying OP Stack chains
op-dispute-mon - Optimism dispute monitor that tracks and reports on fault proof disputes
op-geth - Optimism implementation of the Ethereum protocol
op-node - Optimism rollup node that derives the L2 chain from L1
op-proposer - Optimism proposer service that submits L2 output proposals to L1
op-supervisor - Optimism supervisor for cross-chain message verification
op-validator - Tool for validating Optimism chain configurations and deployments
proxyd - RPC request router and proxy for Optimism
supersim - Local Multi-L2 Development Environment

Staking

eigenlayer - Utility manages core operator functionalities like local key management, operator registration and updates
ethstaker-deposit-cli - Secure key generation for deposits (ethstaker fork)
rocketpool - Rocket Pool CLI
rocketpoold - Rocket Pool Daemon
staking-deposit-cli - Secure key generation for deposits

Installation

Using Nix Flakes (Recommended)

Add to your system configuration:

{
  inputs = {
    ethereum.url = "github:nix-community/ethereum.nix";
  };

  # In your system packages:
  environment.systemPackages = with inputs.ethereum.packages.${pkgs.stdenv.hostPlatform.system}; [
    geth
    lighthouse
    reth
    mev-boost
    # ... other tools
  ];
}

Using Overlay

Alternatively, use the overlay to access packages under the ethereum namespace:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    ethereum.url = "github:nix-community/ethereum.nix";
  };

  outputs = { nixpkgs, ethereum, ... }: {
    # NixOS configuration
    nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [{
        nixpkgs.overlays = [ ethereum.overlays.default ];
        environment.systemPackages = [
          pkgs.ethereum.geth
          pkgs.ethereum.lighthouse
          pkgs.ethereum.prysm
        ];
      }];
    };
  };
}

Try Without Installing

# Try Geth (Execution Client)
nix run github:nix-community/ethereum.nix#geth -- --help

# Try Lighthouse (Consensus Client)
nix run github:nix-community/ethereum.nix#lighthouse -- --help

# Try Reth (Execution Client)
nix run github:nix-community/ethereum.nix#reth -- --help

# Try MEV-Boost
nix run github:nix-community/ethereum.nix#mev-boost -- --help

# etc...

Development

We use devshell to have nice development environments. Otherwise:

nix develop

Building Packages

# Build a specific package
nix build .#foundry
nix build .#geth
nix build .#nimbus
# etc...

Running checks

To run all tests:

nix flake check

Formatting

You can manually format the source:

nix fmt

Contribute

We welcome any contribution or support to this project, but before doing so:

  • Make sure you have read the contribution guide for more details on how to submit a good PR (pull request).

In addition, you can always:

Acknowledgements

This project has been inspired by the awesome work of:

  • cosmos.nix by Informal Systems, which this repository takes inspiration from its README and several other places.

  • willruggiano on his work done in eth-nix repository that served as the initial kick-start for working on this project.

License

Individual tools are licensed under their respective licenses.

The Nix packaging code in this repository is licensed under MIT.

Releases

No releases published

Sponsor this project

  •  

Packages

 
 
 

Contributors