[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 10/31: some comments
From: |
gnunet |
Subject: |
[gnunet] 10/31: some comments |
Date: |
Wed, 22 Apr 2020 21:53:01 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
commit 37bb51d9fc99c8d5dd99343adf0feb7e351e6394
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Sun Apr 19 20:28:39 2020 +0200
some comments
---
src/revocation/revocation_api.c | 39 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c
index c817e612a..bd0202b67 100644
--- a/src/revocation/revocation_api.c
+++ b/src/revocation/revocation_api.c
@@ -50,20 +50,57 @@ struct GNUNET_REVOCATION_Query
void *func_cls;
};
+
+/**
+ * Helper struct that holds a found pow nonce
+ * and the corresponding number of leading zeroes.
+ */
struct BestPow
{
+ /**
+ * PoW nonce
+ */
uint64_t pow;
+
+ /**
+ * Corresponding zero bits in hash
+ */
unsigned int bits;
};
+
+/**
+ * The handle to a PoW calculation.
+ * Used in iterative PoW rounds.
+ */
struct GNUNET_REVOCATION_PowCalculationHandle
{
+ /**
+ * Current set of found PoWs
+ */
struct BestPow best[POW_COUNT];
+
+ /**
+ * The final PoW result data structure.
+ */
struct GNUNET_REVOCATION_Pow pow;
+
+ /**
+ * The current nonce to try
+ */
uint64_t current_pow;
+
+ /**
+ * Epochs how long the PoW should be valid.
+ * This is added on top of the difficulty in the PoW.
+ */
unsigned int epochs;
+
+ /**
+ * The difficulty (leading zeros) to achieve.
+ */
unsigned int difficulty;
- int valid;
+
};
/**
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnunet] 03/31: update params, (continued)
- [gnunet] 03/31: update params, gnunet, 2020/04/22
- [gnunet] 02/31: add argon2 for LSD0001, gnunet, 2020/04/22
- [gnunet] 07/31: towards more expirations, gnunet, 2020/04/22
- [gnunet] 05/31: revert, gnunet, 2020/04/22
- [gnunet] 06/31: simplify pow even more; add timestamp to revocation pow, gnunet, 2020/04/22
- [gnunet] 09/31: no diplicate nonces, gnunet, 2020/04/22
- [gnunet] 11/31: uncrustify, gnunet, 2020/04/22
- [gnunet] 12/31: those are actually debug messages, gnunet, 2020/04/22
- [gnunet] 13/31: more comments, allow to pick up pow later, gnunet, 2020/04/22
- [gnunet] 18/31: fix, gnunet, 2020/04/22
- [gnunet] 10/31: some comments,
gnunet <=
- [gnunet] 25/31: packed makes no sense there, gnunet, 2020/04/22
- [gnunet] 19/31: check signature in check_pow, gnunet, 2020/04/22
- [gnunet] 14/31: evaluate epochs, gnunet, 2020/04/22
- [gnunet] 24/31: remove pow_get, gnunet, 2020/04/22
- [gnunet] 21/31: predate validity time on creation; extent ttl on validation, gnunet, 2020/04/22
- [gnunet] 28/31: purge scrypt; add argon2, gnunet, 2020/04/22
- [gnunet] 16/31: remove sign API call, gnunet, 2020/04/22
- [gnunet] 17/31: update API comments, gnunet, 2020/04/22
- [gnunet] 30/31: add epochs CLI parameter, gnunet, 2020/04/22
- [gnunet] 29/31: remova binary file commited by accident, gnunet, 2020/04/22