mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-25 21:17:17 +00:00
38050fa460
# Description Since the `TaskExecutor` currently requires a `Weak<Runtime>`, it's impossible to use it in an async test where the `Runtime` is created outside our scope. Whilst we *could* create a new `Runtime` instance inside the async test, dropping that `Runtime` would cause a panic (you can't drop a `Runtime` in an async context). To address this issue, this PR creates the `enum Handle`, which supports either: - A `Weak<Runtime>` (for use in our production code) - A `Handle` to a runtime (for use in testing) In theory, there should be no change to the behaviour of our production code (beyond some slightly different descriptions in HTTP 500 errors), or even our tests. If there is no change, you might ask *"why bother?"*. There are two PRs (#3070 and #3175) that are waiting on these fixes to introduce some new tests. Since we've added the EL to the `BeaconChain` (for the merge), we are now doing more async stuff in tests. I've also added a `RuntimeExecutor` to the `BeaconChainTestHarness`. Whilst that's not immediately useful, it will become useful in the near future with all the new async testing.
69 lines
2.2 KiB
TOML
69 lines
2.2 KiB
TOML
[package]
|
|
name = "beacon_chain"
|
|
version = "0.2.0"
|
|
authors = ["Paul Hauner <paul@paulhauner.com>", "Age Manning <Age@AgeManning.com>"]
|
|
edition = "2021"
|
|
autotests = false # using a single test binary compiles faster
|
|
|
|
[features]
|
|
default = ["participation_metrics"]
|
|
write_ssz_files = [] # Writes debugging .ssz files to /tmp during block processing.
|
|
participation_metrics = [] # Exposes validator participation metrics to Prometheus.
|
|
fork_from_env = [] # Initialise the harness chain spec from the FORK_NAME env variable
|
|
|
|
[dev-dependencies]
|
|
maplit = "1.0.2"
|
|
environment = { path = "../../lighthouse/environment" }
|
|
serde_json = "1.0.58"
|
|
|
|
[dependencies]
|
|
merkle_proof = { path = "../../consensus/merkle_proof" }
|
|
store = { path = "../store" }
|
|
parking_lot = "0.12.0"
|
|
lazy_static = "1.4.0"
|
|
smallvec = "1.6.1"
|
|
lighthouse_metrics = { path = "../../common/lighthouse_metrics" }
|
|
operation_pool = { path = "../operation_pool" }
|
|
rayon = "1.4.1"
|
|
serde = "1.0.116"
|
|
serde_derive = "1.0.116"
|
|
slog = { version = "2.5.2", features = ["max_level_trace"] }
|
|
sloggers = { version = "2.1.1", features = ["json"] }
|
|
slot_clock = { path = "../../common/slot_clock" }
|
|
eth2_hashing = "0.3.0"
|
|
eth2_ssz = "0.4.1"
|
|
eth2_ssz_types = "0.2.2"
|
|
eth2_ssz_derive = "0.3.0"
|
|
state_processing = { path = "../../consensus/state_processing" }
|
|
tree_hash = "0.4.1"
|
|
types = { path = "../../consensus/types" }
|
|
tokio = "1.14.0"
|
|
eth1 = { path = "../eth1" }
|
|
futures = "0.3.7"
|
|
genesis = { path = "../genesis" }
|
|
int_to_bytes = { path = "../../consensus/int_to_bytes" }
|
|
rand = "0.8.5"
|
|
proto_array = { path = "../../consensus/proto_array" }
|
|
lru = "0.7.1"
|
|
tempfile = "3.1.0"
|
|
bitvec = "0.20.4"
|
|
bls = { path = "../../crypto/bls" }
|
|
safe_arith = { path = "../../consensus/safe_arith" }
|
|
fork_choice = { path = "../../consensus/fork_choice" }
|
|
task_executor = { path = "../../common/task_executor" }
|
|
derivative = "2.1.1"
|
|
itertools = "0.10.0"
|
|
slasher = { path = "../../slasher" }
|
|
eth2 = { path = "../../common/eth2" }
|
|
strum = { version = "0.24.0", features = ["derive"] }
|
|
logging = { path = "../../common/logging" }
|
|
execution_layer = { path = "../execution_layer" }
|
|
sensitive_url = { path = "../../common/sensitive_url" }
|
|
superstruct = "0.5.0"
|
|
hex = "0.4.2"
|
|
exit-future = "0.2.0"
|
|
|
|
[[test]]
|
|
name = "beacon_chain_tests"
|
|
path = "tests/main.rs"
|