diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 475fc5a1..ff347b84 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,3 +22,7 @@ Those looking to add to the suggest new `features` and `bugs` should identify wh **Documentation** Visit [sdk/cli/README.md](sdk/cli/README.md) for instructions on how do document when working with the CLI. + +**Crate names** +- CLI names get preferential naming, e.g., `mcr-network-client`. +- `*-core` crates are "core" libraries, meaning they encode APIs ended to be used programmatically in Rust. `mcr-protocol-client-eth-core` is, for example, the `core` library for the ETH implementation associated with `mcr-network-client`. diff --git a/network/README.md b/network/README.md index a23511cc..96f48c30 100644 --- a/network/README.md +++ b/network/README.md @@ -1,2 +1,6 @@ # Network -The network directory is used for storing logic that allows for the provisioning of MCR networks. This includes local networks, remote networks and their IaC, and all supported variations. \ No newline at end of file +The network directory is used for storing logic that allows for the provisioning of MCR networks. This includes local networks, remote networks and their IaC, and all supported variations. + +The role of a "Coordinator" in network logic is to create an abstract which renders the running of an entire network as single process. In cases where the network is remote--or even simply multi-process--this means that the "Coordinator" primarily functions to aggregate [lifecycles](https://github.com/movementlabsxyz/adud) and monitoring functionality. + +The original intent was to have network primarily compose processes from the [Node](../node) level of abstraction. It is also common, however, for processes and logic to be elevated directly from [Protocol](../protocol/). \ No newline at end of file diff --git a/network/common/components/anvil/src/lifecycle/up/mod.rs b/network/common/components/anvil/src/lifecycle/up/mod.rs index 9effb276..ec919e56 100644 --- a/network/common/components/anvil/src/lifecycle/up/mod.rs +++ b/network/common/components/anvil/src/lifecycle/up/mod.rs @@ -6,6 +6,7 @@ use kestrel::{ use crate::util::parser::{AnvilData, ParseAnvilData}; +/// Used to manage running Anvil and filling in the [AnvilData] struct as [State] pub struct Up { anvil_data: State, } @@ -19,6 +20,7 @@ impl Up { &self.anvil_data } + /// Runs the Anvil deployment process. pub async fn run(self) -> Result<(), anyhow::Error> { let anvil_data = self.anvil_data.clone(); let anvil = kestrel::task(async move { diff --git a/network/mcr/components/eth/anvil/src/dev/lifecycle/up/mod.rs b/network/mcr/components/eth/anvil/src/dev/lifecycle/up/mod.rs index 77c78401..df566d2d 100644 --- a/network/mcr/components/eth/anvil/src/dev/lifecycle/up/mod.rs +++ b/network/mcr/components/eth/anvil/src/dev/lifecycle/up/mod.rs @@ -27,7 +27,7 @@ impl Up { let anvil_data = self.anvil_deploy.anvil_data().clone(); // Start the Anvil deployment process. - let deployer_future = kestrel::task(async move { self.anvil_deploy.run().await }); + let anvil_task = kestrel::task(async move { self.anvil_deploy.run().await }); // Wait on the anvil data let anvil_data = anvil_data.read().wait_forever().await; @@ -57,7 +57,7 @@ impl Up { self.artifacts.write().set(artifacts).await; // Wait for the anvil deployer to finish - deployer_future.await??; + anvil_task.await??; Ok(()) } diff --git a/network/mcr/components/eth/anvil/tests/basic/src/basic/mod.rs b/network/mcr/components/eth/anvil/tests/basic/src/basic/mod.rs index ccea6535..63f9f005 100644 --- a/network/mcr/components/eth/anvil/tests/basic/src/basic/mod.rs +++ b/network/mcr/components/eth/anvil/tests/basic/src/basic/mod.rs @@ -72,7 +72,9 @@ impl Basic { pub async fn run(self) -> Result<(), anyhow::Error> { // clone the anvil data and artifacts from up + // We need the data from anvil... let anvil_data = self.up.anvil_data().clone(); + // ...and the artifacts from the eth deployment let artifacts = self.up.artifacts().clone(); let up_task = kestrel::task(async move { self.up.run().await });