Skip to content

Commit

Permalink
Test backfill (#5109)
Browse files Browse the repository at this point in the history
* Test backfill

* Revert cargo.toml

* Update beacon_node/beacon_chain/src/builder.rs

Co-authored-by: João Oliveira <hello@jxs.pt>

* Remove redundant code
  • Loading branch information
AgeManning authored Jan 31, 2024
1 parent a257a12 commit 7582da7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions beacon_node/beacon_chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ write_ssz_files = [] # Writes debugging .ssz files to /tmp during block process
participation_metrics = [] # Exposes validator participation metrics to Prometheus.
fork_from_env = [] # Initialise the harness chain spec from the FORK_NAME env variable
portable = ["bls/supranational-portable"]
test_backfill = []

[dev-dependencies]
maplit = { workspace = true }
Expand Down
12 changes: 8 additions & 4 deletions beacon_node/beacon_chain/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -846,10 +846,14 @@ where
let genesis_backfill_slot = if self.chain_config.genesis_backfill {
Slot::new(0)
} else {
let backfill_epoch_range = (self.spec.min_validator_withdrawability_delay
+ self.spec.churn_limit_quotient)
.as_u64()
/ 2;
let backfill_epoch_range = if cfg!(feature = "test_backfill") {
3
} else {
(self.spec.min_validator_withdrawability_delay + self.spec.churn_limit_quotient)
.as_u64()
/ 2
};

match slot_clock.now() {
Some(current_slot) => {
let genesis_backfill_epoch = current_slot
Expand Down

0 comments on commit 7582da7

Please sign in to comment.