21 rustPlatform.buildRustPackage rec {
25 # lighthouse/common/deposit_contract/build.rs
26 depositContractSpecVersion = "0.12.1";
27 testnetDepositContractSpecVersion = "0.9.2.1";
29 src = fetchFromGitHub {
33 hash = "sha256-wIj+YabyUrgLjWCfjCAH/Xb8jUG6ss+5SwnE2M82a+4=";
37 ./use-system-sqlite.patch
38 ./fix-dep-lazy_static.patch
42 cp ${./Cargo.lock} Cargo.lock
46 lockFile = ./Cargo.lock;
48 "libmdbx-0.1.4" = "sha256-ONp4uPkVCN84MObjXorCZuSjnM6uFSMXK1vdJiX074o=";
49 "lmdb-rkv-0.14.0" = "sha256-sxmguwqqcyOlfXOZogVz1OLxfJPo+Q0+UjkROkbbOCk=";
50 "quick-protobuf-0.8.1" = "sha256-dgePLYCeoEZz5DGaLifhf3gEIPaL7XB0QT9wRKY8LJg=";
54 buildFeatures = [ "modern" "gnosis" ];
57 rustPlatform.bindgenHook
66 ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
68 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
74 depositContractSpec = fetchurl {
75 url = "https://raw.githubusercontent.com/ethereum/eth2.0-specs/v${depositContractSpecVersion}/deposit_contract/contracts/validator_registration.json";
76 hash = "sha256-ZslAe1wkmkg8Tua/AmmEfBmjqMVcGIiYHwi+WssEwa8=";
79 testnetDepositContractSpec = fetchurl {
80 url = "https://raw.githubusercontent.com/sigp/unsafe-eth2-deposit-contract/v${testnetDepositContractSpecVersion}/unsafe_validator_registration.json";
81 hash = "sha256-aeTeHRT3QtxBRSNMCITIWmx89vGtox2OzSff8vZ+RYY=";
84 LIGHTHOUSE_DEPOSIT_CONTRACT_SPEC_URL = "file://${depositContractSpec}";
85 LIGHTHOUSE_DEPOSIT_CONTRACT_TESTNET_URL = "file://${testnetDepositContractSpec}";
87 OPENSSL_NO_VENDOR = true;
90 "--package lighthouse"
93 __darwinAllowLocalNetworking = true;
97 # All of these tests require network access and/or docker
100 "--exclude beacon_chain"
101 "--exclude beacon_node"
103 "--exclude lighthouse"
104 "--exclude lighthouse_network"
106 "--exclude slashing_protection"
108 "--exclude web3signer_tests"
111 # All of these tests require network access
114 "--skip deposit_tree::cache_consistency"
115 "--skip deposit_tree::double_update"
116 "--skip deposit_tree::updating"
117 "--skip eth1_cache::big_skip"
118 "--skip eth1_cache::double_update"
119 "--skip eth1_cache::pruning"
120 "--skip eth1_cache::simple_scenario"
121 "--skip fast::deposit_cache_query"
122 "--skip http::incrementing_deposits"
123 "--skip persist::test_persist_caches"
124 "--skip service::tests::tests::test_dht_persistence"
125 "--skip time::test::test_reinsertion_updates_timeout"
126 ] ++ lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin) [
127 "--skip subnet_service::tests::attestation_service::test_subscribe_same_subnet_several_slots_apart"
128 "--skip subnet_service::tests::sync_committee_service::same_subscription_with_lower_until_epoch"
129 "--skip subnet_service::tests::sync_committee_service::subscribe_and_unsubscribe"
132 nativeCheckInputs = [
137 tests.version = testers.testVersion {
138 package = lighthouse;
139 command = "lighthouse --version";
140 version = "v${lighthouse.version}";
142 updateScript = nix-update-script { };
145 enableParallelBuilding = true;
147 # This is needed by the unit tests.
148 FORK_NAME = "capella";
151 description = "Ethereum consensus client in Rust";
152 homepage = "https://lighthouse.sigmaprime.io/";
153 license = licenses.asl20;
154 maintainers = with maintainers; [ centromere pmw ];
155 mainProgram = "lighthouse";
156 broken = stdenv.hostPlatform.isDarwin;