[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r18298 - gnunet/src/nse
From: |
gnunet |
Subject: |
[GNUnet-SVN] r18298 - gnunet/src/nse |
Date: |
Thu, 24 Nov 2011 13:31:32 +0100 |
Author: grothoff
Date: 2011-11-24 13:31:32 +0100 (Thu, 24 Nov 2011)
New Revision: 18298
Modified:
gnunet/src/nse/gnunet-service-nse.c
gnunet/src/nse/nse_profiler_test.conf
Log:
disable use of signatures if nse proof is disabled -- for example, this is done
in testing/benchmarking
Modified: gnunet/src/nse/gnunet-service-nse.c
===================================================================
--- gnunet/src/nse/gnunet-service-nse.c 2011-11-24 12:15:04 UTC (rev 18297)
+++ gnunet/src/nse/gnunet-service-nse.c 2011-11-24 12:31:32 UTC (rev 18298)
@@ -657,9 +657,12 @@
fm->timestamp = GNUNET_TIME_absolute_hton (ts);
fm->pkey = my_public_key;
fm->proof_of_work = my_proof;
- GNUNET_assert (GNUNET_OK ==
- GNUNET_CRYPTO_rsa_sign (my_private_key, &fm->purpose,
- &fm->signature));
+ if (nse_work_required > 0)
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_CRYPTO_rsa_sign (my_private_key, &fm->purpose,
+ &fm->signature));
+ else
+ memset (&fm->signature, 0, sizeof (fm->signature));
}
@@ -847,12 +850,15 @@
if (ntohl (size_estimate_messages[i].hop_count) == 0)
{
size_estimate_messages[i].proof_of_work = my_proof;
- GNUNET_assert (GNUNET_OK ==
- GNUNET_CRYPTO_rsa_sign (my_private_key,
- &size_estimate_messages
- [i].purpose,
- &size_estimate_messages
- [i].signature));
+ if (nse_work_required > 0)
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_CRYPTO_rsa_sign (my_private_key,
+ &size_estimate_messages
+ [i].purpose,
+ &size_estimate_messages
+ [i].signature));
+ else
+ memset (&size_estimate_messages[i].signature, 0, sizeof (struct
GNUNET_CRYPTO_RsaSignature));
}
write_proof ();
return;
@@ -902,11 +908,12 @@
GNUNET_break_op (0);
return GNUNET_NO;
}
- if (GNUNET_OK !=
- GNUNET_CRYPTO_rsa_verify (GNUNET_SIGNATURE_PURPOSE_NSE_SEND,
- &incoming_flood->purpose,
- &incoming_flood->signature,
- &incoming_flood->pkey))
+ if ( (nse_work_required > 0) &&
+ (GNUNET_OK !=
+ GNUNET_CRYPTO_rsa_verify (GNUNET_SIGNATURE_PURPOSE_NSE_SEND,
+ &incoming_flood->purpose,
+ &incoming_flood->signature,
+ &incoming_flood->pkey)) )
{
GNUNET_break_op (0);
return GNUNET_NO;
Modified: gnunet/src/nse/nse_profiler_test.conf
===================================================================
--- gnunet/src/nse/nse_profiler_test.conf 2011-11-24 12:15:04 UTC (rev
18297)
+++ gnunet/src/nse/nse_profiler_test.conf 2011-11-24 12:31:32 UTC (rev
18298)
@@ -13,7 +13,7 @@
CONFIG = $DEFAULTCONFIG
# Overriding network settings for faster testing (do NOT use
# these values in production just because they are here)
-WORKDELAY = 10 s
+WORKDELAY = 60 s
INTERVAL = 15 s
WORKBITS = 0
PROOFFILE = $SERVICEHOME/nse.proof
@@ -70,7 +70,7 @@
plugins = unix
[testing]
-NUM_PEERS = 2000
+NUM_PEERS = 1000
WEAKRANDOM = YES
TOPOLOGY = NONE
CONNECT_TOPOLOGY = SMALL_WORLD_RING
@@ -105,5 +105,6 @@
#ROUND3 = 100
#ROUND2 = 500
#ROUND3 = 1000
-WAIT_TIME = 1200 s
+WAIT_TIME = 120 s
CONNECTION_LIMIT = 10
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r18298 - gnunet/src/nse,
gnunet <=