@@ -57,6 +57,16 @@ public class Eth2NetworkConfiguration {
5757
5858 public static final boolean DEFAULT_FORK_CHOICE_LATE_BLOCK_REORG_ENABLED = false ;
5959
60+ public static final boolean DEFAULT_AGGREGATING_ATTESTATION_POOL_PROFILING_ENABLED = false ;
61+ public static final boolean DEFAULT_AGGREGATING_ATTESTATION_POOL_V2_ENABLED = false ;
62+ public static final int
63+ DEFAULT_AGGREGATING_ATTESTATION_POOL_V2_BLOCK_AGGREGATION_TIME_LIMIT_MILLIS = 150 ;
64+ public static final int
65+ DEFAULT_AGGREGATING_ATTESTATION_POOL_V2_TOTAL_BLOCK_AGGREGATION_TIME_LIMIT_MILLIS = 500 ;
66+ public static final boolean
67+ DEFAULT_AGGREGATING_ATTESTATION_POOL_V2_EARLY_DROP_SINGLE_ATTESTATIONS_ENABLED = true ;
68+ public static final boolean DEFAULT_AGGREGATING_ATTESTATION_POOL_V2_PARALLEL_ENABLED = true ;
69+
6070 // should fit attestations for a slot given validator set size
6171 // so DEFAULT_MAX_QUEUE_PENDING_ATTESTATIONS * slots_per_epoch should be >= validator set size
6272 // ideally
@@ -117,6 +127,12 @@ public class Eth2NetworkConfiguration {
117127 private final boolean forkChoiceUpdatedAlwaysSendPayloadAttributes ;
118128 private final int pendingAttestationsMaxQueue ;
119129 private final boolean rustKzgEnabled ;
130+ private final boolean aggregatingAttestationPoolV2Enabled ;
131+ private final boolean aggregatingAttestationPoolProfilingEnabled ;
132+ private final int aggregatingAttestationPoolV2BlockAggregationTimeLimit ;
133+ private final int aggregatingAttestationPoolV2TotalBlockAggregationTimeLimit ;
134+ private final boolean aggregatingAttestationPoolV2EarlyDropSingleAttestationsEnabled ;
135+ private final boolean aggregatingAttestationPoolV2ParallelEnabled ;
120136
121137 private Eth2NetworkConfiguration (
122138 final Spec spec ,
@@ -145,7 +161,13 @@ private Eth2NetworkConfiguration(
145161 final boolean forkChoiceLateBlockReorgEnabled ,
146162 final boolean forkChoiceUpdatedAlwaysSendPayloadAttributes ,
147163 final int pendingAttestationsMaxQueue ,
148- final boolean rustKzgEnabled ) {
164+ final boolean rustKzgEnabled ,
165+ final boolean aggregatingAttestationPoolV2Enabled ,
166+ final boolean aggregatingAttestationPoolProfilingEnabled ,
167+ final int aggregatingAttestationPoolV2BlockAggregationTimeLimit ,
168+ final int aggregatingAttestationPoolV2TotalBlockAggregationTimeLimit ,
169+ final boolean aggregatingAttestationPoolV2EarlyDropSingleAttestationsEnabled ,
170+ final boolean aggregatingAttestationPoolV2ParallelEnabled ) {
149171 this .spec = spec ;
150172 this .constants = constants ;
151173 this .stateBoostrapConfig = stateBoostrapConfig ;
@@ -177,6 +199,15 @@ private Eth2NetworkConfiguration(
177199 forkChoiceUpdatedAlwaysSendPayloadAttributes ;
178200 this .pendingAttestationsMaxQueue = pendingAttestationsMaxQueue ;
179201 this .rustKzgEnabled = rustKzgEnabled ;
202+ this .aggregatingAttestationPoolV2Enabled = aggregatingAttestationPoolV2Enabled ;
203+ this .aggregatingAttestationPoolProfilingEnabled = aggregatingAttestationPoolProfilingEnabled ;
204+ this .aggregatingAttestationPoolV2BlockAggregationTimeLimit =
205+ aggregatingAttestationPoolV2BlockAggregationTimeLimit ;
206+ this .aggregatingAttestationPoolV2TotalBlockAggregationTimeLimit =
207+ aggregatingAttestationPoolV2TotalBlockAggregationTimeLimit ;
208+ this .aggregatingAttestationPoolV2EarlyDropSingleAttestationsEnabled =
209+ aggregatingAttestationPoolV2EarlyDropSingleAttestationsEnabled ;
210+ this .aggregatingAttestationPoolV2ParallelEnabled = aggregatingAttestationPoolV2ParallelEnabled ;
180211
181212 LOG .debug (
182213 "P2P async queue - {} threads, max queue size {} " , asyncP2pMaxThreads , asyncP2pMaxQueue );
@@ -290,6 +321,30 @@ public boolean isForkChoiceLateBlockReorgEnabled() {
290321 return forkChoiceLateBlockReorgEnabled ;
291322 }
292323
324+ public boolean isAggregatingAttestationPoolV2Enabled () {
325+ return aggregatingAttestationPoolV2Enabled ;
326+ }
327+
328+ public boolean isAggregatingAttestationPoolProfilingEnabled () {
329+ return aggregatingAttestationPoolProfilingEnabled ;
330+ }
331+
332+ public int getAggregatingAttestationPoolV2BlockAggregationTimeLimit () {
333+ return aggregatingAttestationPoolV2BlockAggregationTimeLimit ;
334+ }
335+
336+ public int getAggregatingAttestationPoolV2TotalBlockAggregationTimeLimit () {
337+ return aggregatingAttestationPoolV2TotalBlockAggregationTimeLimit ;
338+ }
339+
340+ public boolean isAggregatingAttestationPoolV2EarlyDropSingleAttestationsEnabled () {
341+ return aggregatingAttestationPoolV2EarlyDropSingleAttestationsEnabled ;
342+ }
343+
344+ public boolean isAggregatingAttestationPoolV2ParallelEnabled () {
345+ return aggregatingAttestationPoolV2ParallelEnabled ;
346+ }
347+
293348 public int getPendingAttestationsMaxQueue () {
294349 return pendingAttestationsMaxQueue ;
295350 }
@@ -323,6 +378,17 @@ public boolean equals(final Object o) {
323378 && asyncBeaconChainMaxQueue == that .asyncBeaconChainMaxQueue
324379 && asyncP2pMaxQueue == that .asyncP2pMaxQueue
325380 && forkChoiceLateBlockReorgEnabled == that .forkChoiceLateBlockReorgEnabled
381+ && aggregatingAttestationPoolV2Enabled == that .aggregatingAttestationPoolV2Enabled
382+ && aggregatingAttestationPoolProfilingEnabled
383+ == that .aggregatingAttestationPoolProfilingEnabled
384+ && aggregatingAttestationPoolV2BlockAggregationTimeLimit
385+ == that .aggregatingAttestationPoolV2BlockAggregationTimeLimit
386+ && aggregatingAttestationPoolV2TotalBlockAggregationTimeLimit
387+ == that .aggregatingAttestationPoolV2TotalBlockAggregationTimeLimit
388+ && aggregatingAttestationPoolV2EarlyDropSingleAttestationsEnabled
389+ == that .aggregatingAttestationPoolV2EarlyDropSingleAttestationsEnabled
390+ && aggregatingAttestationPoolV2ParallelEnabled
391+ == that .aggregatingAttestationPoolV2ParallelEnabled
326392 && forkChoiceUpdatedAlwaysSendPayloadAttributes
327393 == that .forkChoiceUpdatedAlwaysSendPayloadAttributes
328394 && rustKzgEnabled == that .rustKzgEnabled
@@ -413,6 +479,19 @@ public static class Builder {
413479 private OptionalInt pendingAttestationsMaxQueue = OptionalInt .empty ();
414480 private boolean rustKzgEnabled = DEFAULT_RUST_KZG_ENABLED ;
415481 private boolean strictConfigLoadingEnabled ;
482+ private boolean aggregatingAttestationPoolV2Enabled =
483+ DEFAULT_AGGREGATING_ATTESTATION_POOL_V2_ENABLED ;
484+ private boolean aggregatingAttestationPoolProfilingEnabled =
485+ DEFAULT_AGGREGATING_ATTESTATION_POOL_PROFILING_ENABLED ;
486+ private int aggregatingAttestationPoolV2BlockAggregationTimeLimit =
487+ DEFAULT_AGGREGATING_ATTESTATION_POOL_V2_BLOCK_AGGREGATION_TIME_LIMIT_MILLIS ;
488+ private int aggregatingAttestationPoolV2TotalBlockAggregationTimeLimit =
489+ DEFAULT_AGGREGATING_ATTESTATION_POOL_V2_TOTAL_BLOCK_AGGREGATION_TIME_LIMIT_MILLIS ;
490+
491+ private boolean aggregatingAttestationPoolV2EarlyDropSingleAttestationsEnabled =
492+ DEFAULT_AGGREGATING_ATTESTATION_POOL_V2_EARLY_DROP_SINGLE_ATTESTATIONS_ENABLED ;
493+ private boolean aggregatingAttestationPoolV2ParallelEnabled =
494+ DEFAULT_AGGREGATING_ATTESTATION_POOL_V2_PARALLEL_ENABLED ;
416495
417496 public void spec (final Spec spec ) {
418497 this .spec = spec ;
@@ -513,7 +592,13 @@ public Eth2NetworkConfiguration build() {
513592 forkChoiceLateBlockReorgEnabled ,
514593 forkChoiceUpdatedAlwaysSendPayloadAttributes ,
515594 pendingAttestationsMaxQueue .orElse (DEFAULT_MAX_QUEUE_PENDING_ATTESTATIONS ),
516- rustKzgEnabled );
595+ rustKzgEnabled ,
596+ aggregatingAttestationPoolV2Enabled ,
597+ aggregatingAttestationPoolProfilingEnabled ,
598+ aggregatingAttestationPoolV2BlockAggregationTimeLimit ,
599+ aggregatingAttestationPoolV2TotalBlockAggregationTimeLimit ,
600+ aggregatingAttestationPoolV2EarlyDropSingleAttestationsEnabled ,
601+ aggregatingAttestationPoolV2ParallelEnabled );
517602 }
518603
519604 private void validateCommandLineParameters () {
@@ -1049,6 +1134,46 @@ public Builder forkChoiceLateBlockReorgEnabled(final boolean forkChoiceLateBlock
10491134 return this ;
10501135 }
10511136
1137+ public Builder aggregatingAttestationPoolV2Enabled (
1138+ final boolean aggregatingAttestationPoolV2Enabled ) {
1139+ this .aggregatingAttestationPoolV2Enabled = aggregatingAttestationPoolV2Enabled ;
1140+ return this ;
1141+ }
1142+
1143+ public Builder aggregatingAttestationPoolProfilingEnabled (
1144+ final boolean aggregatingAttestationPoolProfilingEnabled ) {
1145+ this .aggregatingAttestationPoolProfilingEnabled = aggregatingAttestationPoolProfilingEnabled ;
1146+ return this ;
1147+ }
1148+
1149+ public Builder aggregatingAttestationPoolV2BlockAggregationTimeLimit (
1150+ final int aggregatingAttestationPoolV2BlockAggregationTimeLimit ) {
1151+ this .aggregatingAttestationPoolV2BlockAggregationTimeLimit =
1152+ aggregatingAttestationPoolV2BlockAggregationTimeLimit ;
1153+ return this ;
1154+ }
1155+
1156+ public Builder aggregatingAttestationPoolV2TotalBlockAggregationTimeLimit (
1157+ final int aggregatingAttestationPoolV2TotalBlockAggregationTimeLimit ) {
1158+ this .aggregatingAttestationPoolV2TotalBlockAggregationTimeLimit =
1159+ aggregatingAttestationPoolV2TotalBlockAggregationTimeLimit ;
1160+ return this ;
1161+ }
1162+
1163+ public Builder aggregatingAttestationPoolV2EarlyDropSingleAttestationsEnabled (
1164+ final boolean aggregatingAttestationPoolV2EarlyDropSingleAttestationsEnabled ) {
1165+ this .aggregatingAttestationPoolV2EarlyDropSingleAttestationsEnabled =
1166+ aggregatingAttestationPoolV2EarlyDropSingleAttestationsEnabled ;
1167+ return this ;
1168+ }
1169+
1170+ public Builder aggregatingAttestationPoolV2ParallelEnabled (
1171+ final boolean aggregatingAttestationPoolV2ParallelEnabled ) {
1172+ this .aggregatingAttestationPoolV2ParallelEnabled =
1173+ aggregatingAttestationPoolV2ParallelEnabled ;
1174+ return this ;
1175+ }
1176+
10521177 public Builder forkChoiceUpdatedAlwaysSendPayloadAttributes (
10531178 final boolean forkChoiceUpdatedAlwaysSendPayloadAttributes ) {
10541179 this .forkChoiceUpdatedAlwaysSendPayloadAttributes =
0 commit comments