Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
6 changes: 5 additions & 1 deletion network/README.md
Original file line number Diff line number Diff line change
@@ -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.
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/).
2 changes: 2 additions & 0 deletions network/common/components/anvil/src/lifecycle/up/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<AnvilData>,
}
Expand All @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions network/mcr/components/eth/anvil/src/dev/lifecycle/up/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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(())
}
Expand Down
2 changes: 2 additions & 0 deletions network/mcr/components/eth/anvil/tests/basic/src/basic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down
Loading