CCF
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Enumerations | Functions
raft_types.h File Reference
#include "ccf/crypto/ecdsa.h"
#include "ccf/entity_id.h"
#include "consensus/consensus_types.h"
#include "ds/ring_buffer_types.h"
#include "enclave/rpc_handler.h"
#include "kv/kv_types.h"
#include <array>
#include <chrono>
#include <cstdint>
#include <limits>

Go to the source code of this file.

Classes

class  aft::Store
 
class  aft::Adaptor< T >
 
struct  aft::RaftHeader< M >
 
struct  aft::AppendEntries
 
struct  aft::AppendEntriesResponse
 
struct  aft::RequestVote
 
struct  aft::RequestPreVote
 
struct  aft::RequestVoteResponse
 
struct  aft::RequestPreVoteResponse
 
struct  aft::ProposeRequestVote
 
struct  formatter< aft::RaftMsgType >
 

Namespaces

namespace  aft
 

Typedefs

using aft::Index = uint64_t
 
using aft::Term = uint64_t
 
using aft::Node2NodeMsg = uint64_t
 

Enumerations

enum  aft::RaftMsgType : Node2NodeMsg {
  aft::raft_append_entries = 0 , aft::raft_append_entries_response , aft::raft_append_entries_signed_response , aft::raft_request_vote ,
  aft::raft_request_vote_response , aft::raft_propose_request_vote , aft::raft_request_pre_vote , aft::raft_request_pre_vote_response
}
 
enum class  aft::AppendEntriesResponseType : uint8_t { aft::OK = 0 , aft::FAIL = 1 }
 
enum  aft::ElectionType : std::uint8_t { aft::PreVote = 0 , aft::RegularVote = 1 }
 

Functions

 aft::DECLARE_JSON_ENUM (RaftMsgType, { {RaftMsgType::raft_append_entries, "raft_append_entries"}, {RaftMsgType::raft_append_entries_response, "raft_append_entries_response"}, {RaftMsgType::raft_append_entries_signed_response, "raft_append_entries_signed_response"}, {RaftMsgType::raft_request_vote, "raft_request_vote"}, {RaftMsgType::raft_request_vote_response, "raft_request_vote_response"}, {RaftMsgType::raft_propose_request_vote, "raft_propose_request_vote"}, {RaftMsgType::raft_request_pre_vote, "raft_request_pre_vote"}, {RaftMsgType::raft_request_pre_vote_response, "raft_request_pre_vote_response"}, })
 
 aft::DECLARE_JSON_TYPE_WITH_2BASES (AppendEntries, RaftHeader< raft_append_entries >, ::consensus::AppendEntriesIndex)
 
 aft::DECLARE_JSON_REQUIRED_FIELDS (AppendEntries, term, prev_term, leader_commit_idx, term_of_idx, contains_new_view)
 
 aft::DECLARE_JSON_ENUM (AppendEntriesResponseType, {{AppendEntriesResponseType::OK, "OK"}, {AppendEntriesResponseType::FAIL, "FAIL"}})
 
 aft::DECLARE_JSON_TYPE_WITH_BASE (AppendEntriesResponse, RaftHeader< raft_append_entries_response >)
 
 aft::DECLARE_JSON_REQUIRED_FIELDS (AppendEntriesResponse, term, last_log_idx, success)
 
 aft::DECLARE_JSON_ENUM (ElectionType, {{ElectionType::PreVote, "PreVote"}, {ElectionType::RegularVote, "RegularVote"}})
 
 aft::DECLARE_JSON_TYPE_WITH_BASE (RequestVote, RaftHeader< raft_request_vote >)
 
 aft::DECLARE_JSON_REQUIRED_FIELDS (RequestVote, term, last_committable_idx, term_of_last_committable_idx)
 
 aft::DECLARE_JSON_TYPE (RaftHeader< raft_request_pre_vote >)
 
 aft::DECLARE_JSON_REQUIRED_FIELDS (RaftHeader< raft_request_pre_vote >, msg)
 
 aft::DECLARE_JSON_TYPE_WITH_BASE (RequestPreVote, RaftHeader< raft_request_pre_vote >)
 
 aft::DECLARE_JSON_REQUIRED_FIELDS (RequestPreVote, term, last_committable_idx, term_of_last_committable_idx)
 
 aft::DECLARE_JSON_TYPE_WITH_BASE (RequestVoteResponse, RaftHeader< raft_request_vote_response >)
 
 aft::DECLARE_JSON_REQUIRED_FIELDS (RequestVoteResponse, term, vote_granted)
 
 aft::DECLARE_JSON_TYPE_WITH_BASE (RequestPreVoteResponse, RaftHeader< raft_request_pre_vote_response >)
 
 aft::DECLARE_JSON_REQUIRED_FIELDS (RequestPreVoteResponse, term, vote_granted)
 
 aft::DECLARE_JSON_TYPE_WITH_BASE (ProposeRequestVote, RaftHeader< raft_propose_request_vote >)
 
 aft::DECLARE_JSON_REQUIRED_FIELDS (ProposeRequestVote, term)