@@ -55,11 +55,13 @@ pub const JSON_CONTENT_TYPE_HEADER: &str = "application/json";
55
55
const HTTP_ATTESTATION_TIMEOUT_QUOTIENT : u32 = 4 ;
56
56
const HTTP_ATTESTER_DUTIES_TIMEOUT_QUOTIENT : u32 = 4 ;
57
57
const HTTP_ATTESTATION_SUBSCRIPTIONS_TIMEOUT_QUOTIENT : u32 = 24 ;
58
+ const HTTP_ATTESTATION_AGGREGATOR_TIMEOUT_QUOTIENT : u32 = 24 ; // For DVT involving middleware only
58
59
const HTTP_LIVENESS_TIMEOUT_QUOTIENT : u32 = 4 ;
59
60
const HTTP_PROPOSAL_TIMEOUT_QUOTIENT : u32 = 2 ;
60
61
const HTTP_PROPOSER_DUTIES_TIMEOUT_QUOTIENT : u32 = 4 ;
61
62
const HTTP_SYNC_COMMITTEE_CONTRIBUTION_TIMEOUT_QUOTIENT : u32 = 4 ;
62
63
const HTTP_SYNC_DUTIES_TIMEOUT_QUOTIENT : u32 = 4 ;
64
+ const HTTP_SYNC_AGGREGATOR_TIMEOUT_QUOTIENT : u32 = 24 ; // For DVT involving middleware only
63
65
const HTTP_GET_BEACON_BLOCK_SSZ_TIMEOUT_QUOTIENT : u32 = 4 ;
64
66
const HTTP_GET_DEBUG_BEACON_STATE_QUOTIENT : u32 = 4 ;
65
67
const HTTP_GET_DEPOSIT_SNAPSHOT_QUOTIENT : u32 = 4 ;
@@ -150,11 +152,13 @@ pub struct Timeouts {
150
152
pub attestation : Duration ,
151
153
pub attester_duties : Duration ,
152
154
pub attestation_subscriptions : Duration ,
155
+ pub attestation_aggregators : Duration ,
153
156
pub liveness : Duration ,
154
157
pub proposal : Duration ,
155
158
pub proposer_duties : Duration ,
156
159
pub sync_committee_contribution : Duration ,
157
160
pub sync_duties : Duration ,
161
+ pub sync_aggregators : Duration ,
158
162
pub get_beacon_blocks_ssz : Duration ,
159
163
pub get_debug_beacon_states : Duration ,
160
164
pub get_deposit_snapshot : Duration ,
@@ -168,11 +172,13 @@ impl Timeouts {
168
172
attestation : timeout,
169
173
attester_duties : timeout,
170
174
attestation_subscriptions : timeout,
175
+ attestation_aggregators : timeout,
171
176
liveness : timeout,
172
177
proposal : timeout,
173
178
proposer_duties : timeout,
174
179
sync_committee_contribution : timeout,
175
180
sync_duties : timeout,
181
+ sync_aggregators : timeout,
176
182
get_beacon_blocks_ssz : timeout,
177
183
get_debug_beacon_states : timeout,
178
184
get_deposit_snapshot : timeout,
@@ -187,12 +193,14 @@ impl Timeouts {
187
193
attester_duties : base_timeout / HTTP_ATTESTER_DUTIES_TIMEOUT_QUOTIENT ,
188
194
attestation_subscriptions : base_timeout
189
195
/ HTTP_ATTESTATION_SUBSCRIPTIONS_TIMEOUT_QUOTIENT ,
196
+ attestation_aggregators : base_timeout / HTTP_ATTESTATION_AGGREGATOR_TIMEOUT_QUOTIENT ,
190
197
liveness : base_timeout / HTTP_LIVENESS_TIMEOUT_QUOTIENT ,
191
198
proposal : base_timeout / HTTP_PROPOSAL_TIMEOUT_QUOTIENT ,
192
199
proposer_duties : base_timeout / HTTP_PROPOSER_DUTIES_TIMEOUT_QUOTIENT ,
193
200
sync_committee_contribution : base_timeout
194
201
/ HTTP_SYNC_COMMITTEE_CONTRIBUTION_TIMEOUT_QUOTIENT ,
195
202
sync_duties : base_timeout / HTTP_SYNC_DUTIES_TIMEOUT_QUOTIENT ,
203
+ sync_aggregators : base_timeout / HTTP_SYNC_AGGREGATOR_TIMEOUT_QUOTIENT ,
196
204
get_beacon_blocks_ssz : base_timeout / HTTP_GET_BEACON_BLOCK_SSZ_TIMEOUT_QUOTIENT ,
197
205
get_debug_beacon_states : base_timeout / HTTP_GET_DEBUG_BEACON_STATE_QUOTIENT ,
198
206
get_deposit_snapshot : base_timeout / HTTP_GET_DEPOSIT_SNAPSHOT_QUOTIENT ,
@@ -2841,6 +2849,42 @@ impl BeaconNodeHttpClient {
2841
2849
)
2842
2850
. await
2843
2851
}
2852
+
2853
+ /// `POST validator/beacon_committee_selections`
2854
+ pub async fn post_validator_beacon_committee_selections (
2855
+ & self ,
2856
+ selections : & [ BeaconCommitteeSelection ] ,
2857
+ ) -> Result < GenericResponse < Vec < BeaconCommitteeSelection > > , Error > {
2858
+ let mut path = self . eth_path ( V1 ) ?;
2859
+
2860
+ path. path_segments_mut ( )
2861
+ . map_err ( |( ) | Error :: InvalidUrl ( self . server . clone ( ) ) ) ?
2862
+ . push ( "validator" )
2863
+ . push ( "beacon_committee_selections" ) ;
2864
+
2865
+ self . post_with_timeout_and_response (
2866
+ path,
2867
+ & selections,
2868
+ self . timeouts . attestation_aggregators ,
2869
+ )
2870
+ . await
2871
+ }
2872
+
2873
+ /// `POST validator/sync_committee_selections`
2874
+ pub async fn post_validator_sync_committee_selections (
2875
+ & self ,
2876
+ selections : & [ SyncCommitteeSelection ] ,
2877
+ ) -> Result < GenericResponse < Vec < SyncCommitteeSelection > > , Error > {
2878
+ let mut path = self . eth_path ( V1 ) ?;
2879
+
2880
+ path. path_segments_mut ( )
2881
+ . map_err ( |( ) | Error :: InvalidUrl ( self . server . clone ( ) ) ) ?
2882
+ . push ( "validator" )
2883
+ . push ( "sync_committee_selections" ) ;
2884
+
2885
+ self . post_with_timeout_and_response ( path, & selections, self . timeouts . sync_aggregators )
2886
+ . await
2887
+ }
2844
2888
}
2845
2889
2846
2890
/// Returns `Ok(response)` if the response is a `200 OK` response. Otherwise, creates an
0 commit comments