summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-10-07 14:31:13 -0400
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-10-07 14:31:13 -0400
commit2fa2796f2abbf48e1f8c6b10a7a0fd99e6985862 (patch)
treeb54105e958472973023258bec9776542673df1e0 /node
parent343b7f44fc52e6f467b75100cb670b1a4ae48d75 (diff)
downloadinfinitytier-2fa2796f2abbf48e1f8c6b10a7a0fd99e6985862.tar.gz
infinitytier-2fa2796f2abbf48e1f8c6b10a7a0fd99e6985862.zip
Another tweak, hopefully final, to reduce variance on identity generation times.
Diffstat (limited to 'node')
-rw-r--r--node/Defaults.cpp6
-rw-r--r--node/Identity.cpp4
-rw-r--r--node/Network.cpp1
-rw-r--r--node/Network.hpp6
4 files changed, 11 insertions, 6 deletions
diff --git a/node/Defaults.cpp b/node/Defaults.cpp
index ae1d79a5..8e3a8c9f 100644
--- a/node/Defaults.cpp
+++ b/node/Defaults.cpp
@@ -54,21 +54,21 @@ static inline std::map< Identity,std::vector<InetAddress> > _mkSupernodeMap()
// cthulhu.zerotier.com - New York, New York, USA
addrs.clear();
- if (!id.fromString("31a633d7fd:0:1f9d24ac00dd6b21c711304f6034001d25678e1a0eb260ed1996dd881c73143af1ff1b84457e013467eb8b780c0ee4a5fdd037ac07f91eb427051b8cbe110446"))
+ if (!id.fromString("d2ba4048c3:0:cfa02701eb69e2f2c64aa498151e57f82c172036967186c93f2afbe45a64d64306f88fa1225724f6f87beabd6a0feb18c746cf4691867542e18b894390692303"))
throw std::runtime_error("invalid identity in Defaults");
addrs.push_back(InetAddress("198.199.73.93",ZT_DEFAULT_UDP_PORT));
sn[id] = addrs;
// nyarlathotep.zerotier.com - San Francisco, California, USA
addrs.clear();
- if (!id.fromString("aaf5e8b5eb:0:9aa129e78c564313b07b1d9f739683d6b109a3c83fb7294ef16c221e2f4f5050682febe9715069ba1013542236635a543ed2f44c20d8a01bbb14d5900e4572ae"))
+ if (!id.fromString("80eb92f707:0:7f0209663d815438dead321ec78c65c27fec6feeb8ccd9acc152c59066740521e45d1a1cbc5186e3773178429c4b26ab0df2c78f3e822540d70456724797f23f"))
throw std::runtime_error("invalid identity in Defaults");
addrs.push_back(InetAddress("198.199.97.220",ZT_DEFAULT_UDP_PORT));
sn[id] = addrs;
// shub-niggurath.zerotier.com - Amsterdam, Netherlands
addrs.clear();
- if (!id.fromString("c6524a2797:0:f656ead7c1e88ac3255a36ec2919343fbef8876300015a6f0aceccd6af808f5180eda4b4015e2cc27225233873466e89808b3e50b3b0a5a95a6f7bd3fef7eba8"))
+ if (!id.fromString("34594c9086:0:2ac70c00cc03a078a2a8f889d61e72397f8cd684a6daecbe6350f24e0193790e118805a1673eaf57ce9f7b41f45525c995289c406461c739ccad2c93efa36746"))
throw std::runtime_error("invalid identity in Defaults");
addrs.push_back(InetAddress("198.211.127.172",ZT_DEFAULT_UDP_PORT));
sn[id] = addrs;
diff --git a/node/Identity.cpp b/node/Identity.cpp
index c46321e0..e0d5afd7 100644
--- a/node/Identity.cpp
+++ b/node/Identity.cpp
@@ -40,13 +40,13 @@
// parameters of the hashcash hashing/searching algorithm.
// Hashcash halting criteria
-#define ZT_IDENTITY_GEN_HASHCASH_FIRST_BYTE_LESS_THAN 5
+#define ZT_IDENTITY_GEN_HASHCASH_FIRST_BYTE_LESS_THAN 7
// Amount of memory for memory-hardness
#define ZT_IDENTITY_GEN_MEMORY 8388608
// Step distance for mixing genmem[]
-#define ZT_IDENTITY_GEN_MEMORY_MIX_STEP 128
+#define ZT_IDENTITY_GEN_MEMORY_MIX_STEP 1024
namespace ZeroTier {
diff --git a/node/Network.cpp b/node/Network.cpp
index d5241de4..d3b0b6c9 100644
--- a/node/Network.cpp
+++ b/node/Network.cpp
@@ -93,6 +93,7 @@ void Network::CertificateOfMembership::fromString(const char *s)
{
_qualifiers.clear();
_signedBy.zero();
+ memset(_signature.data,0,_signature.size());
unsigned int colonAt = 0;
while ((s[colonAt])&&(s[colonAt] != ':')) ++colonAt;
diff --git a/node/Network.hpp b/node/Network.hpp
index e8d8a51e..70be56fc 100644
--- a/node/Network.hpp
+++ b/node/Network.hpp
@@ -135,7 +135,11 @@ public:
COM_RESERVED_ID_NETWORK_ID = 1 // network ID, max delta always 0
};
- CertificateOfMembership() {}
+ CertificateOfMembership()
+ {
+ memset(_signature.data,0,_signature.size());
+ }
+
CertificateOfMembership(const char *s) { fromString(s); }
CertificateOfMembership(const std::string &s) { fromString(s.c_str()); }