Skip to content

Commit

Permalink
Rename boson to cover
Browse files Browse the repository at this point in the history
  • Loading branch information
sgdxbc committed May 12, 2024
1 parent 4ea6be4 commit 73fc355
Show file tree
Hide file tree
Showing 316 changed files with 144 additions and 144 deletions.
48 changes: 24 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ members = [
"tools/replication-control-messages",
"tools/entropy-control",
"tools/entropy-control-messages",
"tools/boson-control",
"tools/boson-control-messages",
"tools/cover-control",
"tools/cover-control-messages",
]

[profile.dev]
Expand Down Expand Up @@ -41,15 +41,15 @@ name = "entropy"
required-features = ["wirehair", "reqwest"]

[[bin]]
name = "boson"
name = "cover"
required-features = ["nitro-enclaves"]

[[example]]
name = "nitro-enclaves-clock-validator"
required-features = ["nitro-enclaves"]

[[example]]
name = "boson-bench-clock"
name = "cover-bench-clock"
required-features = ["nitro-enclaves"]

[dependencies]
Expand All @@ -61,6 +61,7 @@ bytes = "1.5.0"
crossbeam-queue = "0.3.11"
derive_more = "0.99.17"
derive-where = "1.2.7"
hdrhistogram = "7.5.4"
lru = "0.12.2"
nix = { version = "0.28.0", features = ["socket", "sched", "resource"] }
primitive-types = { version = "0.12.2", features = ["serde"] }
Expand All @@ -85,7 +86,7 @@ serde_json = "1.0.114"
sha2 = "0.10.8"
scc = "2.0.19"

boson-control-messages = { version = "0.1.0", path = "tools/boson-control-messages" }
cover-control-messages = { version = "0.1.0", path = "tools/cover-control-messages" }
aws-nitro-enclaves-nsm-api = { version = "0.4.0", optional = true }
aws-nitro-enclaves-attestation = { git = "https://github.com/neatsys/aws-nitro-enclaves-attestation", version = "0.1.0", optional = true }

