## registration



Zinit needs tools to get this info and report it to the registrar.

```go
struct Registration {
    pub_key     string //public key of the node mycelium
    mycelium_address  string //the ipv6 addr
    capacity    Capacity
    pub_key_signature  string //signed pubkey with TPM on motherboard
}

struct Capacity {
    memory_gb     f64       // Memory size in GB
    disks         []Disk    // List of disks (both SSDs and HDDs)
    cpu      CPU   // Enum for CPU type
}

struct CPU {
    cpu_type   CPUType        // Size of the disk in GB
    description string
    cpu_vcores    int       // Number of CPU virtual cores
}


struct Disk {
    size_gb   f64        // Size of the disk in GB
    disk_type DiskType   // Enum for disk type (SSD or HDD)
}

// Enum for disk types
enum DiskType {
    ssd
    hdd
}
// Enum for CPU types
enum CPUType {
    intel_xeon
    amd_epyc
    intel_core9
}


```

the registration is done to all known registrars using openrpc

- register
- json payload
- ... see the openrpc spec rest server

failsafe

- zinit does this every hour on each know registrar, will be used for watchdog
- zinit at start keeps on trying for at least 1h on all servers each 5 sec, once a registrar found go to maintenance mode (which is once an hour)

## implementation

Have a driver which uses zinit, keep zinit small, do in V.