d9f4819fe0
The PR: * Adds the ability to generate a crucial test scenario that isn't possible with `BeaconChainHarness` (i.e. two blocks occupying the same slot; previously forks necessitated skipping slots): ![image](https://user-images.githubusercontent.com/165678/88195404-4bce3580-cc40-11ea-8c08-b48d2e1d5959.png) * New testing API: Instead of repeatedly calling add_block(), you generate a sorted `Vec<Slot>` and leave it up to the framework to generate blocks at those slots. * Jumping backwards to an earlier epoch is a hard error, so that tests necessarily generate blocks in a epoch-by-epoch manner. * Configures the test logger so that output is printed on the console in case a test fails. The logger also plays well with `--nocapture`, contrary to the existing testing framework * Rewrites existing fork pruning tests to use the new API * Adds a tests that triggers finalization at a non epoch boundary slot * Renamed `BeaconChainYoke` to `BeaconChainTestingRig` because the former has been too confusing * Fixed multiple tests (e.g. `block_production_different_shuffling_long`, `delete_blocks_and_states`, `shuffling_compatible_simple_fork`) that relied on a weird (and accidental) feature of the old `BeaconChainHarness` that attestations aren't produced for epochs earlier than the current one, thus masking potential bugs in test cases. Co-authored-by: Michael Sproul <michael@sigmaprime.io>
61 lines
1.8 KiB
TOML
61 lines
1.8 KiB
TOML
[package]
|
|
name = "beacon_chain"
|
|
version = "0.2.0"
|
|
authors = ["Paul Hauner <paul@paulhauner.com>", "Age Manning <Age@AgeManning.com>"]
|
|
edition = "2018"
|
|
|
|
[features]
|
|
default = ["participation_metrics"]
|
|
write_ssz_files = [] # Writes debugging .ssz files to /tmp during block processing.
|
|
participation_metrics = [] # Exposes validator participation metrics to Prometheus.
|
|
|
|
[dev-dependencies]
|
|
int_to_bytes = { path = "../../consensus/int_to_bytes" }
|
|
maplit = "1.0.2"
|
|
|
|
[dependencies]
|
|
eth2_config = { path = "../../common/eth2_config" }
|
|
merkle_proof = { path = "../../consensus/merkle_proof" }
|
|
store = { path = "../store" }
|
|
parking_lot = "0.11.0"
|
|
lazy_static = "1.4.0"
|
|
smallvec = "1.4.1"
|
|
lighthouse_metrics = { path = "../../common/lighthouse_metrics" }
|
|
log = "0.4.8"
|
|
operation_pool = { path = "../operation_pool" }
|
|
rayon = "1.3.0"
|
|
serde = "1.0.110"
|
|
serde_derive = "1.0.110"
|
|
serde_yaml = "0.8.11"
|
|
serde_json = "1.0.52"
|
|
slog = { version = "2.5.2", features = ["max_level_trace"] }
|
|
slog-term = "2.6.0"
|
|
sloggers = "1.0.0"
|
|
slot_clock = { path = "../../common/slot_clock" }
|
|
eth2_hashing = "0.1.0"
|
|
eth2_ssz = "0.1.2"
|
|
eth2_ssz_types = { path = "../../consensus/ssz_types" }
|
|
eth2_ssz_derive = "0.1.0"
|
|
state_processing = { path = "../../consensus/state_processing" }
|
|
tree_hash = "0.1.0"
|
|
types = { path = "../../consensus/types" }
|
|
tokio = "0.2.21"
|
|
eth1 = { path = "../eth1" }
|
|
websocket_server = { path = "../websocket_server" }
|
|
futures = "0.3.5"
|
|
genesis = { path = "../genesis" }
|
|
integer-sqrt = "0.1.3"
|
|
rand = "0.7.3"
|
|
rand_core = "0.5.1"
|
|
proto_array = { path = "../../consensus/proto_array" }
|
|
lru = "0.5.1"
|
|
tempfile = "3.1.0"
|
|
bitvec = "0.17.4"
|
|
bls = { path = "../../crypto/bls" }
|
|
safe_arith = { path = "../../consensus/safe_arith" }
|
|
fork_choice = { path = "../../consensus/fork_choice" }
|
|
environment = { path = "../../lighthouse/environment" }
|
|
bus = "2.2.3"
|
|
derivative = "2.1.1"
|
|
itertools = "0.9.0"
|