Expand All @@ -94,7 +95,6 @@ wirehair = { git = "https://github.com/neatsys/wirehair", version = "0.1.2", opt
reqwest = { version = "0.12.4", features = ["json", "multipart"], optional = true }

replication-control-messages = { version = "0.1.0", path = "tools/replication-control-messages" }
hdrhistogram = "7.5.4"

[dev-dependencies]
proptest = "1.4.0"
12 changes: 6 additions & 6 deletions examples/boson-bench-clock.rs → examples/cover-bench-clock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{
};

use augustus::{
boson::{
cover::{
self, nitro_enclaves_portal_session, NitroEnclavesClock, QuorumClient, QuorumClock, Update,
UpdateOk,
},
Expand All @@ -25,7 +25,7 @@ use augustus::{
},
worker::{spawning_backend, Submit},
};
use boson_control_messages::{Microbench, Quorum, Variant};
use cover_control_messages::{Microbench, Quorum, Variant};
use rand::thread_rng;
use tokio::{
io::AsyncReadExt as _,
Expand Down Expand Up @@ -280,22 +280,22 @@ async fn quorum_client_session(
Tcp::new(clock_addr)?,
{
let mut sender = Sender::from(clock_session.sender());
move |buf: &_| sender.send(Recv(deserialize::<Verifiable<boson::AnnounceOk>>(buf)?))
move |buf: &_| sender.send(Recv(deserialize::<Verifiable<cover::AnnounceOk>>(buf)?))
},
Once(clock_dispatch_session.sender()),
)?));
let mut clock = Blanket(Unify(QuorumClient::new(
clock_addr,
crypto.public_key(),
config.num_faulty,
Box::new(boson::quorum_client::CryptoWorker::from(crypto_worker))
Box::new(cover::quorum_client::CryptoWorker::from(crypto_worker))
as Box<
dyn Submit<Crypto, dyn boson::quorum_client::SendCryptoEvent<SocketAddr>>
dyn Submit<Crypto, dyn cover::quorum_client::SendCryptoEvent<SocketAddr>>
+ Send
+ Sync,
>,
update_ok_sender,
augustus::net::MessageNet::<_, Verifiable<boson::Announce<SocketAddr>>>::new(
augustus::net::MessageNet::<_, Verifiable<cover::Announce<SocketAddr>>>::new(
IndexNet::new(
dispatch::Net::from(clock_dispatch_session.sender()),
config.addrs,
Expand Down
2 changes: 1 addition & 1 deletion examples/nitro-enclaves-clock-validator.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use augustus::boson::NitroSecureModule;
use augustus::cover::NitroSecureModule;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
Expand Down
30 changes: 15 additions & 15 deletions src/bin/boson/cops.rs → src/bin/cover/cops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{future::Future, mem::take, net::SocketAddr, ops::Range, pin::Pin, time

use augustus::{
app::{self, ycsb, App},
boson::{self, nitro_enclaves_portal_session, QuorumClient, QuorumClock, VerifyClock},
cover::{self, nitro_enclaves_portal_session, QuorumClient, QuorumClock, VerifyClock},
cops::{self, OrdinaryVersion, OrdinaryVersionService},
event::{
self,
Expand All @@ -19,7 +19,7 @@ use augustus::{
worker::{spawning_backend, Submit},
workload::{CloseLoop, Iter, Json, OpLatency, Upcall, Weighted2, Workload},
};
use boson_control_messages::{CopsClient, CopsServer, Variant};
use cover_control_messages::{CopsClient, CopsServer, Variant};
use rand::{rngs::StdRng, thread_rng, Rng, SeedableRng};
use rand_distr::Uniform;
use tokio::{net::TcpListener, sync::mpsc::unbounded_channel, task::JoinSet, time::sleep};
Expand Down Expand Up @@ -471,14 +471,14 @@ pub async fn quorum_client_session(
let mut dispatch = event::Unify(event::Buffered::from(Dispatch::new(
Tcp::new(addr)?,
{
// let mut sender = boson::VerifyQuorumClock::new(config.num_faulty, crypto_worker);
// let mut sender = cover::VerifyQuorumClock::new(config.num_faulty, crypto_worker);
let mut sender = Sender::from(client_session.sender());
move |buf: &_| cops::to_client_on_buf(buf, &mut sender)
},
Once(dispatch_session.sender()),
)?));
let mut client = Blanket(Buffered::from(
cops::Client::<_, _, boson::QuorumClock, _>::new(
cops::Client::<_, _, cover::QuorumClock, _>::new(
addr,
replica_addr,
cops::ToReplicaMessageNet::new(dispatch::Net::from(dispatch_session.sender())),
Expand Down Expand Up @@ -571,7 +571,7 @@ pub async fn quorum_server_session(
Tcp::new(clock_addr)?,
{
let mut sender = Sender::from(clock_session.sender());
move |buf: &_| sender.send(Recv(deserialize::<Verifiable<boson::AnnounceOk>>(buf)?))
move |buf: &_| sender.send(Recv(deserialize::<Verifiable<cover::AnnounceOk>>(buf)?))
},
Once(clock_dispatch_session.sender()),
)?));
Expand All @@ -584,7 +584,7 @@ pub async fn quorum_server_session(
id as usize,
)),
cops::ToClientMessageNet::new(dispatch::Net::from(dispatch_session.sender())),
boson::Cops(Sender::from(clock_session.sender())),
cover::Cops(Sender::from(clock_session.sender())),
),
));
let mut settings = ycsb::WorkloadSettings::new(record_count);
Expand All @@ -599,19 +599,19 @@ pub async fn quorum_server_session(
clock_addr,
crypto.public_key(),
config.num_faulty,
Box::new(boson::quorum_client::CryptoWorker::from(
Box::new(cover::quorum_client::CryptoWorker::from(
clock_crypto_worker,
))
as Box<
dyn Submit<Crypto, dyn boson::quorum_client::SendCryptoEvent<SocketAddr>>
dyn Submit<Crypto, dyn cover::quorum_client::SendCryptoEvent<SocketAddr>>
+ Send
+ Sync,
>,
boson::Cops(Box::new(Sender::from(replica_session.sender()))
cover::Cops(Box::new(Sender::from(replica_session.sender()))
as Box<
dyn SendEvent<cops::events::UpdateOk<QuorumClock>> + Send + Sync,
>),
augustus::net::MessageNet::<_, Verifiable<boson::Announce<SocketAddr>>>::new(
augustus::net::MessageNet::<_, Verifiable<cover::Announce<SocketAddr>>>::new(
IndexNet::new(
dispatch::Net::from(clock_dispatch_session.sender()),
config.addrs,
Expand Down Expand Up @@ -700,7 +700,7 @@ pub async fn nitro_enclaves_client_session(
let mut dispatch = event::Unify(event::Buffered::from(Dispatch::new(
Tcp::new(addr)?,
{
// let mut sender = boson::VerifyQuorumClock::new(config.num_faulty, crypto_worker);
// let mut sender = cover::VerifyQuorumClock::new(config.num_faulty, crypto_worker);
let mut sender = Sender::from(client_session.sender());
move |buf: &_| cops::to_client_on_buf(buf, &mut sender)
},
Expand All @@ -709,7 +709,7 @@ pub async fn nitro_enclaves_client_session(
let mut client = Blanket(Buffered::from(cops::Client::<
_,
_,
boson::NitroEnclavesClock,
cover::NitroEnclavesClock,
_,
>::new(
addr,
Expand Down Expand Up @@ -793,14 +793,14 @@ pub async fn nitro_enclaves_server_session(
)?));
let mut replica = Blanket(Buffered::from(
cops::Replica::<_, _, _, _, SocketAddr>::new(
boson::NitroEnclavesClock::try_from(OrdinaryVersion::default())?,
cover::NitroEnclavesClock::try_from(OrdinaryVersion::default())?,
cops::ToReplicaMessageNet::<_, _, SocketAddr>::new(IndexNet::new(
dispatch::Net::from(dispatch_session.sender()),
addrs,
id as usize,
)),
cops::ToClientMessageNet::new(dispatch::Net::from(dispatch_session.sender())),
boson::Cops(clock_sender),
cover::Cops(clock_sender),
),
));
let mut settings = ycsb::WorkloadSettings::new(record_count);
Expand All @@ -826,7 +826,7 @@ pub async fn nitro_enclaves_server_session(
let clock_session = nitro_enclaves_portal_session(
16,
clock_receiver,
boson::Cops(Sender::from(replica_session.sender())),
cover::Cops(Sender::from(replica_session.sender())),
);
let replica_session = replica_session.run(&mut replica);
async {
Expand Down
16 changes: 8 additions & 8 deletions src/bin/boson/main.rs → src/bin/cover/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ async fn ok(State(state): State<AppState>) -> StatusCode {

async fn mutex_start(
State(state): State<AppState>,
Json(config): Json<boson_control_messages::Mutex>,
Json(config): Json<cover_control_messages::Mutex>,
) -> StatusCode {
if let Err(err) = async {
let mut session = state.session.lock().await;
anyhow::ensure!(session.is_none());
let (event_sender, event_receiver) = unbounded_channel();
let (upcall_sender, upcall_receiver) = unbounded_channel();
let cancel = CancellationToken::new();
use boson_control_messages::Variant::*;
use cover_control_messages::Variant::*;
let handle = match &config.variant {
Untrusted => state.handle.spawn(mutex::untrusted_session(
config,
Expand Down Expand Up @@ -231,15 +231,15 @@ async fn mutex_request(State(state): State<AppState>, at: Json<SystemTime>) -> R

async fn cops_start_client(
State(state): State<AppState>,
Json(config): Json<boson_control_messages::CopsClient>,
Json(config): Json<cover_control_messages::CopsClient>,
) -> StatusCode {
if let Err(err) = async {
let mut session = state.session.lock().await;
anyhow::ensure!(session.is_none());
let (event_sender, _) = unbounded_channel();
let (upcall_sender, upcall_receiver) = unbounded_channel();
let cancel = CancellationToken::new();
use boson_control_messages::Variant::*;
use cover_control_messages::Variant::*;
let handle = match &config.variant {
Untrusted => state
.handle
Expand Down Expand Up @@ -293,7 +293,7 @@ async fn cops_poll_results(State(state): State<AppState>) -> Response {
}
}
state.session.lock().await.take().unwrap().handle.await??;
Ok(Some(boson_control_messages::CopsClientOk(histogram)))
Ok(Some(cover_control_messages::CopsClientOk(histogram)))
};
match task.await {
Ok(result) => Json(result).into_response(),
Expand All @@ -303,15 +303,15 @@ async fn cops_poll_results(State(state): State<AppState>) -> Response {

async fn cops_start_server(
State(state): State<AppState>,
Json(config): Json<boson_control_messages::CopsServer>,
Json(config): Json<cover_control_messages::CopsServer>,
) -> StatusCode {
if let Err(err) = async {
let mut session = state.session.lock().await;
anyhow::ensure!(session.is_none());
let (event_sender, _) = unbounded_channel();
let (_, upcall_receiver) = unbounded_channel();
let cancel = CancellationToken::new();
use boson_control_messages::Variant::*;
use cover_control_messages::Variant::*;
let handle = match &config.variant {
Untrusted => state
.handle
Expand Down Expand Up @@ -344,7 +344,7 @@ async fn cops_start_server(

async fn start_quorum(
State(state): State<AppState>,
Json(config): Json<boson_control_messages::QuorumServer>,
Json(config): Json<cover_control_messages::QuorumServer>,
) -> StatusCode {
if let Err(err) = async {
let mut session = state.session.lock().await;
Expand Down
Loading

0 comments on commit 73fc355

Please sign in to comment.