@@ -5,15 +5,16 @@ use std::num::NonZeroUsize;
5
5
use std:: time:: Duration ;
6
6
7
7
use alloy:: eips:: BlockNumberOrTag ;
8
- use cliquenet:: { Address , AddressableCommittee , Overlay } ;
8
+ use cliquenet:: { Address , AddressableCommittee , Network , NetworkMetrics , Overlay } ;
9
9
use futures:: FutureExt ;
10
10
use futures:: stream:: { self , StreamExt } ;
11
+ use metrics:: NoMetrics ;
11
12
use multisig:: { Committee , CommitteeId , Keypair , x25519} ;
12
13
use sailfish:: consensus:: Consensus ;
13
14
use sailfish:: rbc:: Rbc ;
14
15
use sailfish:: types:: { ConsensusTime , RoundNumber , Timestamp } ;
15
16
use sailfish:: { Coordinator , Event } ;
16
- use timeboost:: config:: { ChainConfig , ParentChain } ;
17
+ use timeboost:: config:: { ChainConfig , DECRYPTER_PORT_OFFSET , ParentChain } ;
17
18
use timeboost:: crypto:: prelude:: DkgDecKey ;
18
19
use timeboost:: sequencer:: SequencerConfig ;
19
20
use timeboost:: types:: { DecryptionKeyCell , KeyStore } ;
@@ -26,8 +27,6 @@ use tokio_stream::wrappers::UnboundedReceiverStream;
26
27
use tracing:: info;
27
28
use url:: Url ;
28
29
29
- use super :: start_network_with_retry;
30
-
31
30
#[ derive( Debug , Clone ) ]
32
31
enum Cmd {
33
32
NextCommittee ( ConsensusTime , AddressableCommittee ) ,
80
79
81
80
let de_addrs = sf_addrs
82
81
. iter ( )
83
- . map ( |addr| Address :: from ( ( Ipv4Addr :: LOCALHOST , addr. port ( ) + 1000 ) ) )
82
+ . map ( |addr| Address :: from ( ( Ipv4Addr :: LOCALHOST , addr. port ( ) + DECRYPTER_PORT_OFFSET ) ) )
84
83
. collect :: < Vec < _ > > ( ) ;
85
84
86
85
let committee = Committee :: new (
@@ -173,7 +172,20 @@ where
173
172
///
174
173
/// NB that the decryption parts of the config are not used yet.
175
174
async fn mk_node ( cfg : & SequencerConfig ) -> Coordinator < Timestamp , Rbc < Timestamp > > {
176
- let mut net = start_network_with_retry ( cfg) . await ;
175
+ let mut net = Network :: create (
176
+ "sailfish" ,
177
+ cfg. sailfish_address ( ) . clone ( ) ,
178
+ cfg. sign_keypair ( ) . public_key ( ) ,
179
+ cfg. dh_keypair ( ) . clone ( ) ,
180
+ cfg. sailfish_committee ( ) . entries ( ) ,
181
+ NetworkMetrics :: new (
182
+ "sailfish" ,
183
+ & NoMetrics ,
184
+ cfg. sailfish_committee ( ) . parties ( ) . copied ( ) ,
185
+ ) ,
186
+ )
187
+ . await
188
+ . unwrap ( ) ;
177
189
178
190
if let Some ( prev) = & cfg. previous_sailfish_committee ( ) {
179
191
let old = prev. diff ( cfg. sailfish_committee ( ) ) ;
0 commit comments