@@ -29,10 +29,9 @@ use node::service::{Recorder, Service};
29
29
use node:: snark:: { get_srs, get_verifier_index, VerifierKind } ;
30
30
use node:: stats:: Stats ;
31
31
use node:: {
32
- BlockProducerConfig , BuildEnv , Config , GlobalConfig , LedgerConfig , SnarkConfig , SnarkerConfig ,
33
- SnarkerStrategy , State , TransitionFrontierConfig ,
32
+ BuildEnv , Config , GlobalConfig , LedgerConfig , SnarkConfig , SnarkerConfig , SnarkerStrategy ,
33
+ State , TransitionFrontierConfig ,
34
34
} ;
35
- use vrf:: keypair_from_bs58_string;
36
35
37
36
use openmina_node_native:: rpc:: RpcService ;
38
37
use openmina_node_native:: { http_server, tracing, NodeService , P2pTaskSpawner , RpcSender } ;
@@ -70,10 +69,9 @@ pub struct Node {
70
69
#[ arg( long, env) ]
71
70
pub run_snarker : Option < AccountPublicKey > ,
72
71
73
- /// Enable block producer with this key
74
- #[ arg( long, env) ]
75
- pub producer_key : Option < String > ,
76
-
72
+ // /// Enable block producer with this key
73
+ // #[arg(long, env)]
74
+ // pub producer_key: Option<String>,
77
75
/// Snark fee, in Mina
78
76
#[ arg( long, env, default_value_t = 1_000_000 ) ]
79
77
pub snarker_fee : u64 ,
@@ -138,20 +136,20 @@ impl Node {
138
136
} ) ;
139
137
let pub_key = secret_key. public_key ( ) ;
140
138
141
- let block_producer: Option < BlockProducerConfig > =
142
- self . producer_key . clone ( ) . map ( |producer_key| {
143
- let compressed_pub_key = keypair_from_bs58_string ( & producer_key)
144
- . public
145
- . into_compressed ( ) ;
146
- BlockProducerConfig {
147
- pub_key : NonZeroCurvePoint :: from ( NonZeroCurvePointUncompressedStableV1 {
148
- x : compressed_pub_key. x . into ( ) ,
149
- is_odd : compressed_pub_key. is_odd ,
150
- } ) ,
151
- custom_coinbase_receiver : None ,
152
- proposed_protocol_version : None ,
153
- }
154
- } ) ;
139
+ // let block_producer: Option<BlockProducerConfig> =
140
+ // self.producer_key.clone().map(|producer_key| {
141
+ // let compressed_pub_key = keypair_from_bs58_string(&producer_key)
142
+ // .public
143
+ // .into_compressed();
144
+ // BlockProducerConfig {
145
+ // pub_key: NonZeroCurvePoint::from(NonZeroCurvePointUncompressedStableV1 {
146
+ // x: compressed_pub_key.x.into(),
147
+ // is_odd: compressed_pub_key.is_odd,
148
+ // }),
149
+ // custom_coinbase_receiver: None,
150
+ // proposed_protocol_version: None,
151
+ // }
152
+ // });
155
153
156
154
let work_dir = shellexpand:: full ( & self . work_dir ) . unwrap ( ) . into_owned ( ) ;
157
155
let rng_seed = rng. next_u64 ( ) ;
@@ -187,8 +185,7 @@ impl Node {
187
185
enabled_channels : ChannelId :: iter_all ( ) . collect ( ) ,
188
186
} ,
189
187
transition_frontier : TransitionFrontierConfig :: default ( ) ,
190
- // TODO(binier)
191
- block_producer,
188
+ block_producer : None ,
192
189
} ;
193
190
let ( event_sender, event_receiver) = mpsc:: unbounded_channel ( ) ;
194
191
@@ -251,7 +248,7 @@ impl Node {
251
248
252
249
let local_set = tokio:: task:: LocalSet :: new ( ) ;
253
250
local_set. block_on ( & runtime, async move {
254
- let mut service = NodeService {
251
+ let service = NodeService {
255
252
rng : StdRng :: seed_from_u64 ( rng_seed) ,
256
253
event_sender,
257
254
p2p_event_sender,
@@ -272,9 +269,9 @@ impl Node {
272
269
replayer : None ,
273
270
invariants_state : Default :: default ( ) ,
274
271
} ;
275
- if let Some ( producer_key) = self . producer_key {
276
- service. block_producer_start ( keypair_from_bs58_string ( & producer_key) ) ;
277
- }
272
+ // if let Some(producer_key) = self.producer_key {
273
+ // service.block_producer_start(keypair_from_bs58_string(&producer_key));
274
+ // }
278
275
279
276
let state = State :: new ( config) ;
280
277
let mut node = :: node:: Node :: new ( state, service, None ) ;
0 commit comments