/// <summary>
        ///     Set attributes
        /// </summary>
        /// <param name="rootSection"></param>
        public PeerSettings(IConfigurationRoot rootSection)
        {
            Guard.Argument(rootSection, nameof(rootSection)).NotNull();

            var section = rootSection.GetSection("CatalystNodeConfiguration").GetSection("Peer");

            Enum.TryParse(section.GetSection("Network").Value, out _networkType);
            PublicKey       = section.GetSection("PublicKey").Value;
            Port            = int.Parse(section.GetSection("Port").Value);
            PayoutAddress   = section.GetSection("PayoutAddress").Value;
            BindAddress     = IPAddress.Parse(section.GetSection("BindAddress").Value);
            PublicIpAddress = IPAddress.Parse(section.GetSection("PublicIpAddress").Value);
            SeedServers     = section.GetSection("SeedServers").GetChildren().Select(p => p.Value).ToList();
            DnsServers      = section.GetSection("DnsServers")
                              .GetChildren()
                              .Select(p => EndpointBuilder.BuildNewEndPoint(p.Value)).ToArray();
            PeerId = PublicKey.BuildPeerIdFromBase32Key(PublicIpAddress, Port);
        }