Rename consensus service to carnot consensus (#556)

This commit is contained in:
Daniel Sanchez 2024-01-09 11:08:24 +01:00 committed by GitHub
parent b7d1fd9256
commit c3b5dc98e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 26 additions and 26 deletions

View File

@ -7,7 +7,7 @@ members = [
"nomos-services/metrics", "nomos-services/metrics",
"nomos-services/network", "nomos-services/network",
"nomos-services/storage", "nomos-services/storage",
"nomos-services/consensus", "nomos-services/carnot-consensus",
"nomos-services/mempool", "nomos-services/mempool",
"nomos-services/http", "nomos-services/http",
"nomos-services/data-availability", "nomos-services/data-availability",

View File

@ -25,7 +25,7 @@ nomos-api = { path = "../../nomos-services/api" }
nomos-log = { path = "../../nomos-services/log" } nomos-log = { path = "../../nomos-services/log" }
nomos-mempool = { path = "../../nomos-services/mempool", features = ["mock", "libp2p"] } nomos-mempool = { path = "../../nomos-services/mempool", features = ["mock", "libp2p"] }
nomos-http = { path = "../../nomos-services/http", features = ["http"] } nomos-http = { path = "../../nomos-services/http", features = ["http"] }
nomos-consensus = { path = "../../nomos-services/consensus", features = ["libp2p"] } carnot-consensus = { path = "../../nomos-services/carnot-consensus", features = ["libp2p"] }
nomos-storage = { path = "../../nomos-services/storage", features = ["sled"] } nomos-storage = { path = "../../nomos-services/storage", features = ["sled"] }
nomos-libp2p = { path = "../../nomos-libp2p" } nomos-libp2p = { path = "../../nomos-libp2p" }
nomos-da = { path = "../../nomos-services/data-availability", features = ["libp2p"] } nomos-da = { path = "../../nomos-services/data-availability", features = ["libp2p"] }

View File

@ -2,18 +2,18 @@ pub mod api;
mod config; mod config;
mod tx; mod tx;
use carnot_consensus::network::adapters::libp2p::Libp2pAdapter as ConsensusLibp2pAdapter;
use carnot_engine::overlay::{RandomBeaconState, RoundRobin, TreeOverlay}; use carnot_engine::overlay::{RandomBeaconState, RoundRobin, TreeOverlay};
use color_eyre::eyre::Result; use color_eyre::eyre::Result;
use full_replication::Certificate; use full_replication::Certificate;
use full_replication::{AbsoluteNumber, Attestation, Blob, FullReplication}; use full_replication::{AbsoluteNumber, Attestation, Blob, FullReplication};
#[cfg(feature = "metrics")] #[cfg(feature = "metrics")]
use metrics::{backend::map::MapMetricsBackend, types::MetricsData, MetricsService}; use metrics::{backend::map::MapMetricsBackend, types::MetricsData, MetricsService};
use nomos_consensus::network::adapters::libp2p::Libp2pAdapter as ConsensusLibp2pAdapter;
use api::AxumBackend; use api::AxumBackend;
use bytes::Bytes; use bytes::Bytes;
use carnot_consensus::CarnotConsensus;
use nomos_api::ApiService; use nomos_api::ApiService;
use nomos_consensus::CarnotConsensus;
use nomos_core::{ use nomos_core::{
da::{blob, certificate}, da::{blob, certificate},
tx::Transaction, tx::Transaction,

View File

@ -20,7 +20,7 @@ overwatch-rs = { git = "https://github.com/logos-co/Overwatch", rev = "2f70806"
overwatch-derive = { git = "https://github.com/logos-co/Overwatch", rev = "ac28d01" } overwatch-derive = { git = "https://github.com/logos-co/Overwatch", rev = "ac28d01" }
nomos-network = { path = "../nomos-services/network", features = ["libp2p"] } nomos-network = { path = "../nomos-services/network", features = ["libp2p"] }
nomos-da = { path = "../nomos-services/data-availability", features = ["libp2p"] } nomos-da = { path = "../nomos-services/data-availability", features = ["libp2p"] }
nomos-consensus = { path = "../nomos-services/consensus" } carnot-consensus = { path = "../nomos-services/carnot-consensus" }
nomos-log = { path = "../nomos-services/log" } nomos-log = { path = "../nomos-services/log" }
nomos-libp2p = { path = "../nomos-libp2p"} nomos-libp2p = { path = "../nomos-libp2p"}
nomos-core = { path = "../nomos-core" } nomos-core = { path = "../nomos-core" }

View File

@ -1,6 +1,6 @@
use super::CLIENT; use super::CLIENT;
use carnot_consensus::CarnotInfo;
use carnot_engine::{Block, BlockId}; use carnot_engine::{Block, BlockId};
use nomos_consensus::CarnotInfo;
use reqwest::Url; use reqwest::Url;
pub async fn carnot_info(node: &Url) -> Result<CarnotInfo, reqwest::Error> { pub async fn carnot_info(node: &Url) -> Result<CarnotInfo, reqwest::Error> {

View File

@ -15,7 +15,7 @@ tracing = "0.1"
carnot-engine = { path = "../../consensus/carnot-engine" } carnot-engine = { path = "../../consensus/carnot-engine" }
nomos-core = { path = "../../nomos-core" } nomos-core = { path = "../../nomos-core" }
nomos-consensus = { path = "../../nomos-services/consensus" } carnot-consensus = { path = "../carnot-consensus" }
nomos-network = { path = "../../nomos-services/network" } nomos-network = { path = "../../nomos-services/network" }
nomos-da = { path = "../../nomos-services/data-availability" } nomos-da = { path = "../../nomos-services/data-availability" }
nomos-mempool = { path = "../../nomos-services/mempool", features = ["mock", "libp2p", "openapi"] } nomos-mempool = { path = "../../nomos-services/mempool", features = ["mock", "libp2p", "openapi"] }

View File

@ -4,15 +4,15 @@ use overwatch_rs::overwatch::handle::OverwatchHandle;
use serde::{de::DeserializeOwned, Serialize}; use serde::{de::DeserializeOwned, Serialize};
use tokio::sync::oneshot; use tokio::sync::oneshot;
use carnot_consensus::{
network::adapters::libp2p::Libp2pAdapter as ConsensusLibp2pAdapter, CarnotConsensus,
CarnotInfo, ConsensusMsg,
};
use carnot_engine::{ use carnot_engine::{
overlay::{RandomBeaconState, RoundRobin, TreeOverlay}, overlay::{RandomBeaconState, RoundRobin, TreeOverlay},
Block, BlockId, Block, BlockId,
}; };
use full_replication::Certificate; use full_replication::Certificate;
use nomos_consensus::{
network::adapters::libp2p::Libp2pAdapter as ConsensusLibp2pAdapter, CarnotConsensus,
CarnotInfo, ConsensusMsg,
};
use nomos_core::{ use nomos_core::{
da::{ da::{
blob, blob,

View File

@ -1,5 +1,5 @@
[package] [package]
name = "nomos-consensus" name = "carnot-consensus"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"

View File

@ -26,7 +26,7 @@ futures = "0.3"
humantime = "2.1" humantime = "2.1"
humantime-serde = "1" humantime-serde = "1"
nomos-core = { path = "../nomos-core" } nomos-core = { path = "../nomos-core" }
nomos-consensus = { path = "../nomos-services/consensus" } carnot-consensus = { path = "../nomos-services/carnot-consensus" }
once_cell = "1.17" once_cell = "1.17"
parking_lot = "0.12" parking_lot = "0.12"
polars = { version = "0.27", features = ["serde", "object", "json", "csv-file", "parquet", "dtype-struct"], optional = true } polars = { version = "0.27", features = ["serde", "object", "json", "csv-file", "parquet", "dtype-struct"], optional = true }

View File

@ -1,9 +1,9 @@
use crate::node::carnot::{messages::CarnotMessage, tally::Tally, timeout::TimeoutHandler}; use crate::node::carnot::{messages::CarnotMessage, tally::Tally, timeout::TimeoutHandler};
use carnot_consensus::network::messages::{NewViewMsg, TimeoutMsg, VoteMsg};
use carnot_consensus::NodeId;
use carnot_engine::{ use carnot_engine::{
AggregateQc, Carnot, NewView, Overlay, Qc, StandardQc, Timeout, TimeoutQc, View, Vote, AggregateQc, Carnot, NewView, Overlay, Qc, StandardQc, Timeout, TimeoutQc, View, Vote,
}; };
use nomos_consensus::network::messages::{NewViewMsg, TimeoutMsg, VoteMsg};
use nomos_consensus::NodeId;
use nomos_core::block::Block; use nomos_core::block::Block;
use std::collections::HashSet; use std::collections::HashSet;
use std::hash::Hash; use std::hash::Hash;

View File

@ -1,7 +1,7 @@
use carnot_engine::View; use carnot_consensus::network::messages::{
use nomos_consensus::network::messages::{
NewViewMsg, ProposalMsg, TimeoutMsg, TimeoutQcMsg, VoteMsg, NewViewMsg, ProposalMsg, TimeoutMsg, TimeoutQcMsg, VoteMsg,
}; };
use carnot_engine::View;
use crate::network::PayloadSize; use crate::network::PayloadSize;

View File

@ -29,16 +29,16 @@ use crate::output_processors::{Record, RecordType, Runtime};
use crate::settings::SimulationSettings; use crate::settings::SimulationSettings;
use crate::streaming::SubscriberFormat; use crate::streaming::SubscriberFormat;
use crate::warding::SimulationState; use crate::warding::SimulationState;
use carnot_consensus::committee_membership::UpdateableCommitteeMembership;
use carnot_consensus::network::messages::{ProposalMsg, TimeoutQcMsg};
use carnot_consensus::{
leader_selection::UpdateableLeaderSelection,
network::messages::{NewViewMsg, TimeoutMsg, VoteMsg},
};
use carnot_engine::overlay::RandomBeaconState; use carnot_engine::overlay::RandomBeaconState;
use carnot_engine::{ use carnot_engine::{
Block, BlockId, Carnot, Committee, Overlay, Payload, Qc, StandardQc, TimeoutQc, View, Vote, Block, BlockId, Carnot, Committee, Overlay, Payload, Qc, StandardQc, TimeoutQc, View, Vote,
}; };
use nomos_consensus::committee_membership::UpdateableCommitteeMembership;
use nomos_consensus::network::messages::{ProposalMsg, TimeoutQcMsg};
use nomos_consensus::{
leader_selection::UpdateableLeaderSelection,
network::messages::{NewViewMsg, TimeoutMsg, VoteMsg},
};
static RECORD_SETTINGS: std::sync::OnceLock<BTreeMap<String, bool>> = std::sync::OnceLock::new(); static RECORD_SETTINGS: std::sync::OnceLock<BTreeMap<String, bool>> = std::sync::OnceLock::new();

View File

@ -6,7 +6,7 @@ publish = false
[dependencies] [dependencies]
nomos-node = { path = "../nodes/nomos-node", default-features = false } nomos-node = { path = "../nodes/nomos-node", default-features = false }
nomos-consensus = { path = "../nomos-services/consensus" } carnot-consensus = { path = "../nomos-services/carnot-consensus" }
nomos-network = { path = "../nomos-services/network", features = ["libp2p"]} nomos-network = { path = "../nomos-services/network", features = ["libp2p"]}
nomos-log = { path = "../nomos-services/log" } nomos-log = { path = "../nomos-services/log" }
nomos-api = { path = "../nomos-services/api" } nomos-api = { path = "../nomos-services/api" }

View File

@ -4,13 +4,13 @@ use std::process::{Child, Command, Stdio};
use std::time::Duration; use std::time::Duration;
// internal // internal
use crate::{adjust_timeout, get_available_port, ConsensusConfig, MixnetConfig, Node, SpawnConfig}; use crate::{adjust_timeout, get_available_port, ConsensusConfig, MixnetConfig, Node, SpawnConfig};
use carnot_consensus::{CarnotInfo, CarnotSettings};
use carnot_engine::overlay::{RandomBeaconState, RoundRobin, TreeOverlay, TreeOverlaySettings}; use carnot_engine::overlay::{RandomBeaconState, RoundRobin, TreeOverlay, TreeOverlaySettings};
use carnot_engine::{BlockId, NodeId, Overlay}; use carnot_engine::{BlockId, NodeId, Overlay};
use full_replication::Certificate; use full_replication::Certificate;
use mixnet_client::{MixnetClientConfig, MixnetClientMode}; use mixnet_client::{MixnetClientConfig, MixnetClientMode};
use mixnet_node::MixnetNodeConfig; use mixnet_node::MixnetNodeConfig;
use mixnet_topology::MixnetTopology; use mixnet_topology::MixnetTopology;
use nomos_consensus::{CarnotInfo, CarnotSettings};
use nomos_core::block::Block; use nomos_core::block::Block;
use nomos_libp2p::{multiaddr, Multiaddr}; use nomos_libp2p::{multiaddr, Multiaddr};
use nomos_log::{LoggerBackend, LoggerFormat}; use nomos_log::{LoggerBackend, LoggerFormat};

View File

@ -1,7 +1,7 @@
use carnot_consensus::CarnotInfo;
use carnot_engine::{Block, NodeId, TimeoutQc, View}; use carnot_engine::{Block, NodeId, TimeoutQc, View};
use fraction::Fraction; use fraction::Fraction;
use futures::stream::{self, StreamExt}; use futures::stream::{self, StreamExt};
use nomos_consensus::CarnotInfo;
use std::{collections::HashSet, time::Duration}; use std::{collections::HashSet, time::Duration};
use tests::{adjust_timeout, ConsensusConfig, MixNode, Node, NomosNode, SpawnConfig}; use tests::{adjust_timeout, ConsensusConfig, MixNode, Node, NomosNode, SpawnConfig};