**Motivation** While going through block production logs I noticed in some rare cases we sent header requests pretty delayed into the slot, but not if you look at our logs, it shows that header was sent at ~100ms but mev-boost received it at ~600ms which is a huge discrepancy. When further analysing this I noticed that ~600ms is roughtly the time we finished producing the common block body. This means we can't really trust the logs here as they might be emitted but the actual HTTP request is not sent. Since this issue is pretty rare and most of the time we sent the requests <100ms I think it's race condition and highly depends on I/O timing and what other async/sync load is processed. Another interesting side effect of this is that when these huge delays happen (up to 500ms) I also noticed that builder HTTP requests run into the 1 second timeout even though it looks from mev-boost perspective that response was sent within time. My guess here is that the `fetch` implementation sets the timer and starts it but since sending the actual HTTP requests requires to go through poll phase it might not actually bet sent. Long story short, we need to wait until next evet loop iteration to ensure I/O operations are processed before starting common block body production as it is synchronous and blocking. **Description** Defer call produce common block body `produceCommonBlockBody` to next event loop by running it in `setImmediate` callback. Previous PR https://github.com/ChainSafe/lodestar/pull/7814
Lodestar Ethereum Consensus Implementation
Lodestar is a TypeScript implementation of the Ethereum Consensus specification developed by ChainSafe Systems.
Getting started
- ⚙️ Follow the instructions for build from source, binaries, or Docker to install Lodestar. Or use our Lodestar Quickstart scripts.
- 📚 Use Lodestar libraries in your next Ethereum Typescript project.
- 🌐 Run a beacon node on mainnet or a public testnet.
- 💻 Utilize the whole stack by starting a local testnet.
- 🗒️ View the Lodestar CLI commands and options.
- 🤓 View the Package and dependency structure.
- 📝 Prospective contributors can read the contributing section to understand how we develop and test on Lodestar.
- ✍️ If you have questions submit an issue or join us on Discord!
- 🚨 Please note our security policy.
- 🐦 Follow Lodestar on Twitter for announcements and updates!
Prerequisites
Developer Quickstart:
yarn install
yarn build
./lodestar --help
Architecture Overview
- 📦 This mono-repository contains a suite of Ethereum Consensus packages.
- ⚖️ The mono-repository is released under Apache-2.0 license. Note, that the packages contain their own licenses.
| Package | Version | License | Docs | Description |
|---|---|---|---|---|
@chainsafe/lodestar |
💻 Command-line tool for Lodestar | |||
@lodestar/api |
📋 REST Client for the Ethereum Beacon API | |||
@lodestar/beacon-node |
🚨 Beacon-chain client | |||
@lodestar/config |
🗒️ Eth Consensus types and params bundled together | |||
@lodestar/db |
💾 Read/write persistent Eth Consensus data | |||
@lodestar/flare |
💥 Command tool for triggering non-standard actions | |||
@lodestar/fork-choice |
🍴 Beacon-chain fork choice | |||
@lodestar/light-client |
🐦 Ethereum Light client | |||
@lodestar/logger |
📝 NodeJS logger for Lodestar binaries | |||
@lodestar/params |
🕸️ Eth Consensus network parameters | |||
@lodestar/prover |
✅ Ethereum Light client verifier for execution JSON-RPC calls | |||
@lodestar/reqresp |
📞 Eth Consensus Req/Resp protocol | |||
@lodestar/spec-test-util |
🧪 Test harness for Eth Consensus spec tests | |||
@lodestar/state-transition |
🔎 Eth Consensus beacon-state transition | |||
@lodestar/types |
🗒️ Eth Consensus TypeScript and SSZ types | |||
@lodestar/utils |
🧰 Miscellaneous utility functions used across Lodestar | |||
@lodestar/validator |
🏦 Validator client |
Contributors
Read our contributors document, submit an issue or talk to us on our Discord!
Meetings
Weekly contributor meetings are posted under Discussions and topics are welcomed by any participant in the relevant meeting thread. Feel free to check out our meeting notes and documents on HackMD. Post-September 2021, meeting notes can be found on the Lodestar Wiki Page.
Donations
We are a local group of Toronto open-source developers. As such, all of our open-source work is funded by grants. We all take the time out of our hectic lives to contribute to the Ethereum ecosystem. If you want to donate, you can find the ETH address under "Sponsor this project" on this repository.