Skip to content

Commit

Permalink
remove constants
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Dec 5, 2024
1 parent 2706ab6 commit 78bf817
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,16 +327,6 @@ public int getMaxChunkSize() {
return specConfig.getMaxChunkSize();
}

@Override
public int getTtfbTimeout() {
return specConfig.getTtfbTimeout();
}

@Override
public int getRespTimeout() {
return specConfig.getRespTimeout();
}

@Override
public int getAttestationPropagationSlotRange() {
return specConfig.getAttestationPropagationSlotRange();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ public interface NetworkingSpecConfig {

int getMinEpochsForBlockRequests();

// in seconds
int getTtfbTimeout();

// in seconds
int getRespTimeout();

int getAttestationPropagationSlotRange();

// in millis
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ public class SpecConfigPhase0 implements SpecConfig {
private final int maxRequestBlocks;
private final int epochsPerSubnetSubscription;
private final int minEpochsForBlockRequests;
private final int ttfbTimeout;
private final int respTimeout;
private final int attestationPropagationSlotRange;
private final int maximumGossipClockDisparity;
private final Bytes4 messageDomainInvalidSnappy;
Expand Down Expand Up @@ -179,8 +177,6 @@ public SpecConfigPhase0(
final int maxRequestBlocks,
final int epochsPerSubnetSubscription,
final int minEpochsForBlockRequests,
final int ttfbTimeout,
final int respTimeout,
final int attestationPropagationSlotRange,
final int maximumGossipClockDisparity,
final Bytes4 messageDomainInvalidSnappy,
Expand Down Expand Up @@ -249,8 +245,6 @@ public SpecConfigPhase0(
this.maxRequestBlocks = maxRequestBlocks;
this.epochsPerSubnetSubscription = epochsPerSubnetSubscription;
this.minEpochsForBlockRequests = minEpochsForBlockRequests;
this.ttfbTimeout = ttfbTimeout;
this.respTimeout = respTimeout;
this.attestationPropagationSlotRange = attestationPropagationSlotRange;
this.maximumGossipClockDisparity = maximumGossipClockDisparity;
this.messageDomainInvalidSnappy = messageDomainInvalidSnappy;
Expand Down Expand Up @@ -585,16 +579,6 @@ public int getMinEpochsForBlockRequests() {
return minEpochsForBlockRequests;
}

@Override
public int getTtfbTimeout() {
return ttfbTimeout;
}

@Override
public int getRespTimeout() {
return respTimeout;
}

@Override
public int getAttestationPropagationSlotRange() {
return attestationPropagationSlotRange;
Expand Down Expand Up @@ -691,8 +675,6 @@ public boolean equals(final Object o) {
&& attestationSubnetCount == that.attestationSubnetCount
&& attestationSubnetExtraBits == that.attestationSubnetExtraBits
&& attestationSubnetPrefixBits == that.attestationSubnetPrefixBits
&& ttfbTimeout == that.ttfbTimeout
&& respTimeout == that.respTimeout
&& attestationPropagationSlotRange == that.attestationPropagationSlotRange
&& maximumGossipClockDisparity == that.maximumGossipClockDisparity
&& Objects.equals(eth1FollowDistance, that.eth1FollowDistance)
Expand Down Expand Up @@ -772,8 +754,6 @@ public int hashCode() {
maxChunkSize,
maxRequestBlocks,
epochsPerSubnetSubscription,
ttfbTimeout,
respTimeout,
attestationPropagationSlotRange,
maximumGossipClockDisparity,
messageDomainInvalidSnappy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ public class SpecConfigBuilder {
private Integer maxChunkSize;
private Integer maxRequestBlocks;
private Integer epochsPerSubnetSubscription;
private Integer ttfbTimeout;
private Integer respTimeout;
private Integer attestationPropagationSlotRange;
private Integer maximumGossipClockDisparity;
private Bytes4 messageDomainInvalidSnappy;
Expand Down Expand Up @@ -205,8 +203,6 @@ public SpecConfigAndParent<SpecConfigElectra> build() {
maxRequestBlocks,
epochsPerSubnetSubscription,
minEpochsForBlockRequests,
ttfbTimeout,
respTimeout,
attestationPropagationSlotRange,
maximumGossipClockDisparity,
messageDomainInvalidSnappy,
Expand Down Expand Up @@ -279,8 +275,6 @@ private Map<String, Object> getValidationMap() {
constants.put("maxRequestBlocks", maxRequestBlocks);
constants.put("epochsPerSubnetSubscription", epochsPerSubnetSubscription);
constants.put("minEpochsForBlockRequests", minEpochsForBlockRequests);
constants.put("ttfbTimeout", ttfbTimeout);
constants.put("respTimeout", respTimeout);
constants.put("attestationPropagationSlotRange", attestationPropagationSlotRange);
constants.put("maximumGossipClockDisparity", maximumGossipClockDisparity);
constants.put("messageDomainInvalidSnappy", messageDomainInvalidSnappy);
Expand Down Expand Up @@ -651,16 +645,6 @@ public SpecConfigBuilder minEpochsForBlockRequests(final Integer minEpochsForBlo
return this;
}

public SpecConfigBuilder ttfbTimeout(final Integer ttfbTimeout) {
this.ttfbTimeout = ttfbTimeout;
return this;
}

public SpecConfigBuilder respTimeout(final Integer respTimeout) {
this.respTimeout = respTimeout;
return this;
}

public SpecConfigBuilder attestationPropagationSlotRange(
final Integer attestationPropagationSlotRange) {
this.attestationPropagationSlotRange = attestationPropagationSlotRange;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ void shouldDefaultNetworkConfigThatMovedFromConstants() throws IOException {
assertThat(specConfig.getMaxRequestBlocks()).isEqualTo(1024);
assertThat(specConfig.getEpochsPerSubnetSubscription()).isEqualTo(256);
assertThat(specConfig.getMinEpochsForBlockRequests()).isEqualTo(33024);
assertThat(specConfig.getTtfbTimeout()).isEqualTo(5);
assertThat(specConfig.getRespTimeout()).isEqualTo(10);
assertThat(specConfig.getAttestationPropagationSlotRange()).isEqualTo(32);
assertThat(specConfig.getMaximumGossipClockDisparity()).isEqualTo(500);
}
Expand Down

0 comments on commit 78bf817

Please sign in to comment.