@@ -19,9 +19,10 @@ use traits::{
19
19
signature_key:: { SignatureKey , StateSignatureKey } ,
20
20
} ;
21
21
use url:: Url ;
22
+ use vbs:: version:: Version ;
22
23
use vec1:: Vec1 ;
23
24
24
- use crate :: { traits :: node_implementation :: ConsensusTime , utils:: bincode_opts} ;
25
+ use crate :: utils:: bincode_opts;
25
26
pub mod bundle;
26
27
pub mod consensus;
27
28
pub mod constants;
@@ -198,7 +199,7 @@ pub struct HotShotConfig<TYPES: NodeType> {
198
199
/// All public keys known to be DA nodes
199
200
pub known_da_nodes : Vec < PeerConfig < TYPES > > ,
200
201
/// All public keys known to be DA nodes, by start epoch
201
- pub da_committees : BTreeMap < u64 , Vec < PeerConfig < TYPES > > > ,
202
+ pub da_committees : BTreeMap < Version , BTreeMap < u64 , Vec < PeerConfig < TYPES > > > > ,
202
203
/// List of DA committee (staking)nodes for static DA committee
203
204
pub da_staked_committee_size : usize ,
204
205
/// Number of fixed leaders for GPU VID, normally it will be 0, it's only used when running GPU VID
@@ -271,25 +272,10 @@ impl<TYPES: NodeType> HotShotConfig<TYPES> {
271
272
self . known_nodes_with_stake . clone ( ) . into ( )
272
273
}
273
274
274
- pub fn build_da_committees ( & self ) -> BTreeMap < TYPES :: Epoch , Vec < PeerConfig < TYPES > > > {
275
- if self . da_committees . is_empty ( ) {
276
- tracing:: warn!(
277
- "da_committees is not set, falling back to known_da_nodes, which is deprecated."
278
- ) ;
279
-
280
- [ ( TYPES :: Epoch :: new ( 0 ) , self . known_da_nodes . clone ( ) ) ] . into ( )
281
- } else {
282
- if !self . known_da_nodes . is_empty ( ) {
283
- tracing:: warn!(
284
- "Both known_da_nodes and da_committees are set, known_da_nodes is deprecated \
285
- and will be ignored."
286
- ) ;
287
- }
288
-
289
- self . da_committees
290
- . iter ( )
291
- . map ( |( k, v) | ( TYPES :: Epoch :: new ( * k) , v. clone ( ) ) )
292
- . collect ( )
293
- }
275
+ pub fn build_da_committees ( & self ) -> Vec < PeerConfig < TYPES > > {
276
+ // TODO: THIS IS A TEMPORARY FIX WITH THE WRONG RETURN TYPE.
277
+ // It's done so that we can start using this function and have the existing behavior
278
+ // (use known_da_nodes) while we transition to using da_committees.
279
+ self . known_da_nodes . clone ( )
294
280
}
295
281
}
0 commit comments