mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-22 03:30:38 +00:00
c25825a539
*Replaces #4434. It is identical, but this PR has a smaller diff due to a curated commit history.* ## Issue Addressed NA ## Proposed Changes This PR moves the scheduling logic for the `BeaconProcessor` into a new crate in `beacon_node/beacon_processor`. Previously it existed in the `beacon_node/network` crate. This addresses a circular-dependency problem where it's not possible to use the `BeaconProcessor` from the `beacon_chain` crate. The `network` crate depends on the `beacon_chain` crate (`network -> beacon_chain`), but importing the `BeaconProcessor` into the `beacon_chain` crate would create a circular dependancy of `beacon_chain -> network`. The `BeaconProcessor` was designed to provide queuing and prioritized scheduling for messages from the network. It has proven to be quite valuable and I believe we'd make Lighthouse more stable and effective by using it elsewhere. In particular, I think we should use the `BeaconProcessor` for: 1. HTTP API requests. 1. Scheduled tasks in the `BeaconChain` (e.g., state advance). Using the `BeaconProcessor` for these tasks would help prevent the BN from becoming overwhelmed and would also help it to prioritize operations (e.g., choosing to process blocks from gossip before responding to low-priority HTTP API requests). ## Additional Info This PR is intended to have zero impact on runtime behaviour. It aims to simply separate the *scheduling* code (i.e., the `BeaconProcessor`) from the *business logic* in the `network` crate (i.e., the `Worker` impls). Future PRs (see #4462) can build upon these works to actually use the `BeaconProcessor` for more operations. I've gone to some effort to use `git mv` to make the diff look more like "file was moved and modified" rather than "file was deleted and a new one added". This should reduce review burden and help maintain commit attribution.
107 lines
2.9 KiB
TOML
107 lines
2.9 KiB
TOML
[workspace]
|
|
members = [
|
|
"account_manager",
|
|
|
|
"beacon_node",
|
|
"beacon_node/beacon_chain",
|
|
"beacon_node/beacon_processor",
|
|
"beacon_node/builder_client",
|
|
"beacon_node/client",
|
|
"beacon_node/eth1",
|
|
"beacon_node/lighthouse_network",
|
|
"beacon_node/execution_layer",
|
|
"beacon_node/http_api",
|
|
"beacon_node/http_metrics",
|
|
"beacon_node/network",
|
|
"beacon_node/store",
|
|
"beacon_node/timer",
|
|
|
|
"boot_node",
|
|
|
|
"common/account_utils",
|
|
"common/clap_utils",
|
|
"common/compare_fields",
|
|
"common/compare_fields_derive",
|
|
"common/deposit_contract",
|
|
"common/directory",
|
|
"common/eth2",
|
|
"common/eth2_config",
|
|
"common/eth2_interop_keypairs",
|
|
"common/eth2_network_config",
|
|
"common/eth2_wallet_manager",
|
|
"common/lighthouse_metrics",
|
|
"common/lighthouse_version",
|
|
"common/lockfile",
|
|
"common/logging",
|
|
"common/lru_cache",
|
|
"common/malloc_utils",
|
|
"common/oneshot_broadcast",
|
|
"common/pretty_reqwest_error",
|
|
"common/sensitive_url",
|
|
"common/slot_clock",
|
|
"common/system_health",
|
|
"common/task_executor",
|
|
"common/target_check",
|
|
"common/test_random_derive",
|
|
"common/unused_port",
|
|
"common/validator_dir",
|
|
"common/warp_utils",
|
|
"common/monitoring_api",
|
|
|
|
"database_manager",
|
|
|
|
"consensus/cached_tree_hash",
|
|
"consensus/int_to_bytes",
|
|
"consensus/fork_choice",
|
|
"consensus/proto_array",
|
|
"consensus/safe_arith",
|
|
"consensus/state_processing",
|
|
"consensus/swap_or_not_shuffle",
|
|
|
|
"crypto/bls",
|
|
"crypto/eth2_key_derivation",
|
|
"crypto/eth2_keystore",
|
|
"crypto/eth2_wallet",
|
|
|
|
"lcli",
|
|
|
|
"lighthouse",
|
|
"lighthouse/environment",
|
|
|
|
"slasher",
|
|
"slasher/service",
|
|
|
|
"testing/ef_tests",
|
|
"testing/eth1_test_rig",
|
|
"testing/execution_engine_integration",
|
|
"testing/node_test_rig",
|
|
"testing/simulator",
|
|
"testing/test-test_logger",
|
|
"testing/state_transition_vectors",
|
|
"testing/web3signer_tests",
|
|
|
|
"validator_client",
|
|
"validator_client/slashing_protection",
|
|
|
|
"watch",
|
|
]
|
|
resolver = "2"
|
|
|
|
[patch]
|
|
[patch.crates-io]
|
|
warp = { git = "https://github.com/macladson/warp", rev="7e75acc368229a46a236a8c991bf251fe7fe50ef" }
|
|
arbitrary = { git = "https://github.com/michaelsproul/arbitrary", rev="f002b99989b561ddce62e4cf2887b0f8860ae991" }
|
|
|
|
[patch."https://github.com/ralexstokes/mev-rs"]
|
|
mev-rs = { git = "https://github.com/ralexstokes//mev-rs", rev = "7813d4a4a564e0754e9aaab2d95520ba437c3889" }
|
|
[patch."https://github.com/ralexstokes/ethereum-consensus"]
|
|
ethereum-consensus = { git = "https://github.com/ralexstokes//ethereum-consensus", rev = "9b0ee0a8a45b968c8df5e7e64ea1c094e16f053d" }
|
|
[patch."https://github.com/ralexstokes/ssz-rs"]
|
|
ssz-rs = { git = "https://github.com/ralexstokes//ssz-rs", rev = "adf1a0b14cef90b9536f28ef89da1fab316465e1" }
|
|
|
|
[profile.maxperf]
|
|
inherits = "release"
|
|
lto = "fat"
|
|
codegen-units = 1
|
|
incremental = false
|