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

Configure Deneb on Goerli #7857

Merged
merged 4 commits into from
Jan 8, 2024
Merged
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 @@ -684,6 +684,7 @@ public Builder applyMainnetNetworkDefaults() {
public Builder applyPraterNetworkDefaults() {
return applyTestnetDefaults()
.constants(PRATER.configName())
.trustedSetupFromClasspath(MAINNET_TRUSTED_SETUP_FILENAME)
.startupTimeoutSeconds(120)
.eth1DepositContractDeployBlock(4367322)
.defaultInitialState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ CHURN_LIMIT_QUOTIENT: 32

# Fork choice
# ---------------------------------------------------------------
# 70%
PROPOSER_SCORE_BOOST: 70
# 40%
PROPOSER_SCORE_BOOST: 40
# 20%
REORG_HEAD_WEIGHT_THRESHOLD: 20
# 160%
Expand Down
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,12 +74,14 @@ 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we missing updating PROPOSER_SCORE_BOOST to 40?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, think so. Changed it. But this is not DENEB specific, so it's weird it hasn't been changed.

# ---------------------------------------------------------------
# 70%
PROPOSER_SCORE_BOOST: 70
# 40%
PROPOSER_SCORE_BOOST: 40
# 20%
REORG_HEAD_WEIGHT_THRESHOLD: 20
# 160%
Expand Down Expand Up @@ -119,4 +124,14 @@ 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
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 8

# Fork choice
# ---------------------------------------------------------------
# 70%
PROPOSER_SCORE_BOOST: 70
# 40%
PROPOSER_SCORE_BOOST: 40
# 20%
REORG_HEAD_WEIGHT_THRESHOLD: 20
# 160%
Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ protected void initKzg() {
.orElseThrow(
() ->
new InvalidConfigurationException(
"Trusted setup should be specified when Deneb is enabled"));
"Trusted setup should be configured when Deneb is enabled"));
kzg.loadTrustedSetup(trustedSetupFile);
} else {
kzg = KZG.NOOP;
Expand Down
Loading