Skip to content

Commit

Permalink
feat(reth): add reth execution client
Browse files Browse the repository at this point in the history
  • Loading branch information
selfuryon committed Jul 10, 2023
1 parent 4a47712 commit 676e662
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
45 changes: 45 additions & 0 deletions packages/clients/execution/reth/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
clang,
lib,
llvmPackages,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "reth";
version = "0.1.0-alpha.2";

NIX_DEBUG = 7;

src = fetchFromGitHub {
owner = "paradigmxyz";
repo = pname;
rev = "v${version}";
hash = "sha256-+kGhVL7sIbd3WBaRA6XMTAPMCkxRTRacQKFM8oOCqg0=";
};

cargoLock = {
lockFile = "${src}/Cargo.lock";
allowBuiltinFetchGit = true;
outputHashes = {
"boa_ast-0.16.0" = "sha256-M4tDrKM+cR3Xc7qZQ5uHw7lsMEP6OG/VvyHC2oW0BrI=";
"discv5-0.3.0" = "sha256-Z1UZY47C2qtEr4WrOEiWynzsiwggOOEy9slZO5n97BM=";
"igd-0.12.0" = "sha256-wjk/VIddbuoNFljasH5zsHa2JWiOuSW4VlcUS+ed5YY=";
"revm-3.3.0" = "sha256-jmDzHpbWTXxkv+ATAqYznvcQy8V3EF2XVsCyLaH4p0o=";
"ruint-1.8.0" = "sha256-OzIUivkNwtox7cMdqv6tkCMsJsGyVeTvfyMr5SZhuPg=";
};
};

nativeBuildInputs = [clang];

# Needed by libmdx
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";

meta = {
description = "Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust";
homepage = "https://github.com/paradigmxyz/reth";
license = [lib.licenses.mit lib.licenses.asl20];
mainProgram = "reth";
platforms = ["x86_64-linux"];
};
}
5 changes: 4 additions & 1 deletion packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
self',
pkgs,
system,
inputs',
...
}: let
inherit (pkgs) callPackage;
inherit (lib.flake) platformPkgs platformApps;
#callPackageUnstable = inputs'.nixpkgs-unstable.legacyPackages.callPackage;
callPackageUnstable = inputs'.nixpkgs-unstable.legacyPackages.callPackage;
in {
packages = platformPkgs system rec {
# Consensus Clients
Expand All @@ -30,6 +31,7 @@
geth = callPackage ./clients/execution/geth {};
geth-sealer = callPackage ./clients/execution/geth-sealer {};
nethermind = callPackage ./clients/execution/nethermind {};
reth = callPackageUnstable ./clients/execution/reth {};

# Signers
web3signer = callPackage ./signers/web3signer {};
Expand Down Expand Up @@ -96,6 +98,7 @@
# execution clients
besu.bin = "besu";
erigon.bin = "erigon";
reth.bin = "reth";

geth = {
bin = "geth";
Expand Down

0 comments on commit 676e662

Please sign in to comment.