24 rustPlatform.buildRustPackage rec {
28 # lighthouse/common/deposit_contract/build.rs
29 depositContractSpecVersion = "0.12.1";
30 testnetDepositContractSpecVersion = "0.9.2.1";
32 src = fetchFromGitHub {
36 hash = "sha256-UUOvTxOQXT1zfhDYEL/J6moHAyejZn7GyGS/XBmXxRQ=";
40 ./use-system-sqlite.patch
44 cp ${./Cargo.lock} Cargo.lock
48 lockFile = ./Cargo.lock;
50 "amcl-0.3.0" = "sha256-kc8k/ls4W0TwFBsRcyyotyz8ZBEjsZXHeJnJtsnW/LM=";
51 "anvil-rpc-0.1.0" = "sha256-L38OioxnWEn94g3GJT4j3U1cJZ8jQDHp8d1QOHaVEuU=";
52 "beacon-api-client-0.1.0" = "sha256-Z0CoPxZzl2bjb8vgmHWxq2orMawhMMs7beKGopilKjE=";
53 "ethereum-consensus-0.1.1" = "sha256-biTrw3yMJUo9+56QK5RGWXLCoPPZEWp18SCs+Y9QWg4=";
54 "libmdbx-0.1.4" = "sha256-NMsR/Wl1JIj+YFPyeMMkrJFfoS07iEAKEQawO89a+/Q=";
55 "lmdb-rkv-0.14.0" = "sha256-sxmguwqqcyOlfXOZogVz1OLxfJPo+Q0+UjkROkbbOCk=";
56 "mev-rs-0.3.0" = "sha256-LCO0GTvWTLcbPt7qaSlLwlKmAjt3CIHVYTT/JRXpMEo=";
57 "testcontainers-0.14.0" = "sha256-mSsp21G7MLEtFROWy88Et5s07PO0tjezovCGIMh+/oQ=";
58 "warp-0.3.5" = "sha256-d5e6ASdL7+Dl3KsTNOb9B5RHpStrupOKsbGWsdu9Jfk=";
62 buildFeatures = [ "modern" "gnosis" ];
65 rustPlatform.bindgenHook
75 ] ++ lib.optionals stdenv.isDarwin [
81 depositContractSpec = fetchurl {
82 url = "https://raw.githubusercontent.com/ethereum/eth2.0-specs/v${depositContractSpecVersion}/deposit_contract/contracts/validator_registration.json";
83 hash = "sha256-ZslAe1wkmkg8Tua/AmmEfBmjqMVcGIiYHwi+WssEwa8=";
86 testnetDepositContractSpec = fetchurl {
87 url = "https://raw.githubusercontent.com/sigp/unsafe-eth2-deposit-contract/v${testnetDepositContractSpecVersion}/unsafe_validator_registration.json";
88 hash = "sha256-aeTeHRT3QtxBRSNMCITIWmx89vGtox2OzSff8vZ+RYY=";
91 LIGHTHOUSE_DEPOSIT_CONTRACT_SPEC_URL = "file://${depositContractSpec}";
92 LIGHTHOUSE_DEPOSIT_CONTRACT_TESTNET_URL = "file://${testnetDepositContractSpec}";
95 "--package lighthouse"
98 __darwinAllowLocalNetworking = true;
102 # All of these tests require network access and/or docker
105 "--exclude beacon_node"
106 "--exclude beacon_chain"
108 "--exclude lighthouse"
109 "--exclude lighthouse_network"
110 "--exclude slashing_protection"
112 "--exclude web3signer_tests"
115 # All of these tests require network access
118 "--skip deposit_tree::cache_consistency"
119 "--skip deposit_tree::double_update"
120 "--skip deposit_tree::updating"
121 "--skip eth1_cache::big_skip"
122 "--skip eth1_cache::double_update"
123 "--skip eth1_cache::pruning"
124 "--skip eth1_cache::simple_scenario"
125 "--skip fast::deposit_cache_query"
126 "--skip http::incrementing_deposits"
127 "--skip persist::test_persist_caches"
128 "--skip service::tests::tests::test_dht_persistence"
129 "--skip time::test::test_reinsertion_updates_timeout"
130 ] ++ lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [
131 "--skip subnet_service::tests::attestation_service::test_subscribe_same_subnet_several_slots_apart"
132 "--skip subnet_service::tests::sync_committee_service::same_subscription_with_lower_until_epoch"
133 "--skip subnet_service::tests::sync_committee_service::subscribe_and_unsubscribe"
136 nativeCheckInputs = [
142 tests.version = testers.testVersion {
143 package = lighthouse;
144 command = "lighthouse --version";
145 version = "v${lighthouse.version}";
147 updateScript = nix-update-script { };
151 description = "Ethereum consensus client in Rust";
152 homepage = "https://lighthouse.sigmaprime.io/";
153 license = licenses.asl20;
154 maintainers = with maintainers; [ centromere pmw ];