multi-peer set reconciliation More...
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_dht_block_types.h"
#include "gnunet_protocols.h"
#include "gnunet_set_service.h"
#include "gnunet_statistics_service.h"
#include "consensus_protocol.h"
#include "consensus.h"
Go to the source code of this file.
Data Structures | |
struct | TaskKey |
Tuple of integers that together identify a task uniquely. More... | |
struct | SetKey |
struct | SetEntry |
struct | DiffKey |
struct | RfnKey |
struct | SetOpCls |
struct | FinishCls |
union | TaskFuncCls |
Closure for both start_task and cancel_task. More... | |
struct | TaskEntry |
struct | Step |
struct | RfnElementInfo |
struct | ReferendumEntry |
struct | DiffElementInfo |
struct | DiffEntry |
Weighted diff. More... | |
struct | SetHandle |
struct | ConsensusSession |
A consensus session consists of one local client and the remote authorities. More... | |
struct | SetCopyCls |
struct | SetMutationProgressCls |
Typedefs | |
typedef void(* | TaskFunc) (struct TaskEntry *task) |
Enumerations | |
enum | ReferendumVote { VOTE_STAY = 0 , VOTE_ADD = 1 , VOTE_REMOVE = 2 } |
enum | EarlyStoppingPhase { EARLY_STOPPING_NONE = 0 , EARLY_STOPPING_ONE_MORE = 1 , EARLY_STOPPING_DONE = 2 } |
enum | PhaseKind { PHASE_KIND_ALL_TO_ALL , PHASE_KIND_ALL_TO_ALL_2 , PHASE_KIND_GRADECAST_LEADER , PHASE_KIND_GRADECAST_ECHO , PHASE_KIND_GRADECAST_ECHO_GRADE , PHASE_KIND_GRADECAST_CONFIRM , PHASE_KIND_GRADECAST_CONFIRM_GRADE , PHASE_KIND_APPLY_REP , PHASE_KIND_FINISH } |
enum | SetKind { SET_KIND_NONE = 0 , SET_KIND_CURRENT , SET_KIND_LAST_GRADECAST , SET_KIND_LEADER_PROPOSAL , SET_KIND_ECHO_RESULT } |
enum | DiffKind { DIFF_KIND_NONE = 0 , DIFF_KIND_LEADER_PROPOSAL , DIFF_KIND_LEADER_CONSENSUS , DIFF_KIND_GRADECAST_RESULT } |
enum | RfnKind { RFN_KIND_NONE = 0 , RFN_KIND_ECHO , RFN_KIND_CONFIRM , RFN_KIND_GRADECAST_RESULT } |
Functions | |
static void | finish_task (struct TaskEntry *task) |
static void | run_ready_steps (struct ConsensusSession *session) |
static const char * | phasename (uint16_t phase) |
static const char * | setname (uint16_t kind) |
static const char * | rfnname (uint16_t kind) |
static const char * | diffname (uint16_t kind) |
static int | send_to_client_iter (void *cls, const struct GNUNET_SET_Element *element) |
Send the final result set of the consensus to the client, element by element. More... | |
static struct SetEntry * | lookup_set (struct ConsensusSession *session, const struct SetKey *key) |
static struct DiffEntry * | lookup_diff (struct ConsensusSession *session, const struct DiffKey *key) |
static struct ReferendumEntry * | lookup_rfn (struct ConsensusSession *session, const struct RfnKey *key) |
static void | diff_insert (struct DiffEntry *diff, int weight, const struct GNUNET_SET_Element *element) |
static void | rfn_commit (struct ReferendumEntry *rfn, uint16_t commit_peer) |
static void | rfn_contest (struct ReferendumEntry *rfn, uint16_t contested_peer) |
static uint16_t | rfn_noncontested (struct ReferendumEntry *rfn) |
static void | rfn_vote (struct ReferendumEntry *rfn, uint16_t voting_peer, enum ReferendumVote vote, const struct GNUNET_SET_Element *element) |
static uint16_t | task_other_peer (struct TaskEntry *task) |
static int | cmp_uint64_t (const void *pa, const void *pb) |
static void | set_result_cb (void *cls, const struct GNUNET_SET_Element *element, uint64_t current_size, enum GNUNET_SET_Status status) |
Callback for set operation results. More... | |
static void | commit_set (struct ConsensusSession *session, struct TaskEntry *task) |
Commit the appropriate set for a task. More... | |
static void | put_diff (struct ConsensusSession *session, struct DiffEntry *diff) |
static void | put_set (struct ConsensusSession *session, struct SetEntry *set) |
static void | put_rfn (struct ConsensusSession *session, struct ReferendumEntry *rfn) |
static void | task_cancel_reconcile (struct TaskEntry *task) |
static void | apply_diff_to_rfn (struct DiffEntry *diff, struct ReferendumEntry *rfn, uint16_t voting_peer, uint16_t num_peers) |
static struct DiffEntry * | diff_create (void) |
static struct ReferendumEntry * | rfn_create (uint16_t size) |
static void | rfn_majority (const struct ReferendumEntry *rfn, const struct RfnElementInfo *ri, uint16_t *ret_majority, enum ReferendumVote *ret_vote) |
For a given majority, count what the outcome is (add/remove/keep), and give the number of peers that voted for this outcome. More... | |
static void | set_copy_cb (void *cls, struct GNUNET_SET_Handle *copy) |
static void | create_set_copy_for_task (struct TaskEntry *task, struct SetKey *src_set_key, struct SetKey *dst_set_key) |
Call the start function of the given task again after we created a copy of the given set. More... | |
static void | set_mutation_done (void *cls) |
static void | try_finish_step_early (struct Step *step) |
static void | finish_step (struct Step *step) |
static void | task_start_apply_round (struct TaskEntry *task) |
Apply the result from one round of gradecasts (i.e. More... | |
static void | task_start_grade (struct TaskEntry *task) |
static void | task_start_reconcile (struct TaskEntry *task) |
static void | task_start_eval_echo (struct TaskEntry *task) |
static void | task_start_finish (struct TaskEntry *task) |
static void | start_task (struct ConsensusSession *session, struct TaskEntry *task) |
static int | get_peer_idx (const struct GNUNET_PeerIdentity *peer, const struct ConsensusSession *session) |
Search peer in the list of peers in session. More... | |
static void | compute_global_id (struct ConsensusSession *session, const struct GNUNET_HashCode *local_session_id) |
Compute a global, (hopefully) unique consensus session id, from the local id of the consensus session, and the identities of all participants. More... | |
static int | peer_id_cmp (const void *h1, const void *h2) |
Compare two peer identities (for qsort()). More... | |
static void | initialize_session_peer_list (struct ConsensusSession *session, const struct GNUNET_CONSENSUS_JoinMessage *join_msg) |
Create the sorted list of peers for the session, add the local peer if not in the join message. More... | |
static struct TaskEntry * | lookup_task (const struct ConsensusSession *session, const struct TaskKey *key) |
static void | set_listen_cb (void *cls, const struct GNUNET_PeerIdentity *other_peer, const struct GNUNET_MessageHeader *context_msg, struct GNUNET_SET_Request *request) |
Called when another peer wants to do a set operation with the local peer. More... | |
static void | put_task (struct GNUNET_CONTAINER_MultiHashMap *taskmap, struct TaskEntry *t) |
static void | install_step_timeouts (struct ConsensusSession *session) |
static void | arrange_peers (uint16_t *p1, uint16_t *p2, uint16_t n) |
static void | step_depend_on (struct Step *step, struct Step *dep) |
Record dep as a dependency of step. More... | |
static struct Step * | create_step (struct ConsensusSession *session, int round, int early_finishable) |
static void | construct_task_graph_gradecast (struct ConsensusSession *session, uint16_t rep, uint16_t lead, struct Step *step_before, struct Step *step_after) |
Construct the task graph for a single gradecast. More... | |
static void | construct_task_graph (struct ConsensusSession *session) |
static int | check_client_join (void *cls, const struct GNUNET_CONSENSUS_JoinMessage *m) |
Check join message. More... | |
static void | handle_client_join (void *cls, const struct GNUNET_CONSENSUS_JoinMessage *m) |
Called when a client wants to join a consensus session. More... | |
static int | check_client_insert (void *cls, const struct GNUNET_CONSENSUS_ElementMessage *msg) |
Called when a client performs an insert operation. More... | |
static void | handle_client_insert (void *cls, const struct GNUNET_CONSENSUS_ElementMessage *msg) |
Called when a client performs an insert operation. More... | |
static void | handle_client_conclude (void *cls, const struct GNUNET_MessageHeader *message) |
Called when a client performs the conclude operation. More... | |
static void | shutdown_task (void *cls) |
Called to clean up, after a shutdown has been requested. More... | |
static void | run (void *cls, const struct GNUNET_CONFIGURATION_Handle *c, struct GNUNET_SERVICE_Handle *service) |
Start processing consensus requests. More... | |
static void * | client_connect_cb (void *cls, struct GNUNET_SERVICE_Client *c, struct GNUNET_MQ_Handle *mq) |
Callback called when a client connects to the service. More... | |
static void | client_disconnect_cb (void *cls, struct GNUNET_SERVICE_Client *c, void *internal_cls) |
Callback called when a client disconnected from the service. More... | |
GNUNET_SERVICE_MAIN (GNUNET_OS_project_data_gnunet(), "consensus", GNUNET_SERVICE_OPTION_NONE, &run, &client_connect_cb, &client_disconnect_cb, NULL, GNUNET_MQ_hd_fixed_size(client_conclude, GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_CONCLUDE, struct GNUNET_MessageHeader, NULL), GNUNET_MQ_hd_var_size(client_insert, GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_INSERT, struct GNUNET_CONSENSUS_ElementMessage, NULL), GNUNET_MQ_hd_var_size(client_join, GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_JOIN, struct GNUNET_CONSENSUS_JoinMessage, NULL), GNUNET_MQ_handler_end()) | |
Define "main" method using service macro. More... | |
Variables | |
static struct ConsensusSession * | sessions_head |
Linked list of sessions this peer participates in. More... | |
static struct ConsensusSession * | sessions_tail |
Linked list of sessions this peer participates in. More... | |
static const struct GNUNET_CONFIGURATION_Handle * | cfg |
Configuration of the consensus service. More... | |
static struct GNUNET_PeerIdentity | my_peer |
Peer that runs this service. More... | |
struct GNUNET_STATISTICS_Handle * | statistics |
Statistics handle. More... | |
multi-peer set reconciliation
Definition in file gnunet-service-consensus.c.
typedef void(* TaskFunc) (struct TaskEntry *task) |
Definition at line 227 of file gnunet-service-consensus.c.
enum ReferendumVote |
Enumerator | |
---|---|
VOTE_STAY | Vote that nothing should change. This option is never voted explicitly. |
VOTE_ADD | Vote that an element should be added. |
VOTE_REMOVE | Vote that an element should be removed. |
Definition at line 35 of file gnunet-service-consensus.c.
enum EarlyStoppingPhase |
Enumerator | |
---|---|
EARLY_STOPPING_NONE | |
EARLY_STOPPING_ONE_MORE | |
EARLY_STOPPING_DONE |
Definition at line 53 of file gnunet-service-consensus.c.
enum PhaseKind |
Definition at line 61 of file gnunet-service-consensus.c.
enum SetKind |
Enumerator | |
---|---|
SET_KIND_NONE | |
SET_KIND_CURRENT | |
SET_KIND_LAST_GRADECAST | Last result set from a gradecast. |
SET_KIND_LEADER_PROPOSAL | |
SET_KIND_ECHO_RESULT |
Definition at line 79 of file gnunet-service-consensus.c.
enum DiffKind |
Enumerator | |
---|---|
DIFF_KIND_NONE | |
DIFF_KIND_LEADER_PROPOSAL | |
DIFF_KIND_LEADER_CONSENSUS | |
DIFF_KIND_GRADECAST_RESULT |
Definition at line 91 of file gnunet-service-consensus.c.
enum RfnKind |
Enumerator | |
---|---|
RFN_KIND_NONE | |
RFN_KIND_ECHO | |
RFN_KIND_CONFIRM | |
RFN_KIND_GRADECAST_RESULT |
Definition at line 99 of file gnunet-service-consensus.c.
|
static |
Definition at line 2492 of file gnunet-service-consensus.c.
References finish_step(), Step::finished_tasks, GNUNET_assert, GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_NO, GNUNET_YES, TaskEntry::is_finished, TaskEntry::key, ConsensusSession::local_peer_idx, Step::session, TaskEntry::step, and Step::tasks_len.
Referenced by commit_set(), set_mutation_done(), set_result_cb(), task_start_apply_round(), task_start_eval_echo(), task_start_grade(), and task_start_reconcile().
|
static |
Definition at line 2451 of file gnunet-service-consensus.c.
References Step::debug_name, finish_step(), Step::finished_tasks, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_NO, GNUNET_YES, Step::is_finished, Step::is_running, ConsensusSession::local_peer_idx, Step::next, Step::pending_prereq, Step::round, Step::session, start_task(), ConsensusSession::steps_head, Step::subordinates_len, Step::tasks, and Step::tasks_len.
Referenced by finish_step(), handle_client_conclude(), and try_finish_step_early().
|
static |
Definition at line 549 of file gnunet-service-consensus.c.
References phase, PHASE_KIND_ALL_TO_ALL, PHASE_KIND_ALL_TO_ALL_2, PHASE_KIND_APPLY_REP, PHASE_KIND_FINISH, PHASE_KIND_GRADECAST_CONFIRM, PHASE_KIND_GRADECAST_CONFIRM_GRADE, PHASE_KIND_GRADECAST_ECHO, PHASE_KIND_GRADECAST_ECHO_GRADE, and PHASE_KIND_GRADECAST_LEADER.
|
static |
Definition at line 577 of file gnunet-service-consensus.c.
References SET_KIND_CURRENT, SET_KIND_LEADER_PROPOSAL, and SET_KIND_NONE.
|
static |
Definition at line 593 of file gnunet-service-consensus.c.
References RFN_KIND_CONFIRM, RFN_KIND_ECHO, and RFN_KIND_NONE.
|
static |
Definition at line 609 of file gnunet-service-consensus.c.
References DIFF_KIND_GRADECAST_RESULT, DIFF_KIND_LEADER_CONSENSUS, DIFF_KIND_LEADER_PROPOSAL, and DIFF_KIND_NONE.
|
static |
Send the final result set of the consensus to the client, element by element.
cls | closure |
element | the current element, NULL if all elements have been iterated over |
Definition at line 708 of file gnunet-service-consensus.c.
References ConsensusSession::client_mq, TaskEntry::cls, GNUNET_SET_Element::data, GNUNET_SET_Element::element_type, GNUNET_assert, GNUNET_BLOCK_TYPE_CONSENSUS_ELEMENT, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_CONCLUDE_DONE, GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_RECEIVED_ELEMENT, GNUNET_MQ_msg_extra, GNUNET_MQ_msg_header, GNUNET_MQ_send(), GNUNET_YES, ConsensusSession::local_peer_idx, m, ConsensusElement::marker, ConsensusElement::payload_type, Step::session, GNUNET_SET_Element::size, and TaskEntry::step.
Referenced by task_start_finish().
|
static |
Definition at line 760 of file gnunet-service-consensus.c.
References GNUNET_assert, GNUNET_CONTAINER_multihashmap_get(), GNUNET_CRYPTO_hash(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, key, ConsensusSession::local_peer_idx, SET_KIND_NONE, and ConsensusSession::setmap.
Referenced by commit_set(), create_set_copy_for_task(), handle_client_insert(), set_result_cb(), task_start_apply_round(), task_start_eval_echo(), task_start_finish(), and task_start_reconcile().
|
static |
Definition at line 780 of file gnunet-service-consensus.c.
References DIFF_KIND_NONE, ConsensusSession::diffmap, GNUNET_assert, GNUNET_CONTAINER_multihashmap_get(), GNUNET_CRYPTO_hash(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, key, and ConsensusSession::local_peer_idx.
Referenced by set_result_cb(), task_start_grade(), and task_start_reconcile().
|
static |
Definition at line 799 of file gnunet-service-consensus.c.
References GNUNET_assert, GNUNET_CONTAINER_multihashmap_get(), GNUNET_CRYPTO_hash(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, key, ConsensusSession::local_peer_idx, RFN_KIND_NONE, and ConsensusSession::rfnmap.
Referenced by set_result_cb(), task_start_apply_round(), task_start_eval_echo(), task_start_grade(), and task_start_reconcile().
|
static |
Definition at line 818 of file gnunet-service-consensus.c.
References DiffEntry::changes, DiffElementInfo::element, GNUNET_assert, GNUNET_CONTAINER_multihashmap_get(), GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_new, GNUNET_OK, GNUNET_SET_element_dup(), GNUNET_SET_element_hash(), GNUNET_SET_Element::size, and DiffElementInfo::weight.
Referenced by set_result_cb().
|
static |
Definition at line 857 of file gnunet-service-consensus.c.
References GNUNET_assert, GNUNET_YES, num_peers, and ReferendumEntry::peer_commited.
Referenced by set_result_cb(), and task_start_grade().
|
static |
Definition at line 867 of file gnunet-service-consensus.c.
References GNUNET_assert, GNUNET_YES, num_peers, and ReferendumEntry::peer_contested.
Referenced by set_result_cb().
|
static |
Definition at line 877 of file gnunet-service-consensus.c.
References GNUNET_NO, GNUNET_YES, ReferendumEntry::num_peers, ReferendumEntry::peer_commited, ReferendumEntry::peer_contested, and ret.
Referenced by task_start_grade().
|
static |
Definition at line 892 of file gnunet-service-consensus.c.
References RfnElementInfo::element, GNUNET_assert, GNUNET_CONTAINER_multihashmap_get(), GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST, GNUNET_new, GNUNET_new_array, GNUNET_OK, GNUNET_SET_element_dup(), GNUNET_SET_element_hash(), GNUNET_YES, ReferendumEntry::num_peers, num_peers, RfnElementInfo::proposal, ReferendumEntry::rfn_elements, VOTE_ADD, VOTE_REMOVE, and RfnElementInfo::votes.
Referenced by apply_diff_to_rfn(), set_result_cb(), and task_start_grade().
|
static |
Definition at line 926 of file gnunet-service-consensus.c.
References TaskEntry::key, ConsensusSession::local_peer_idx, me, TaskKey::peer1, TaskKey::peer2, Step::session, and TaskEntry::step.
Referenced by commit_set(), and set_result_cb().
|
static |
Definition at line 937 of file gnunet-service-consensus.c.
Referenced by set_result_cb().
|
static |
Callback for set operation results.
Called for each element in the result set.
cls | closure |
element | a result element, only valid if status is GNUNET_SET_STATUS_OK |
current_size | current set size |
status | see enum GNUNET_SET_Status |
Definition at line 960 of file gnunet-service-consensus.c.
References TaskEntry::cls, cmp_uint64_t(), CONSENSUS_MARKER_CONTESTED, CONSENSUS_MARKER_SIZE, GNUNET_SET_Element::data, diff_insert(), DiffKey::diff_kind, DIFF_KIND_NONE, SetOpCls::do_not_remove, GNUNET_SET_Element::element_type, finish_task(), Step::finished_tasks, ConsensusSession::first_size, ConsensusSession::first_sizes_received, GNUNET_assert, GNUNET_BLOCK_TYPE_CONSENSUS_ELEMENT, GNUNET_break_op, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_memdup, GNUNET_new_array, GNUNET_NO, GNUNET_ntohll(), GNUNET_SET_add_element(), GNUNET_SET_remove_element(), GNUNET_SET_STATUS_ADD_LOCAL, GNUNET_SET_STATUS_ADD_REMOTE, GNUNET_SET_STATUS_DONE, GNUNET_SET_STATUS_FAILURE, GNUNET_YES, SetEntry::h, TaskEntry::is_finished, TaskEntry::is_started, TaskEntry::key, TaskKey::kind, ConsensusSession::local_peer_idx, lookup_diff(), lookup_rfn(), lookup_set(), ConsensusSession::lower_bound, ConsensusElement::marker, ConsensusSession::num_peers, SetOpCls::output_diff, SetOpCls::output_rfn, SetOpCls::output_set, ConsensusSession::peers_blacklisted, PHASE_KIND_ALL_TO_ALL, rfn_commit(), rfn_contest(), RfnKey::rfn_kind, RFN_KIND_NONE, rfn_vote(), ConsensusSizeElement::sender_index, Step::session, SetKey::set_kind, SET_KIND_NONE, TaskFuncCls::setop, ConsensusSizeElement::size, status, TaskEntry::step, task_other_peer(), Step::tasks_len, SetOpCls::transceive_contested, VOTE_ADD, and VOTE_REMOVE.
Referenced by set_listen_cb(), and task_start_reconcile().
|
static |
Commit the appropriate set for a task.
Definition at line 1385 of file gnunet-service-consensus.c.
References ConsensusSizeElement::ce, ConsensusStuffedElement::ce, cfg, TaskEntry::cls, CONSENSUS_MARKER_CONTESTED, CONSENSUS_MARKER_SIZE, GNUNET_SET_Element::data, GNUNET_SET_Element::element_type, finish_task(), ConsensusSession::first_size, GNUNET_assert, GNUNET_BLOCK_TYPE_CONSENSUS_ELEMENT, GNUNET_CRYPTO_hash(), GNUNET_CRYPTO_hash_create_random(), GNUNET_CRYPTO_QUALITY_WEAK, GNUNET_ERROR_TYPE_DEBUG, GNUNET_htonll(), GNUNET_log, GNUNET_NO, GNUNET_SET_add_element(), GNUNET_SET_commit(), GNUNET_SET_create(), GNUNET_SET_destroy(), GNUNET_SET_operation_cancel(), GNUNET_SET_OPERATION_UNION, GNUNET_STATISTICS_set(), GNUNET_STATISTICS_update(), GNUNET_YES, SetEntry::h, SetOpCls::input_set, SetEntry::is_contested, SetEntry::key, TaskEntry::key, TaskKey::kind, ConsensusSession::local_peer_idx, lookup_set(), ConsensusElement::marker, SetOpCls::op, ConsensusElement::payload_type, ConsensusSession::peers_blacklisted, PHASE_KIND_ALL_TO_ALL, PHASE_KIND_ALL_TO_ALL_2, PHASE_KIND_GRADECAST_ECHO, PHASE_KIND_GRADECAST_LEADER, ConsensusStuffedElement::rand, ConsensusSizeElement::sender_index, SetKey::set_kind, SET_KIND_CURRENT, TaskFuncCls::setop, ConsensusSizeElement::size, GNUNET_SET_Element::size, statistics, task_other_peer(), and SetOpCls::transceive_contested.
Referenced by set_listen_cb(), and task_start_reconcile().
|
static |
Definition at line 1554 of file gnunet-service-consensus.c.
References ConsensusSession::diffmap, GNUNET_assert, GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY, GNUNET_CRYPTO_hash(), GNUNET_OK, and DiffEntry::key.
Referenced by task_start_reconcile().
|
static |
Definition at line 1571 of file gnunet-service-consensus.c.
References GNUNET_assert, GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE, GNUNET_CRYPTO_hash(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_SYSERR, SetEntry::h, SetEntry::key, and ConsensusSession::setmap.
Referenced by handle_client_join(), set_copy_cb(), and task_start_eval_echo().
|
static |
Definition at line 1592 of file gnunet-service-consensus.c.
References GNUNET_assert, GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY, GNUNET_CRYPTO_hash(), GNUNET_OK, ReferendumEntry::key, and ConsensusSession::rfnmap.
Referenced by task_start_grade(), and task_start_reconcile().
|
static |
Definition at line 1607 of file gnunet-service-consensus.c.
References GNUNET_assert.
Referenced by construct_task_graph(), and construct_task_graph_gradecast().
|
static |
Definition at line 1615 of file gnunet-service-consensus.c.
References DiffEntry::changes, DiffElementInfo::element, GNUNET_CONTAINER_multihashmap_iterator_create(), GNUNET_CONTAINER_multihashmap_iterator_destroy(), GNUNET_CONTAINER_multihashmap_iterator_next(), GNUNET_YES, rfn_vote(), VOTE_ADD, VOTE_REMOVE, and DiffElementInfo::weight.
Referenced by task_start_grade().
|
static |
Definition at line 1645 of file gnunet-service-consensus.c.
References d, GNUNET_CONTAINER_multihashmap_create(), GNUNET_new, and GNUNET_NO.
Referenced by task_start_reconcile().
|
static |
Definition at line 1699 of file gnunet-service-consensus.c.
References GNUNET_CONTAINER_multihashmap_create(), GNUNET_new, GNUNET_new_array, GNUNET_NO, ReferendumEntry::num_peers, ReferendumEntry::peer_commited, ReferendumEntry::peer_contested, ReferendumEntry::rfn_elements, and size.
Referenced by task_start_grade(), and task_start_reconcile().
|
static |
For a given majority, count what the outcome is (add/remove/keep), and give the number of peers that voted for this outcome.
Definition at line 1731 of file gnunet-service-consensus.c.
References RfnElementInfo::element, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_NO, GNUNET_YES, ReferendumEntry::key, ReferendumEntry::num_peers, ReferendumEntry::peer_commited, RfnElementInfo::proposal, VOTE_STAY, and RfnElementInfo::votes.
Referenced by task_start_apply_round(), task_start_eval_echo(), and task_start_grade().
|
static |
Definition at line 1775 of file gnunet-service-consensus.c.
References SetCopyCls::dst_set_key, GNUNET_CONTAINER_DLL_insert, GNUNET_free, GNUNET_new, SetEntry::h, SetEntry::key, put_set(), Step::session, ConsensusSession::set_handles_head, ConsensusSession::set_handles_tail, sh, TaskEntry::start, TaskEntry::step, and SetCopyCls::task.
Referenced by create_set_copy_for_task().
|
static |
Call the start function of the given task again after we created a copy of the given set.
Definition at line 1804 of file gnunet-service-consensus.c.
References SetCopyCls::dst_set_key, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_new, GNUNET_SET_copy_lazy(), SetEntry::h, TaskEntry::key, lookup_set(), Step::session, set_copy_cb(), TaskEntry::step, and SetCopyCls::task.
Referenced by task_start_apply_round(), task_start_eval_echo(), and task_start_reconcile().
|
static |
Definition at line 1838 of file gnunet-service-consensus.c.
References finish_task(), GNUNET_assert, GNUNET_free, and pc.
Referenced by task_start_apply_round(), and task_start_eval_echo().
|
static |
Definition at line 1856 of file gnunet-service-consensus.c.
References Step::debug_name, Step::early_finishable, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_NO, GNUNET_YES, Step::is_finished, Step::is_running, Step::pending_prereq, run_ready_steps(), Step::session, TaskEntry::step, Step::subordinates, Step::subordinates_len, and try_finish_step_early().
Referenced by task_start_apply_round(), and try_finish_step_early().
|
static |
Definition at line 1892 of file gnunet-service-consensus.c.
References Step::debug_name, Step::finished_tasks, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_NO, GNUNET_YES, Step::is_finished, Step::is_running, Step::pending_prereq, run_ready_steps(), Step::session, TaskEntry::step, Step::subordinates, Step::subordinates_len, and Step::tasks_len.
Referenced by finish_task(), and run_ready_steps().
|
static |
Apply the result from one round of gradecasts (i.e.
every peer should have gradecasted) to the peer's current set.
task | the task with context information |
Definition at line 1931 of file gnunet-service-consensus.c.
References create_set_copy_for_task(), ConsensusSession::early_stopping, EARLY_STOPPING_DONE, EARLY_STOPPING_NONE, EARLY_STOPPING_ONE_MORE, RfnElementInfo::element, finish_task(), GNUNET_assert, GNUNET_break, GNUNET_break_op, GNUNET_CONTAINER_multihashmap_iterator_create(), GNUNET_CONTAINER_multihashmap_iterator_destroy(), GNUNET_CONTAINER_multihashmap_iterator_next(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_INFO, GNUNET_free, GNUNET_log, GNUNET_new, GNUNET_OK, GNUNET_SET_add_element(), GNUNET_SET_remove_element(), GNUNET_YES, SetEntry::h, TaskEntry::key, ConsensusSession::local_peer_idx, lookup_rfn(), lookup_set(), Step::next, ConsensusSession::num_peers, SetMutationProgressCls::num_pending, TaskKey::repetition, ReferendumEntry::rfn_elements, RFN_KIND_GRADECAST_RESULT, rfn_majority(), Step::session, SET_KIND_CURRENT, set_mutation_done(), TaskEntry::step, ConsensusSession::steps_head, SetMutationProgressCls::task, try_finish_step_early(), VOTE_ADD, VOTE_REMOVE, and VOTE_STAY.
Referenced by construct_task_graph().
|
static |
Definition at line 2081 of file gnunet-service-consensus.c.
References apply_diff_to_rfn(), DIFF_KIND_LEADER_PROPOSAL, RfnElementInfo::element, finish_task(), GNUNET_assert, GNUNET_CONTAINER_multihashmap_iterator_create(), GNUNET_CONTAINER_multihashmap_iterator_destroy(), GNUNET_CONTAINER_multihashmap_iterator_next(), GNUNET_MIN, GNUNET_YES, TaskEntry::key, ReferendumEntry::key, TaskKey::leader, lookup_diff(), lookup_rfn(), ConsensusSession::num_peers, num_peers, ConsensusSession::peers_blacklisted, put_rfn(), TaskKey::repetition, rfn_commit(), rfn_create(), ReferendumEntry::rfn_elements, RFN_KIND_ECHO, RFN_KIND_GRADECAST_RESULT, rfn_majority(), rfn_noncontested(), rfn_vote(), Step::session, TaskEntry::step, VOTE_ADD, VOTE_REMOVE, and VOTE_STAY.
Referenced by construct_task_graph_gradecast().
|
static |
Definition at line 2176 of file gnunet-service-consensus.c.
References TaskEntry::cls, commit_set(), create_set_copy_for_task(), diff_create(), DiffKey::diff_kind, DIFF_KIND_NONE, finish_task(), ConsensusSession::global_id, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ROUND_CONTEXT, GNUNET_SET_OPTION_BYZANTINE, GNUNET_SET_OPTION_END, GNUNET_SET_prepare(), GNUNET_SET_RESULT_SYMMETRIC, SetEntry::h, GNUNET_CONSENSUS_RoundContextMessage::header, SetOpCls::input_set, GNUNET_CONSENSUS_RoundContextMessage::is_contested, TaskEntry::key, ReferendumEntry::key, DiffEntry::key, GNUNET_CONSENSUS_RoundContextMessage::kind, TaskKey::kind, GNUNET_CONSENSUS_RoundContextMessage::leader, TaskKey::leader, ConsensusSession::local_peer_idx, lookup_diff(), lookup_rfn(), lookup_set(), ConsensusSession::lower_bound, ConsensusSession::num_peers, SetOpCls::op, gnunet-chk::opts, SetOpCls::output_diff, SetOpCls::output_rfn, SetOpCls::output_set, GNUNET_CONSENSUS_RoundContextMessage::peer1, TaskKey::peer1, GNUNET_CONSENSUS_RoundContextMessage::peer2, TaskKey::peer2, ConsensusSession::peers, put_diff(), put_rfn(), GNUNET_CONSENSUS_RoundContextMessage::repetition, TaskKey::repetition, rfn_create(), RfnKey::rfn_kind, RFN_KIND_NONE, Step::session, SetKey::set_kind, SET_KIND_NONE, set_result_cb(), TaskFuncCls::setop, GNUNET_MessageHeader::size, TaskEntry::step, and GNUNET_MessageHeader::type.
Referenced by construct_task_graph(), and construct_task_graph_gradecast().
|
static |
Definition at line 2304 of file gnunet-service-consensus.c.
References create_set_copy_for_task(), RfnElementInfo::element, finish_task(), GNUNET_assert, GNUNET_CONTAINER_multihashmap_iterator_create(), GNUNET_CONTAINER_multihashmap_iterator_destroy(), GNUNET_CONTAINER_multihashmap_iterator_next(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_new, GNUNET_OK, GNUNET_SET_add_element(), GNUNET_SET_remove_element(), GNUNET_YES, SetEntry::h, SetEntry::is_contested, SetEntry::key, TaskEntry::key, TaskKey::leader, lookup_rfn(), lookup_set(), num_peers, SetMutationProgressCls::num_pending, put_set(), TaskKey::repetition, ReferendumEntry::rfn_elements, RFN_KIND_ECHO, rfn_majority(), Step::session, SET_KIND_ECHO_RESULT, SET_KIND_LAST_GRADECAST, SET_KIND_LEADER_PROPOSAL, set_mutation_done(), TaskEntry::step, SetMutationProgressCls::task, VOTE_ADD, VOTE_REMOVE, and VOTE_STAY.
Referenced by construct_task_graph_gradecast().
|
static |
Definition at line 2416 of file gnunet-service-consensus.c.
References TaskEntry::cls, TaskFuncCls::finish, GNUNET_assert, GNUNET_SET_iterate(), SetEntry::h, FinishCls::input_set, lookup_set(), send_to_client_iter(), Step::session, and TaskEntry::step.
Referenced by construct_task_graph().
|
static |
Definition at line 2431 of file gnunet-service-consensus.c.
References GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_NO, GNUNET_YES, TaskEntry::is_finished, TaskEntry::is_started, TaskEntry::key, ConsensusSession::local_peer_idx, and TaskEntry::start.
Referenced by run_ready_steps().
|
static |
Search peer in the list of peers in session.
peer | peer to find |
session | session with peer |
Definition at line 2517 of file gnunet-service-consensus.c.
References GNUNET_memcmp, ConsensusSession::num_peers, ConsensusSession::peers, and Step::session.
Referenced by handle_client_join().
|
static |
Compute a global, (hopefully) unique consensus session id, from the local id of the consensus session, and the identities of all participants.
Thus, if the local id of two consensus sessions coincide, but are not comprised of exactly the same peers, the global id will be different.
session | session to generate the global id for |
local_session_id | local id of the consensus session |
Definition at line 2537 of file gnunet-service-consensus.c.
References ConsensusSession::global_id, GNUNET_assert, GNUNET_CRYPTO_kdf(), GNUNET_YES, ConsensusSession::num_peers, ConsensusSession::peers, salt, and Step::session.
Referenced by handle_client_join().
|
static |
Compare two peer identities (for qsort()).
h1 | some peer identity |
h2 | some peer identity |
Definition at line 2564 of file gnunet-service-consensus.c.
Referenced by initialize_session_peer_list().
|
static |
Create the sorted list of peers for the session, add the local peer if not in the join message.
session | session to initialize |
join_msg | join message with the list of peers participating at the end |
Definition at line 2579 of file gnunet-service-consensus.c.
References GNUNET_memcmp, GNUNET_memcpy, GNUNET_new_array, GNUNET_NO, GNUNET_YES, my_peer, GNUNET_CONSENSUS_JoinMessage::num_peers, ConsensusSession::num_peers, peer_id_cmp(), and ConsensusSession::peers.
Referenced by handle_client_join().
|
static |
Definition at line 2620 of file gnunet-service-consensus.c.
References GNUNET_CONTAINER_multihashmap_get(), GNUNET_CRYPTO_hash(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_h2s(), GNUNET_log, key, and ConsensusSession::taskmap.
Referenced by set_listen_cb().
|
static |
Called when another peer wants to do a set operation with the local peer.
cls | closure |
other_peer | the other peer |
context_msg | message with application specific information from the other peer |
request | request from the other peer, use GNUNET_SET_accept to accept it, otherwise the request will be refused Note that we don't use a return value here, as it is also necessary to specify the set we want to do the operation with, which sometimes can be derived from the context message. Also necessary to specify the timeout. |
Definition at line 2652 of file gnunet-service-consensus.c.
References TaskEntry::cls, commit_set(), GNUNET_assert, GNUNET_break_op, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ROUND_CONTEXT, GNUNET_SET_accept(), GNUNET_SET_OPTION_BYZANTINE, GNUNET_SET_OPTION_END, GNUNET_SET_RESULT_SYMMETRIC, GNUNET_YES, TaskEntry::is_finished, TaskEntry::is_started, TaskEntry::key, GNUNET_CONSENSUS_RoundContextMessage::kind, GNUNET_CONSENSUS_RoundContextMessage::leader, ConsensusSession::local_peer_idx, lookup_task(), ConsensusSession::lower_bound, SetOpCls::op, gnunet-chk::opts, GNUNET_CONSENSUS_RoundContextMessage::peer1, TaskKey::peer1, GNUNET_CONSENSUS_RoundContextMessage::peer2, TaskKey::peer2, GNUNET_CONSENSUS_RoundContextMessage::repetition, request, set_result_cb(), TaskFuncCls::setop, GNUNET_MessageHeader::size, and GNUNET_MessageHeader::type.
Referenced by handle_client_join().
|
static |
Definition at line 2742 of file gnunet-service-consensus.c.
References Step::debug_name, GNUNET_array_grow, GNUNET_assert, GNUNET_CONTAINER_multihashmap_put(), GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY, GNUNET_CRYPTO_hash(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_memdup, GNUNET_OK, t, Step::tasks, Step::tasks_cap, and Step::tasks_len.
Referenced by construct_task_graph(), and construct_task_graph_gradecast().
|
static |
Definition at line 2781 of file gnunet-service-consensus.c.
Referenced by handle_client_conclude().
|
static |
Definition at line 2796 of file gnunet-service-consensus.c.
References GNUNET_assert.
Referenced by construct_task_graph(), and construct_task_graph_gradecast().
Record dep as a dependency of step.
Definition at line 2836 of file gnunet-service-consensus.c.
References Step::debug_name, GNUNET_array_grow, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, Step::pending_prereq, Step::round, Step::subordinates, Step::subordinates_cap, and Step::subordinates_len.
Referenced by construct_task_graph(), and construct_task_graph_gradecast().
|
static |
Definition at line 2876 of file gnunet-service-consensus.c.
References Step::early_finishable, GNUNET_CONTAINER_DLL_insert_tail, GNUNET_new, Step::round, Step::session, ConsensusSession::steps_head, and ConsensusSession::steps_tail.
Referenced by construct_task_graph(), and construct_task_graph_gradecast().
|
static |
Construct the task graph for a single gradecast.
Definition at line 2897 of file gnunet-service-consensus.c.
References arrange_peers(), TaskEntry::cls, create_step(), Step::debug_name, DIFF_KIND_LEADER_PROPOSAL, GNUNET_asprintf(), GNUNET_YES, SetOpCls::input_set, ConsensusSession::local_peer_idx, me, ConsensusSession::num_peers, SetOpCls::output_diff, SetOpCls::output_rfn, SetOpCls::output_set, PHASE_KIND_GRADECAST_CONFIRM, PHASE_KIND_GRADECAST_CONFIRM_GRADE, PHASE_KIND_GRADECAST_ECHO, PHASE_KIND_GRADECAST_ECHO_GRADE, PHASE_KIND_GRADECAST_LEADER, put_task(), RFN_KIND_CONFIRM, RFN_KIND_ECHO, Step::round, Step::session, SET_KIND_CURRENT, SET_KIND_ECHO_RESULT, SET_KIND_LEADER_PROPOSAL, TaskFuncCls::setop, TaskEntry::step, step_depend_on(), task_cancel_reconcile(), task_start_eval_echo(), task_start_grade(), task_start_reconcile(), ConsensusSession::taskmap, and SetOpCls::transceive_contested.
Referenced by construct_task_graph().
|
static |
Definition at line 3087 of file gnunet-service-consensus.c.
References arrange_peers(), TaskEntry::cls, construct_task_graph_gradecast(), create_step(), Step::debug_name, SetOpCls::do_not_remove, TaskFuncCls::finish, GNUNET_asprintf(), GNUNET_NO, GNUNET_strdup, GNUNET_YES, SetOpCls::input_set, FinishCls::input_set, ConsensusSession::local_peer_idx, me, ConsensusSession::num_peers, SetOpCls::output_set, PHASE_KIND_ALL_TO_ALL, PHASE_KIND_ALL_TO_ALL_2, PHASE_KIND_APPLY_REP, PHASE_KIND_FINISH, put_task(), Step::round, Step::session, SET_KIND_CURRENT, SET_KIND_LAST_GRADECAST, TaskFuncCls::setop, TaskEntry::step, step_depend_on(), t, task_cancel_reconcile(), task_start_apply_round(), task_start_finish(), task_start_reconcile(), and ConsensusSession::taskmap.
Referenced by handle_client_join().
|
static |
Check join message.
cls | session of client that sent the message |
m | message sent by the client |
Definition at line 3237 of file gnunet-service-consensus.c.
References GNUNET_break, GNUNET_OK, GNUNET_SYSERR, and m.
|
static |
Called when a client wants to join a consensus session.
cls | session of client that sent the message |
m | message sent by the client |
Definition at line 3259 of file gnunet-service-consensus.c.
References cfg, ConsensusSession::client, compute_global_id(), ConsensusSession::conclude_deadline, ConsensusSession::conclude_start, construct_task_graph(), ConsensusSession::diffmap, get_peer_idx(), ConsensusSession::global_id, GNUNET_assert, GNUNET_CONTAINER_DLL_insert, GNUNET_CONTAINER_multihashmap_create(), GNUNET_CRYPTO_hash_cmp(), GNUNET_ERROR_TYPE_DEBUG, GNUNET_h2s(), GNUNET_log, GNUNET_new, GNUNET_new_array, GNUNET_NO, GNUNET_SERVICE_client_continue(), GNUNET_SET_create(), GNUNET_SET_listen(), GNUNET_SET_OPERATION_UNION, GNUNET_STRINGS_relative_time_to_string(), GNUNET_TIME_absolute_get_difference(), GNUNET_TIME_absolute_ntoh(), GNUNET_YES, SetEntry::h, initialize_session_peer_list(), SetEntry::key, ConsensusSession::local_peer_idx, m, my_peer, ConsensusSession::next, ConsensusSession::num_peers, ConsensusSession::peers_blacklisted, put_set(), ConsensusSession::rfnmap, sessions_head, ConsensusSession::set_handles_head, ConsensusSession::set_handles_tail, SET_KIND_CURRENT, set_listen_cb(), ConsensusSession::set_listener, ConsensusSession::setmap, sh, and ConsensusSession::taskmap.
|
static |
Called when a client performs an insert operation.
cls | client handle |
msg | message sent by the client |
Definition at line 3351 of file gnunet-service-consensus.c.
References GNUNET_OK.
|
static |
Called when a client performs an insert operation.
cls | client handle |
msg | message sent by the client |
Definition at line 3365 of file gnunet-service-consensus.c.
References ConsensusSession::client, ConsensusSession::conclude_started, data, GNUNET_SET_Element::element_type, GNUNET_assert, GNUNET_BLOCK_TYPE_CONSENSUS_ELEMENT, GNUNET_break, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_malloc, GNUNET_memcpy, GNUNET_SERVICE_client_continue(), GNUNET_SERVICE_client_drop(), GNUNET_SET_add_element(), GNUNET_YES, SetEntry::h, key, ConsensusSession::local_peer_idx, lookup_set(), msg, ConsensusSession::num_client_insert_pending, ConsensusElement::payload_type, SET_KIND_CURRENT, and GNUNET_MessageHeader::size.
|
static |
Called when a client performs the conclude operation.
cls | client handle |
message | message sent by the client |
Definition at line 3428 of file gnunet-service-consensus.c.
References ConsensusSession::client, ConsensusSession::conclude_started, GNUNET_break, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_SERVICE_client_continue(), GNUNET_SERVICE_client_drop(), GNUNET_YES, install_step_timeouts(), and run_ready_steps().
|
static |
Called to clean up, after a shutdown has been requested.
cls | closure |
Definition at line 3455 of file gnunet-service-consensus.c.
References GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_NO, GNUNET_STATISTICS_destroy(), and statistics.
Referenced by run().
|
static |
Start processing consensus requests.
cls | closure |
c | configuration to use |
service | the initialized service |
Definition at line 3473 of file gnunet-service-consensus.c.
References cfg, GNUNET_CRYPTO_get_peer_identity(), GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_OK, GNUNET_SCHEDULER_add_shutdown(), GNUNET_SCHEDULER_shutdown(), GNUNET_STATISTICS_create(), my_peer, shutdown_task(), and statistics.
|
static |
Callback called when a client connects to the service.
cls | closure for the service |
c | the new client that connected to the service |
mq | the message queue used to send messages to the client |
Definition at line 3503 of file gnunet-service-consensus.c.
References ConsensusSession::client, ConsensusSession::client_mq, GNUNET_CONTAINER_DLL_insert, GNUNET_new, mq, sessions_head, and sessions_tail.
|
static |
Callback called when a client disconnected from the service.
cls | closure for the service |
c | the client that disconnected |
internal_cls | should be equal to c |
Definition at line 3526 of file gnunet-service-consensus.c.
References GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_SET_destroy(), GNUNET_SET_listen_cancel(), sessions_head, sessions_tail, ConsensusSession::set_handles_head, ConsensusSession::set_listener, and sh.
GNUNET_SERVICE_MAIN | ( | GNUNET_OS_project_data_gnunet() | , |
"consensus" | , | ||
GNUNET_SERVICE_OPTION_NONE | , | ||
& | run, | ||
& | client_connect_cb, | ||
& | client_disconnect_cb, | ||
NULL | , | ||
GNUNET_MQ_hd_fixed_size(client_conclude, GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_CONCLUDE, struct GNUNET_MessageHeader, NULL) | , | ||
GNUNET_MQ_hd_var_size(client_insert, GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_INSERT, struct GNUNET_CONSENSUS_ElementMessage, NULL) | , | ||
GNUNET_MQ_hd_var_size(client_join, GNUNET_MESSAGE_TYPE_CONSENSUS_CLIENT_JOIN, struct GNUNET_CONSENSUS_JoinMessage, NULL) | , | ||
GNUNET_MQ_handler_end() | |||
) |
Define "main" method using service macro.
|
static |
Linked list of sessions this peer participates in.
Definition at line 517 of file gnunet-service-consensus.c.
Referenced by client_connect_cb(), client_disconnect_cb(), and handle_client_join().
|
static |
Linked list of sessions this peer participates in.
Definition at line 522 of file gnunet-service-consensus.c.
Referenced by client_connect_cb(), and client_disconnect_cb().
|
static |
Configuration of the consensus service.
Definition at line 527 of file gnunet-service-consensus.c.
Referenced by commit_set(), handle_client_join(), and run().
|
static |
Peer that runs this service.
Definition at line 532 of file gnunet-service-consensus.c.
Referenced by handle_client_join(), initialize_session_peer_list(), and run().
struct GNUNET_STATISTICS_Handle* statistics |
Statistics handle.
Definition at line 537 of file gnunet-service-consensus.c.
Referenced by commit_set(), run(), and shutdown_task().