diff options
author | Florian Dold <florian.dold@gmail.com> | 2015-09-22 01:20:28 +0000 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2015-09-22 01:20:28 +0000 |
commit | afc7d17dc798216e89506fb4e66aabb7e0f0077b (patch) | |
tree | 786d44d7852795f9f20549466f39683e32e6abea /src/consensus/consensus_protocol.h | |
parent | a8bb50dcefdab19f4990995ded586b237501b2c1 (diff) | |
download | gnunet-afc7d17dc798216e89506fb4e66aabb7e0f0077b.tar.gz gnunet-afc7d17dc798216e89506fb4e66aabb7e0f0077b.zip |
work on CONSENSUS and SET
- byzantine consensus work in progress
- fix SET generation handling
Diffstat (limited to 'src/consensus/consensus_protocol.h')
-rw-r--r-- | src/consensus/consensus_protocol.h | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/src/consensus/consensus_protocol.h b/src/consensus/consensus_protocol.h index 377d26966..ede22eb61 100644 --- a/src/consensus/consensus_protocol.h +++ b/src/consensus/consensus_protocol.h | |||
@@ -37,6 +37,9 @@ GNUNET_NETWORK_STRUCT_BEGIN | |||
37 | 37 | ||
38 | /** | 38 | /** |
39 | * Sent as context message for set reconciliation. | 39 | * Sent as context message for set reconciliation. |
40 | * | ||
41 | * Essentially contains all the fields | ||
42 | * from 'struct TaskKey', but in NBO. | ||
40 | */ | 43 | */ |
41 | struct GNUNET_CONSENSUS_RoundContextMessage | 44 | struct GNUNET_CONSENSUS_RoundContextMessage |
42 | { | 45 | { |
@@ -44,9 +47,44 @@ struct GNUNET_CONSENSUS_RoundContextMessage | |||
44 | * Type: GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ROUND_CONTEXT | 47 | * Type: GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ROUND_CONTEXT |
45 | */ | 48 | */ |
46 | struct GNUNET_MessageHeader header; | 49 | struct GNUNET_MessageHeader header; |
47 | uint32_t round; | 50 | |
48 | uint32_t exp_repetition; | 51 | /** |
49 | uint32_t exp_subround; | 52 | * A value from 'enum PhaseKind'. |
53 | */ | ||
54 | uint16_t kind; | ||
55 | |||
56 | /** | ||
57 | * Number of the first peer | ||
58 | * in canonical order. | ||
59 | */ | ||
60 | int16_t peer1; | ||
61 | |||
62 | /** | ||
63 | * Number of the second peer in canonical order. | ||
64 | */ | ||
65 | int16_t peer2; | ||
66 | |||
67 | /** | ||
68 | * Repetition of the gradecast phase. | ||
69 | */ | ||
70 | int16_t repetition; | ||
71 | |||
72 | /** | ||
73 | * Leader in the gradecast phase. | ||
74 | * | ||
75 | * Can be different from both peer1 and peer2. | ||
76 | */ | ||
77 | int16_t leader; | ||
78 | |||
79 | /** | ||
80 | * Non-zero if this set reconciliation | ||
81 | * had elements removed because they were contested. | ||
82 | * | ||
83 | * Will be considered when grading broadcasts. | ||
84 | * | ||
85 | * Ignored for set operations that are not within gradecasts. | ||
86 | */ | ||
87 | uint16_t is_contested; | ||
50 | }; | 88 | }; |
51 | 89 | ||
52 | GNUNET_NETWORK_STRUCT_END | 90 | GNUNET_NETWORK_STRUCT_END |