Skip to content

Commit

Permalink
chore(code): Rename malachite-actors to malachite-engine (#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
romac authored Dec 13, 2024
1 parent 9a0b751 commit ca1c2fe
Show file tree
Hide file tree
Showing 39 changed files with 115 additions and 115 deletions.
60 changes: 30 additions & 30 deletions code/Cargo.lock

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

4 changes: 2 additions & 2 deletions code/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
resolver = "2"

members = [
"crates/actors",
"crates/app",
"crates/app-channel",
"crates/cli",
Expand All @@ -13,6 +12,7 @@ members = [
"crates/core-state-machine",
"crates/core-types",
"crates/core-votekeeper",
"crates/engine",
"crates/metrics",
"crates/network",
"crates/node",
Expand Down Expand Up @@ -59,7 +59,7 @@ debug = true
# None for now

[workspace.dependencies]
malachite-actors = { version = "0.1.0", path = "crates/actors" }
malachite-engine = { version = "0.1.0", path = "crates/engine" }
malachite-app = { version = "0.1.0", path = "crates/app" }
malachite-app-channel = { version = "0.1.0", path = "crates/app-channel" }
malachite-cli = { version = "0.1.0", path = "crates/cli" }
Expand Down
2 changes: 1 addition & 1 deletion code/crates/app-channel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tokio.workspace = true
tracing.workspace = true

malachite-app.workspace = true
malachite-actors.workspace = true
malachite-engine.workspace = true

[lints]
workspace = true
Expand Down
2 changes: 1 addition & 1 deletion code/crates/app-channel/src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub enum ConsensusMsg<Ctx: Context> {
StartHeight(Ctx::Height, Ctx::ValidatorSet),
}

use malachite_actors::consensus::Msg as ConsensusActorMsg;
use malachite_engine::consensus::Msg as ConsensusActorMsg;

impl<Ctx: Context> From<ConsensusMsg<Ctx>> for ConsensusActorMsg<Ctx> {
fn from(msg: ConsensusMsg<Ctx>) -> ConsensusActorMsg<Ctx> {
Expand Down
2 changes: 1 addition & 1 deletion code/crates/app-channel/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use ractor::{async_trait, Actor, ActorProcessingErr, ActorRef, SpawnErr};
use tokio::sync::mpsc;
use tokio::sync::oneshot;

use malachite_actors::host::HostMsg;
use malachite_engine::host::HostMsg;

use crate::app::types::core::Context;
use crate::app::types::metrics::Metrics;
Expand Down
2 changes: 1 addition & 1 deletion code/crates/app-channel/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ use crate::app::types::metrics::{Metrics, SharedRegistry};
use crate::channel::AppMsg;
use crate::spawn::spawn_host_actor;

use malachite_actors::util::events::TxEvent;
use malachite_app::{
spawn_consensus_actor, spawn_network_actor, spawn_sync_actor, spawn_wal_actor,
};
use malachite_engine::util::events::TxEvent;

#[tracing::instrument("node", skip_all, fields(moniker = %cfg.moniker))]
pub async fn run<Node, Ctx, Codec>(
Expand Down
2 changes: 1 addition & 1 deletion code/crates/app-channel/src/spawn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use eyre::Result;
use tokio::sync::mpsc;

use malachite_actors::host::HostRef;
use malachite_engine::host::HostRef;

use crate::app::types::core::Context;
use crate::app::types::metrics::Metrics;
Expand Down
2 changes: 1 addition & 1 deletion code/crates/app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish.workspace = true
rust-version.workspace = true

[dependencies]
malachite-actors.workspace = true
malachite-engine.workspace = true
malachite-codec.workspace = true
malachite-core-types.workspace = true
malachite-config.workspace = true
Expand Down
12 changes: 6 additions & 6 deletions code/crates/app/src/spawn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ use std::time::Duration;
use eyre::Result;
use tracing::Span;

use malachite_actors::consensus::{Consensus, ConsensusCodec, ConsensusParams, ConsensusRef};
use malachite_actors::host::HostRef;
use malachite_actors::network::{Network, NetworkRef};
use malachite_actors::sync::{Params as SyncParams, Sync, SyncCodec, SyncRef};
use malachite_actors::util::events::TxEvent;
use malachite_actors::wal::{Wal, WalCodec, WalRef};
use malachite_engine::consensus::{Consensus, ConsensusCodec, ConsensusParams, ConsensusRef};
use malachite_engine::host::HostRef;
use malachite_engine::network::{Network, NetworkRef};
use malachite_engine::sync::{Params as SyncParams, Sync, SyncCodec, SyncRef};
use malachite_engine::util::events::TxEvent;
use malachite_engine::wal::{Wal, WalCodec, WalRef};
use malachite_network::{Config as NetworkConfig, DiscoveryConfig, GossipSubConfig, Keypair};

use crate::types::config::{Config as NodeConfig, PubSubProtocol, SyncConfig, TransportProtocol};
Expand Down
10 changes: 5 additions & 5 deletions code/crates/app/src/types.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Re-export of all types required to build a Malachite application.
pub use malachite_actors::host::LocallyProposedValue;
pub use malachite_consensus::{ConsensusMsg, ProposedValue, SignedConsensusMsg, ValuePayload};
pub use malachite_engine::host::LocallyProposedValue;
pub use malachite_peer::PeerId;

pub mod core {
Expand All @@ -19,16 +19,16 @@ pub mod metrics {
pub use libp2p_identity::Keypair;

pub mod streaming {
pub use malachite_actors::util::streaming::StreamMessage;
pub use malachite_engine::util::streaming::StreamMessage;
}

pub mod sync {
pub use malachite_sync::{DecidedValue, Metrics, Request, Response, Status};
}

pub mod codec {
pub use malachite_actors::consensus::ConsensusCodec;
pub use malachite_actors::sync::SyncCodec;
pub use malachite_actors::wal::WalCodec;
pub use malachite_codec::Codec;
pub use malachite_engine::consensus::ConsensusCodec;
pub use malachite_engine::sync::SyncCodec;
pub use malachite_engine::wal::WalCodec;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "malachite-actors"
name = "malachite-engine"
version.workspace = true
edition.workspace = true
repository.workspace = true
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion code/crates/node/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
// Empty for now, will eventually contain the `malachite-actors` crate
// Empty for now, will eventually contain the `malachite-engine` crate
14 changes: 7 additions & 7 deletions code/crates/starknet/host/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "malachite-starknet-host"
version.workspace = true
edition.workspace = true
repository.workspace = true
license.workspace = true
name = "malachite-starknet-host"
version.workspace = true
edition.workspace = true
repository.workspace = true
license.workspace = true
rust-version.workspace = true
publish = false
publish = false

[dependencies]
malachite-actors = { workspace = true }
malachite-engine = { workspace = true }
malachite-app = { workspace = true }
malachite-codec = { workspace = true }
malachite-config = { workspace = true }
Expand Down
12 changes: 6 additions & 6 deletions code/crates/starknet/host/src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ use rand::SeedableRng;
use tokio::time::Instant;
use tracing::{debug, error, info, trace, warn};

use malachite_actors::consensus::{ConsensusMsg, ConsensusRef};
use malachite_actors::host::{LocallyProposedValue, ProposedValue};
use malachite_actors::network::{NetworkMsg, NetworkRef};
use malachite_actors::util::streaming::{StreamContent, StreamMessage};
use malachite_consensus::PeerId;
use malachite_core_types::{CommitCertificate, Round, Validity, ValueOrigin};
use malachite_engine::consensus::{ConsensusMsg, ConsensusRef};
use malachite_engine::host::{LocallyProposedValue, ProposedValue};
use malachite_engine::network::{NetworkMsg, NetworkRef};
use malachite_engine::util::streaming::{StreamContent, StreamMessage};
use malachite_metrics::Metrics;
use malachite_sync::DecidedValue;

Expand All @@ -33,8 +33,8 @@ pub struct Host {
span: tracing::Span,
}

pub type HostRef = malachite_actors::host::HostRef<MockContext>;
pub type HostMsg = malachite_actors::host::HostMsg<MockContext>;
pub type HostRef = malachite_engine::host::HostRef<MockContext>;
pub type HostMsg = malachite_engine::host::HostMsg<MockContext>;

impl Host {
pub async fn spawn(
Expand Down
2 changes: 1 addition & 1 deletion code/crates/starknet/host/src/codec.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use bytes::Bytes;
use prost::Message;

use malachite_actors::util::streaming::{StreamContent, StreamMessage};
use malachite_codec::Codec;
use malachite_core_types::{
AggregatedSignature, CommitCertificate, CommitSignature, Extension, Round, SignedExtension,
SignedProposal, SignedVote, Validity,
};
use malachite_engine::util::streaming::{StreamContent, StreamMessage};
use malachite_sync::{self as sync, ValueRequest, ValueResponse, VoteSetRequest, VoteSetResponse};

use malachite_consensus::{PeerId, ProposedValue, SignedConsensusMsg};
Expand Down
6 changes: 3 additions & 3 deletions code/crates/starknet/host/src/host/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ use rand::RngCore;
use sha3::Digest;
use tracing::{debug, error, trace};

use malachite_actors::consensus::ConsensusRef;
use malachite_actors::host::ProposedValue;
use malachite_actors::util::streaming::StreamId;
use malachite_core_types::{Round, SignedExtension, Validity};
use malachite_engine::consensus::ConsensusRef;
use malachite_engine::host::ProposedValue;
use malachite_engine::util::streaming::StreamId;

use crate::block_store::BlockStore;
use crate::host::proposal::compute_proposal_hash;
Expand Down
2 changes: 1 addition & 1 deletion code/crates/starknet/host/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ use rand::{CryptoRng, RngCore};
use serde::{Deserialize, Serialize};
use tracing::{info, Instrument};

use malachite_actors::util::events::TxEvent;
use malachite_app::types::Keypair;
use malachite_app::Node;
use malachite_config::Config;
use malachite_core_types::VotingPower;
use malachite_engine::util::events::TxEvent;

use crate::spawn::spawn_node_actor;
use crate::types::Height;
Expand Down
14 changes: 7 additions & 7 deletions code/crates/starknet/host/src/spawn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ use std::path::{Path, PathBuf};
use std::time::Duration;

use libp2p_identity::ecdsa;
use malachite_actors::util::events::TxEvent;
use malachite_actors::wal::{Wal, WalRef};
use malachite_engine::util::events::TxEvent;
use malachite_engine::wal::{Wal, WalRef};
use tokio::task::JoinHandle;

use malachite_actors::consensus::{Consensus, ConsensusParams, ConsensusRef};
use malachite_actors::host::HostRef;
use malachite_actors::network::{Network, NetworkRef};
use malachite_actors::node::{Node, NodeRef};
use malachite_actors::sync::{Params as SyncParams, Sync, SyncRef};
use malachite_config::{
self as config, Config as NodeConfig, MempoolConfig, SyncConfig, TestConfig, TransportProtocol,
};
use malachite_consensus::ValuePayload;
use malachite_engine::consensus::{Consensus, ConsensusParams, ConsensusRef};
use malachite_engine::host::HostRef;
use malachite_engine::network::{Network, NetworkRef};
use malachite_engine::node::{Node, NodeRef};
use malachite_engine::sync::{Params as SyncParams, Sync, SyncRef};
use malachite_metrics::Metrics;
use malachite_metrics::SharedRegistry;
use malachite_network::Keypair;
Expand Down
2 changes: 1 addition & 1 deletion code/crates/starknet/host/src/streaming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ use std::collections::{BTreeMap, BinaryHeap, HashSet};

use derive_where::derive_where;

use malachite_actors::util::streaming::{Sequence, StreamId, StreamMessage};
use malachite_consensus::PeerId;
use malachite_core_types::Round;
use malachite_engine::util::streaming::{Sequence, StreamId, StreamMessage};

use crate::types::{Address, Height, ProposalInit, ProposalPart};

Expand Down
Loading

0 comments on commit ca1c2fe

Please sign in to comment.