Ethereum consensus client in Rust
Go to file
Michael Sproul f77e3bc0ad Add maxperf build profile (#3608)
## Proposed Changes

Add a new Cargo compilation profile called `maxperf` which enables more aggressive compiler optimisations at the expense of compilation time.

Some rough initial benchmarks show that this can provide up to a 25% reduction to run time for CPU bound tasks like block processing: https://docs.google.com/spreadsheets/d/15jHuZe7lLHhZq9Nw8kc6EL0Qh_N_YAYqkW2NQ_Afmtk/edit

The numbers in that spreadsheet compare the `consensus-context` branch from #3604 to the same branch compiled with the `maxperf` profile using:

```
PROFILE=maxperf make install-lcli
```

## Additional Info

The downsides of the maxperf profile are:

- It increases compile times substantially, which will particularly impact low-spec hardware. Compiling `lcli` is about 3x slower. Compiling Lighthouse is about 5x slower on my 5950X: 17m 38s rather than 3m 28s.

As a result I think we should not enable this everywhere by default.

- **Option 1**: enable by default for our released binaries. This gives the majority of users the fastest version of `lighthouse` possible, at the expense of slowing down our release CI. Source builds will continue to use the default `release` profile unless users opt-in to `maxperf`.
- **Option 2**: enable by default for source builds. This gives users building from source an edge, but makes them pay for it with compilation time. 

I think I would prefer Option 1. I'll try doing some benchmarking to see how long a maxperf build of Lighthouse would take on GitHub actions.

Credit to Nicholas Nethercote for documenting these options in the Rust Performance Book: https://nnethercote.github.io/perf-book/build-configuration.html.
2022-09-29 06:13:33 +00:00
.github Add maxperf build profile (#3608) 2022-09-29 06:13:33 +00:00
account_manager Builder Specs v0.2.0 (#3134) 2022-07-30 00:22:37 +00:00
beacon_node Handle Lodestar's new agent string (#3620) 2022-09-29 01:50:13 +00:00
book Add maxperf build profile (#3608) 2022-09-29 06:13:33 +00:00
boot_node v3.1.2 (#3603) 2022-09-26 01:17:36 +00:00
common v3.1.2 (#3603) 2022-09-26 01:17:36 +00:00
consensus New rust lints for rustc 1.64.0 (#3602) 2022-09-23 03:52:46 +00:00
crypto v3.1.1 (#3585) 2022-09-22 06:08:52 +00:00
database_manager Prune finalized execution payloads (#3565) 2022-09-17 02:27:01 +00:00
lcli v3.1.2 (#3603) 2022-09-26 01:17:36 +00:00
lighthouse Publish subscriptions to all beacon nodes (#3529) 2022-09-28 19:53:35 +00:00
scripts Use #!/usr/bin/env everywhere for local testnets (#3606) 2022-09-29 06:13:30 +00:00
slasher Modularise slasher backend (#3443) 2022-08-15 01:30:56 +00:00
testing Fix ee integration tests (#3592) 2022-09-23 03:52:43 +00:00
validator_client Publish subscriptions to all beacon nodes (#3529) 2022-09-28 19:53:35 +00:00
.dockerignore Exclude EE build dirs from Docker context (#3174) 2022-05-09 23:43:31 +00:00
.editorconfig Add editorconfig template 2019-03-11 15:09:57 +11:00
.gitignore Allow setting web3signer version through environment (#3368) 2022-07-27 03:20:01 +00:00
.gitmodules Replace EF tests submodule with a makefile 2019-09-08 04:19:54 +10:00
bors.toml Add merge support to simulator (#3292) 2022-07-18 23:15:40 +00:00
Cargo.lock Libp2p v0.48.0 upgrade (#3547) 2022-09-29 01:50:11 +00:00
Cargo.toml Add maxperf build profile (#3608) 2022-09-29 06:13:33 +00:00
CONTRIBUTING.md [Contribution docs] Add GitPOAP Badge to Display Number of Minted GitPOAPs for Contributors (#3343) 2022-08-09 02:27:04 +00:00
Cross.toml Libp2p v0.48.0 upgrade (#3547) 2022-09-29 01:50:11 +00:00
Dockerfile Libp2p v0.48.0 upgrade (#3547) 2022-09-29 01:50:11 +00:00
Dockerfile.cross Use a stable tag for ubuntu in dockerfile (#3231) 2022-05-31 06:09:12 +00:00
LICENSE Update License to Apache 2.0 2019-04-15 16:47:35 +10:00
Makefile Add maxperf build profile (#3608) 2022-09-29 06:13:33 +00:00
README.md Remove build status badge from README (#3195) 2022-05-20 05:02:14 +00:00
SECURITY.md Add how users should report security vulnerabilities for this repository (#2562) 2021-09-07 01:54:05 +00:00

Lighthouse: Ethereum consensus client

An open-source Ethereum consensus client, written in Rust and maintained by Sigma Prime.

Book Status Chat Badge

Documentation

Banner

Overview

Lighthouse is:

  • Ready for use on Ethereum consensus mainnet.
  • Fully open-source, licensed under Apache 2.0.
  • Security-focused. Fuzzing techniques have been continuously applied and several external security reviews have been performed.
  • Built in Rust, a modern language providing unique safety guarantees and excellent performance (comparable to C++).
  • Funded by various organisations, including Sigma Prime, the Ethereum Foundation, ConsenSys, the Decentralization Foundation and private individuals.
  • Actively involved in the specification and security analysis of the Ethereum proof-of-stake consensus specification.

Staking Deposit Contract

The Lighthouse team acknowledges 0x00000000219ab540356cBB839Cbe05303d7705Fa as the canonical staking deposit contract address.

Documentation

The Lighthouse Book contains information for users and developers.

The Lighthouse team maintains a blog at lighthouse-blog.sigmaprime.io which contains periodical progress updates, roadmap insights and interesting findings.

Branches

Lighthouse maintains two permanent branches:

  • stable: Always points to the latest stable release.
    • This is ideal for most users.
  • unstable: Used for development, contains the latest PRs.
    • Developers should base their PRs on this branch.

Contributing

Lighthouse welcomes contributors.

If you are looking to contribute, please head to the Contributing section of the Lighthouse book.

Contact

The best place for discussion is the Lighthouse Discord server.

Sign up to the Lighthouse Development Updates mailing list for email notifications about releases, network status and other important information.

Encrypt sensitive messages using our PGP key.

Donations

Lighthouse is an open-source project and a public good. Funding public goods is hard and we're grateful for the donations we receive from the community via:

  • Gitcoin Grants.
  • Ethereum address: 0x25c4a76E7d118705e7Ea2e9b7d8C59930d8aCD3b (donation.sigmaprime.eth).