---
# System prepended metadata

title: Starting a Mir subnet
tags: [Mir, Y3, 'Y']

---

Starting a Mir subnet
===
###### tags: `Y3` `Y` `Mir` 

This is a temporal document discussing how Eudico clients can start (spawn) a Mir chain.

## Persistent Nodes 

Even if Mir's validator set is static, Mir validators must know the network addresses of each other to start communications. 
This approach suggests that each Eudico client is provisioned with Mir persistent nodes string in the following format`ID1@Addr1, ..., IDN@AddrN`.
This string is passed via environment variable `EUDICO_MIR_CLIENTS`,
client ID of each node is defined as SubnetAddress`:`Address, for example `/root:t1ozbo7zqwfx6d4tqb353qoq7sfp4qhycefx6ftgy`.


## Hierarchical Subnet
This approach uses the hierarchical consensus framework. 
First, we register a subnet providing the nitial number of Mir validators: Mir consensus will be started when all validators join the subnet. 
Second, each participant joins the subnet providing the address of used Mir validator for this subnet. 
Information about validators is stored in subnet actor state.

Eudico node 1:
```
./eudico subnet add --consensus 3 --name mir --min-validators 4
./eudico subnet join --subnet=/root/t01002 -val-addr=127.0.0.1:10000 10 
./eudico subnet mine  --subnet=/root/t01002

```

Eudico nodes 2-4:
```
./eudico subnet join --subnet=/root/t01002 -val-addr=127.0.0.1:1000X 10
./eudico subnet mine  --subnet=/root/t01002
```


