Skip to content

Commit 68b296a

Browse files
AgeManningdanielrachi1
authored andcommitted
Test backfill (sigp#5109)
* Test backfill * Revert cargo.toml * Update beacon_node/beacon_chain/src/builder.rs Co-authored-by: João Oliveira <[email protected]> * Remove redundant code
1 parent 696e9b6 commit 68b296a

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

beacon_node/beacon_chain/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ write_ssz_files = [] # Writes debugging .ssz files to /tmp during block process
1111
participation_metrics = [] # Exposes validator participation metrics to Prometheus.
1212
fork_from_env = [] # Initialise the harness chain spec from the FORK_NAME env variable
1313
portable = ["bls/supranational-portable"]
14+
test_backfill = []
1415

1516
[dev-dependencies]
1617
maplit = { workspace = true }

beacon_node/beacon_chain/src/builder.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -846,10 +846,14 @@ where
846846
let genesis_backfill_slot = if self.chain_config.genesis_backfill {
847847
Slot::new(0)
848848
} else {
849-
let backfill_epoch_range = (self.spec.min_validator_withdrawability_delay
850-
+ self.spec.churn_limit_quotient)
851-
.as_u64()
852-
/ 2;
849+
let backfill_epoch_range = if cfg!(feature = "test_backfill") {
850+
3
851+
} else {
852+
(self.spec.min_validator_withdrawability_delay + self.spec.churn_limit_quotient)
853+
.as_u64()
854+
/ 2
855+
};
856+
853857
match slot_clock.now() {
854858
Some(current_slot) => {
855859
let genesis_backfill_epoch = current_slot

0 commit comments

Comments
 (0)