Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drafted goerli deneb network change #7853

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ BELLATRIX_FORK_EPOCH: 112260
# CAPELLA
CAPELLA_FORK_VERSION: 0x03001020
CAPELLA_FORK_EPOCH: 162304
# DENEB
DENEB_FORK_VERSION: 0x04001020
DENEB_FORK_EPOCH: 231680
# Sharding
SHARDING_FORK_VERSION: 0x03001020
SHARDING_FORK_EPOCH: 18446744073709551615
Expand Down Expand Up @@ -71,6 +74,8 @@ EJECTION_BALANCE: 16000000000
MIN_PER_EPOCH_CHURN_LIMIT: 4
# 2**16 (= 65,536)
CHURN_LIMIT_QUOTIENT: 65536
# [New in Deneb:EIP7514] 2**3 (= 8)
MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 8


# Fork choice
Expand Down Expand Up @@ -119,4 +124,16 @@ SUBNETS_PER_NODE: 2
ATTESTATION_SUBNET_COUNT: 64
ATTESTATION_SUBNET_EXTRA_BITS: 0
# ceillog2(ATTESTATION_SUBNET_COUNT) + ATTESTATION_SUBNET_EXTRA_BITS
ATTESTATION_SUBNET_PREFIX_BITS: 6
ATTESTATION_SUBNET_PREFIX_BITS: 6

# Deneb
# `2**7` (=128)
MAX_REQUEST_BLOCKS_DENEB: 128
# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK
MAX_REQUEST_BLOB_SIDECARS: 768
# `2**12` (= 4096 epochs, ~18 days)
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 4096
# `6`
BLOB_SIDECAR_SUBNET_COUNT: 6
# `uint64(6)`
MAX_BLOBS_PER_BLOCK: 6
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import static tech.pegasys.teku.spec.SpecMilestone.ALTAIR;
import static tech.pegasys.teku.spec.SpecMilestone.BELLATRIX;
import static tech.pegasys.teku.spec.SpecMilestone.CAPELLA;
import static tech.pegasys.teku.spec.SpecMilestone.DENEB;
import static tech.pegasys.teku.spec.SpecMilestone.PHASE0;

import java.util.Arrays;
Expand All @@ -39,7 +40,9 @@ public class SpecFactoryTest {
private static final Set<String> NON_BELLATRIX_NETWORKS = Set.of("swift", "less-swift");

private static final Set<String> CAPELLA_NETWORKS =
Set.of("sepolia", "prater", "mainnet", "gnosis", "chiado", "lukso", "holesky");
Set.of("sepolia", "mainnet", "gnosis", "chiado", "lukso", "holesky");

private static final Set<String> DENEB_NETWORKS = Set.of("prater");

@Test
public void defaultFactoryShouldScheduleBellatrixAndCapellaForMainNet() {
Expand All @@ -59,6 +62,9 @@ public void defaultFactoryShouldNotEnableBellatrixUnlessForkEpochIsSet(final Str
} else if (CAPELLA_NETWORKS.contains(configName)) {
assertThat(spec.getForkSchedule().getSupportedMilestones())
.containsExactly(PHASE0, ALTAIR, BELLATRIX, CAPELLA);
} else if (DENEB_NETWORKS.contains(configName)) {
assertThat(spec.getForkSchedule().getSupportedMilestones())
.containsExactly(PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB);
} else {
assertThat(spec.getForkSchedule().getSupportedMilestones())
.containsExactly(PHASE0, ALTAIR, BELLATRIX);
Expand All @@ -72,11 +78,26 @@ public void shouldSupportCapellaWhenForkEpochSetInConfig(final String configName
if (CAPELLA_NETWORKS.contains(configName)) {
assertThat(spec.getForkSchedule().getSupportedMilestones())
.containsExactly(PHASE0, ALTAIR, BELLATRIX, CAPELLA);
} else if (DENEB_NETWORKS.contains(configName)) {
assertThat(spec.getForkSchedule().getSupportedMilestones())
.contains(PHASE0, ALTAIR, BELLATRIX, CAPELLA);
} else {
assertThat(spec.getForkSchedule().getSupportedMilestones()).doesNotContain(CAPELLA);
}
}

@ParameterizedTest(name = "{0}")
@MethodSource("getKnownConfigNames")
public void shouldSupportDenebWhenForkEpochSetInConfig(final String configName) {
final Spec spec = SpecFactory.create(configName);
if (DENEB_NETWORKS.contains(configName)) {
assertThat(spec.getForkSchedule().getSupportedMilestones())
.containsExactly(PHASE0, ALTAIR, BELLATRIX, CAPELLA, DENEB);
} else {
assertThat(spec.getForkSchedule().getSupportedMilestones()).doesNotContain(DENEB);
}
}

@Test
void shouldSupportAltairWhenForkEpochSetInConfig() {
final SpecConfig config =
Expand Down
Loading