Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 6ef3aa4

Browse files
committed
chore: merge conflicts
1 parent 97e8522 commit 6ef3aa4

File tree

8 files changed

+484
-451
lines changed

8 files changed

+484
-451
lines changed

Cargo.lock

Lines changed: 463 additions & 404 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/topos-certificate-producer-subnet-runtime/src/proxy.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ use std::sync::Arc;
99
use tokio::sync::Mutex;
1010
use tokio::sync::{mpsc, oneshot};
1111
use tokio::time::Duration;
12-
use topos_certificate_producer_subnet_client::{
13-
self, BlockInfo, SubnetClient, SubnetClientListener,
14-
};
1512
use topos_certificate_producer_subnet_client::{BlockInfo, SubnetClient, SubnetClientListener};
1613
use topos_core::api::grpc::checkpoints::TargetStreamPosition;
1714
use topos_core::uci::{Certificate, CertificateId, SubnetId};

crates/topos-config/src/node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl NodeConfig {
9292
base: base.clone(),
9393
certificate_producer: base
9494
.need_certificate_producer()
95-
.then(|| load_config::<CertificateProducerConfig, ()>(home, None)),
95+
.then(|| load_config::<CertificateProducerConfig, ()>(node_folder, None)),
9696
tce: base
9797
.need_tce()
9898
.then(|| load_config::<TceConfig, ()>(node_folder, None)),

crates/topos-node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ workspace = true
1212
topos-config = { path = "../topos-config/" }
1313
topos-tce = { path = "../topos-tce/" }
1414
topos-p2p = { path = "../topos-p2p" }
15-
topos-sequencer = { path = "../topos-sequencer" }
15+
topos-certificate-producer = { path = "../topos-certificate-producer" }
1616
topos-core = { workspace = true, features = ["api"] }
1717
topos-certificate-spammer = { path = "../topos-certificate-spammer" }
1818
topos-tce-broadcast = { path = "../topos-tce-broadcast", optional = true }

crates/topos-node/src/lib.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ pub enum Error {
3636
IO(#[from] std::io::Error),
3737

3838
#[error(
39-
"The role in the config file expect to have a sequencer config defined, none was found"
39+
"The role in the config file expects to have a Certificate Producer config defined, none \
40+
was found"
4041
)]
41-
MissingSequencerConfig,
42+
MissingCertificateProducerConfig,
4243

4344
#[error("An Edge config was expected to be found in the config file")]
4445
MissingEdgeConfig,
@@ -179,19 +180,19 @@ fn spawn_processes(
179180
));
180181
}
181182

182-
// Sequencer
183-
if matches!(config.base.role, NodeRole::Sequencer) {
184-
let sequencer_config = config
185-
.sequencer
183+
// Certificate Producer
184+
if matches!(config.base.role, NodeRole::CertificateProducer) {
185+
let cert_prod_config = config
186+
.certificate_producer
186187
.take()
187-
.ok_or(Error::MissingSequencerConfig)?;
188+
.ok_or(Error::MissingCertificateProducerConfig)?;
188189

189190
info!(
190-
"Running sequencer with configuration {:?}",
191-
sequencer_config
191+
"Running Certificate Producer with configuration {:?}",
192+
cert_prod_config
192193
);
193-
processes.push(process::spawn_sequencer_process(
194-
sequencer_config,
194+
processes.push(process::spawn_certificate_producer_process(
195+
cert_prod_config,
195196
&keys,
196197
(shutdown_token.clone(), shutdown_sender.clone()),
197198
));

crates/topos-tce-api/src/stream/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ impl Stream {
165165
}
166166
_ => {
167167
// We are not handling specific errors for now.
168-
// If the sequencer is closing the connection, we are receiving a
168+
// If the Certificate Producer is closing the connection, we are receiving a
169169
// StreamErrorKind::TransportError.
170170
error!( "Stream error: {:?}", error);
171171
return Err(StreamError::new(self.stream_id, error.kind));

crates/topos/src/components/node/mod.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -169,26 +169,3 @@ fn setup_console_tce_grpc(endpoint: &str) -> Arc<Mutex<ConsoleServiceClient<Chan
169169
}
170170
}
171171
}
172-
173-
pub async fn shutdown(
174-
basic_controller: Option<BasicController>,
175-
trigger: CancellationToken,
176-
mut termination: mpsc::Receiver<()>,
177-
) {
178-
trigger.cancel();
179-
info!("Waiting for all components to stop");
180-
// let _ = termination.recv().await;
181-
match termination.recv().await {
182-
Some(x) => info!("All good in the hood? {:?}", x),
183-
None => tracing::warn!("Odd, got a None. What does that mean?"),
184-
}
185-
info!("Shutdown complete, exiting.");
186-
187-
// Shutdown tracing
188-
global::shutdown_tracer_provider();
189-
if let Some(basic_controller) = basic_controller {
190-
if let Err(e) = basic_controller.stop(&tracing::Span::current().context()) {
191-
error!("Error stopping tracing: {e}");
192-
}
193-
}
194-
}

crates/topos/tests/config.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -422,13 +422,12 @@ mod serial_integration {
422422
let pid = cmd.id().unwrap();
423423
let _ = tokio::time::sleep(std::time::Duration::from_secs(10)).await;
424424

425-
println!("STDOUT: {}", stdout);
426-
let reg = Regex::new(r#"Local node is listening on "\/ip4\/.*\/tcp\/9091\/p2p\/"#).unwrap();
427-
assert!(
428-
reg.is_match(&stdout),
429-
"Expected node 'Local node is listening on…' but instead got:\n----\n{}\n----\n",
430-
stdout
431-
);
425+
let s = System::new_all();
426+
if let Some(process) = s.process(Pid::from_u32(pid)) {
427+
if process.kill_with(Signal::Term).is_none() {
428+
eprintln!("This signal isn't supported on this platform");
429+
}
430+
}
432431

433432
if let Ok(output) = cmd.wait_with_output().await {
434433
assert!(output.status.success());

0 commit comments

Comments
 (0)