Kagome
Polkadot Runtime Engine in C++17
kagome::network Namespace Reference

Namespaces

 detail
 
 reputation
 

Classes

struct  BlockAnnounce
 
struct  BlockAnnounceObserver
 
class  BlockAnnounceProtocol
 
class  BlockAnnounceTransmitter
 
class  BlockAnnounceTransmitterImpl
 
class  BlockAttributes
 
struct  BlocksRequest
 
struct  BlocksResponse
 
struct  BootstrapNodes
 
struct  CandidateCommitments
 
struct  CandidateDescriptor
 
struct  CandidateReceipt
 
struct  CatchUpRequest
 
struct  CatchUpResponse
 
struct  CollationFetchingRequest
 
struct  CollationFetchingResponse
 
struct  CollationObserver
 
class  CollationProtocol
 
struct  CollationResponse
 
struct  CollatorAdvertisement
 
struct  CollatorDeclaration
 
struct  CollatorState
 
struct  CommittedCandidateReceipt
 
struct  ErasureChunk
 A chunk of erasure-encoded block data. More...
 
class  ExtrinsicObserver
 
class  ExtrinsicObserverImpl
 
struct  FullCommitMessage
 
struct  GrandpaNeighborMessage
 
class  GrandpaProtocol
 
class  GrandpaTransmitter
 
class  GrandpaTransmitterImpl
 
struct  GrandpaVote
 
class  IReqCollationProtocol
 
struct  KeyValueStateEntry
 A key value state. More...
 
struct  Message
 
struct  MessageReadWriter
 
struct  MessageReadWriter< Adapter, NoSink >
 
struct  MessagesSequence
 
struct  NoData
 
struct  NoSink
 
struct  OutboundHorizontal
 
struct  OwnPeerInfo
 
struct  ParachainBlock
 
struct  ParachainState
 
struct  PeerDescriptor
 
struct  PeeringConfig
 
class  PeerManager
 
class  PeerManagerImpl
 
struct  PeerState
 
struct  PendingCollation
 
struct  PropagatedExtrinsics
 
class  PropagateTransactionsProtocol
 
struct  ProtobufMessageAdapter
 
struct  ProtobufMessageAdapter< BlocksRequest >
 
struct  ProtobufMessageAdapter< BlocksResponse >
 
struct  ProtobufMessageAdapter< StateRequest >
 
struct  ProtobufMessageAdapter< StateResponse >
 
class  ProtobufMessageReadWriter
 
class  ProtocolBase
 
class  ProtocolBaseImpl
 
class  ProtocolFactory
 
struct  ReputationChange
 
class  ReputationRepository
 
class  ReputationRepositoryImpl
 
struct  ReqCollationObserver
 
class  ReqCollationProtocol
 
struct  ReqCollationProtocolImpl
 
struct  RequestResponseProtocol
 
union  Roles
 
struct  Roles.flags
 
class  Router
 
class  RouterLibp2p
 
struct  RPC
 
class  ScaleMessageReadWriter
 
struct  Seconded
 
struct  Signed
 Payload signed by validator. More...
 
struct  StateEntry
 A key-value pair. More...
 
struct  Statement
 
class  StateProtocol
 Class for communication via /{chainType}/state/2 according to state protocol specification https://spec.polkadot.network/#sect-msg-state-request. More...
 
class  StateProtocolImpl
 
class  StateProtocolObserver
 
class  StateProtocolObserverImpl
 
struct  StateRequest
 
struct  StateResponse
 
struct  Status
 
struct  StreamEngine
 
class  Synchronizer
 
class  SynchronizerImpl
 
class  SyncProtocol
 Class for communication via /{chainType}/sync/2 according to sync protocol specification https://spec.polkadot.network/#sect-msg-block-request. More...
 
class  SyncProtocolImpl
 
class  SyncProtocolObserver
 
class  SyncProtocolObserverImpl
 
class  TransactionsTransmitter
 
class  TransactionsTransmitterImpl
 
struct  UVarMessageAdapter
 

Typedefs

using Stream = libp2p::connection::Stream
 
using Protocol = libp2p::peer::Protocol
 
using Protocols = libp2p::StreamProtocols
 
using PeerId = libp2p::peer::PeerId
 
using PeerInfo = libp2p::peer::PeerInfo
 
using Host = libp2p::Host
 
using ProtocolName = std::string
 
using Reputation = std::int32_t
 
using Signature = crypto::Sr25519Signature
 
using ParachainId = uint32_t
 
using CollatorPublicKey = crypto::Sr25519PublicKey
 
using ValidatorIndex = uint32_t
 
using UpwardMessage = common::Buffer
 
using ParachainRuntime = common::Buffer
 
using HeadData = common::Buffer
 
using CandidateHash = primitives::BlockHash
 
using ChunkProof = std::vector< common::Buffer >
 
using Dummy = std::tuple<>
 NU element. More...
 
using ViewUpdate = Dummy
 ViewUpdate message. Maybe will be implemented later. More...
 
using ReqCollationResponseData = boost::variant< CollationResponse >
 
using CandidateState = boost::variant< Dummy, CommittedCandidateReceipt, primitives::BlockHash >
 
using SignedBitfield = Signed< scale::BitVec >
 Signed availability bitfield. More...
 
using CollationMessage = boost::variant< CollatorDeclaration, CollatorAdvertisement, Dummy, Dummy, Seconded >
 
using ProtocolMessage = boost::variant< CollationMessage >
 
using WireMessage = boost::variant< Dummy, ProtocolMessage, ViewUpdate >
 
using GrandpaMessage = boost::variant< GrandpaVote, FullCommitMessage, GrandpaNeighborMessage, CatchUpRequest, CatchUpResponse >
 

Enumerations

enum  AdaptersError : int {
  AdaptersError::EMPTY_DATA = 1, AdaptersError::DATA_SIZE_CORRUPTED, AdaptersError::PARSE_FAILED, AdaptersError::UNEXPECTED_VARIANT,
  AdaptersError::CAST_FAILED
}
 interface adapters errors More...
 
enum  PeerType { PeerType::PEER_TYPE_IN = 0, PeerType::PEER_TYPE_OUT }
 
enum  ProtocolError {
  ProtocolError::GONE = 1, ProtocolError::PROTOCOL_NOT_IMPLEMENTED, ProtocolError::CAN_NOT_CREATE_STATUS, ProtocolError::NODE_NOT_SYNCHRONIZED_YET,
  ProtocolError::GENESIS_NO_MATCH, ProtocolError::HANDSHAKE_ERROR
}
 
enum  BlockAttribute : uint8_t {
  BlockAttribute::HEADER = 1u, BlockAttribute::BODY = 1u << 1u, BlockAttribute::RECEIPT = 1u << 2u, BlockAttribute::MESSAGE_QUEUE = 1u << 3u,
  BlockAttribute::JUSTIFICATION = 1u << 4u
}
 
enum  Direction : uint8_t { Direction::ASCENDING = 0, Direction::DESCENDING = 1 }
 

Functions

template<typename T >
std::vector< uint8_t >::iterator appendToVec (const T &msg, std::vector< uint8_t > &out, std::vector< uint8_t >::iterator loaded)
 
void streamReadBuffer (libp2p::StreamAndProtocol &result)
 
void streamReadBuffer (libp2p::StreamAndProtocolOrError &result)
 
 KAGOME_DEFINE_CACHE (BlockAnnounceProtocol)
 
 KAGOME_DECLARE_CACHE (BlockAnnounceProtocol, KAGOME_CACHE_UNIT(BlockAnnounce))
 
 KAGOME_DEFINE_CACHE (GrandpaProtocol)
 
 KAGOME_DECLARE_CACHE (GrandpaProtocol, KAGOME_CACHE_UNIT(GrandpaMessage))
 
 KAGOME_DEFINE_CACHE (PropagateTransactionsProtocol)
 
 KAGOME_DECLARE_CACHE (PropagateTransactionsProtocol, KAGOME_CACHE_UNIT(PropagatedExtrinsics))
 
constexpr BlockAttributes operator| (const BlockAttribute &lhs, const BlockAttribute &rhs)
 
constexpr BlockAttributes operator~ (const BlockAttribute &attribute)
 
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Streamoperator<< (Stream &s, const BlockAttributes &v)
 outputs object of type BlockAttributes to stream More...
 
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Streamoperator>> (Stream &s, BlockAttributes &attributes)
 
CandidateHash candidateHash (const crypto::Hasher &hasher, const CandidateReceipt &receipt)
 
CandidateHash candidateHash (const crypto::Hasher &hasher, const CommittedCandidateReceipt &receipt)
 
CandidateHash candidateHash (const crypto::Hasher &hasher, const CandidateState &statement)
 
 SCALE_EMPTY_CODER (NoData)
 
bool operator== (const NoData &lhs, const NoData &rhs)
 compares two Status instances More...
 
bool operator== (const Roles &lhs, const Roles &rhs)
 compares two Roles instances More...
 
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Streamoperator<< (Stream &s, const Roles &v)
 outputs object of type Roles to stream More...
 
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Streamoperator>> (Stream &s, Roles &v)
 decodes object of type Roles from stream More...
 
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Streamoperator<< (Stream &s, const Status &v)
 outputs object of type Status to stream More...
 
template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Streamoperator>> (Stream &s, Status &v)
 decodes object of type Status from stream More...
 

Variables

static constexpr uint32_t CURRENT_VERSION = 6
 Current protocol version. More...
 
static constexpr uint32_t MIN_VERSION = 3
 Lowest version we support. More...
 
const libp2p::peer::Protocol kStateProtocol = "/{}/state/2"
 
const libp2p::peer::Protocol kSyncProtocol = "/{}/sync/2"
 
const libp2p::peer::Protocol kPropagateTransactionsProtocol
 
const libp2p::peer::Protocol kBlockAnnouncesProtocol
 
const libp2p::peer::Protocol kGrandpaProtocolLegacy = "/paritytech/grandpa/1"
 
const libp2p::peer::Protocol kGrandpaProtocol = "/{}/grandpa/1"
 
const libp2p::peer::Protocol kCollationProtocol {"/polkadot/collation/1"}
 
const libp2p::peer::Protocol kValidationProtocol {"/polkadot/validation/1"}
 
const libp2p::peer::Protocol kReqCollationProtocol
 
static constexpr auto kResponsesCacheCapacity = 500
 
static constexpr auto kResponsesCacheExpirationTimeout
 
static constexpr auto kMaxCacheEntriesPerPeer = 5
 
constexpr size_t kMaxBlocksInResponse = 256
 

Detailed Description

Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

round_number_, Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0


Class Documentation

struct kagome::network::BlocksResponse

Response to the BlockRequest

Definition at line 19 of file blocks_response.hpp.

Collaboration diagram for kagome::network::BlocksResponse:
Class Members
SLVector< BlockData,
kMaxBlocksInResponse >
blocks
struct kagome::network::CollatorState

Definition at line 25 of file peer_manager.hpp.

Collaboration diagram for kagome::network::CollatorState:
Class Members
unordered_set< BlockHash > advertisements
CollatorPublicKey collator_id
ParachainId parachain_id
struct kagome::network::KeyValueStateEntry

A key value state.

Definition at line 21 of file state_response.hpp.

Collaboration diagram for kagome::network::KeyValueStateEntry:
Class Members
bool complete Set to true when there are no more keys to return.
vector< StateEntry > entries A collection of keys-values.
RootHash state_root

Root of for this level, empty length bytes if top level.

struct kagome::network::Message

template<typename T, typename RW>
struct kagome::network::Message< T, RW >

Definition at line 21 of file messages.hpp.

Collaboration diagram for kagome::network::Message< T, RW >:
Class Members
typedef RW ReadWriter
Class Members
T data
struct kagome::network::NoData

Is the structure without any data.

Definition at line 16 of file no_data_message.hpp.

Collaboration diagram for kagome::network::NoData:
struct kagome::network::NoSink

NoSink is used to break the MessageReadWriter ancestor execute sequence.

Definition at line 22 of file message_read_writer.hpp.

Collaboration diagram for kagome::network::NoSink:
struct kagome::network::ParachainState

Definition at line 40 of file peer_manager.hpp.

Collaboration diagram for kagome::network::ParachainState:
Class Members
unordered_map< BlockHash, bool > our_view
struct kagome::network::PeerDescriptor

Definition at line 47 of file peer_manager_impl.hpp.

Collaboration diagram for kagome::network::PeerDescriptor:
Class Members
PeerType peer_type
TimePoint time_point
struct kagome::network::PeeringConfig

Definition at line 13 of file peering_config.hpp.

Collaboration diagram for kagome::network::PeeringConfig:
Class Members
seconds aligningPeriod Period of active peers amount aligning.
size_t hardLimit Max peers before start forced disconnection.
seconds peerTtl Time of peer inactivity to disconnect.
size_t softLimit Max peers count before start to disconnect of inactive ones.
size_t targetPeerAmount Target amount of active peers.
struct kagome::network::PeerState

Definition at line 44 of file peer_manager.hpp.

Collaboration diagram for kagome::network::PeerState:
Class Members
BlockInfo best_block
optional< CollatorState > collator_state
BlockNumber last_finalized
Roles roles
optional< RoundNumber > round_number
optional< VoterSetId > set_id
TimePoint time
struct kagome::network::PendingCollation

Definition at line 31 of file peer_manager.hpp.

Collaboration diagram for kagome::network::PendingCollation:
Class Members
ParachainId para_id
PeerId const & peer_id
BlockHash const & relay_parent
struct kagome::network::ProtobufMessageAdapter

template<typename T>
struct kagome::network::ProtobufMessageAdapter< T >

Definition at line 21 of file protobuf.hpp.

Collaboration diagram for kagome::network::ProtobufMessageAdapter< T >:
struct kagome::network::Roles.flags

Definition at line 12 of file roles.hpp.

Collaboration diagram for kagome::network::Roles.flags:
Class Members
uint8_t authority: 1

Act as an authority

uint8_t full: 1

Full node, does not participate in consensus.

uint8_t light: 1

Light client node.

struct kagome::network::StateEntry

A key-value pair.

Definition at line 15 of file state_response.hpp.

Collaboration diagram for kagome::network::StateEntry:
Class Members
Buffer key
Buffer value
struct kagome::network::StateResponse

Response to the StateRequest

Definition at line 34 of file state_response.hpp.

Collaboration diagram for kagome::network::StateResponse:
Class Members
vector< KeyValueStateEntry > entries

A collection of keys-values states. Only populated if no_proof is true

Buffer proof If no_proof is false in request, this contains proof nodes.
struct kagome::network::Status

Is the structure to send to a new connected peer. It contains common information about current peer and used by the remote peer to detect the posibility of the correct communication with it.

Definition at line 26 of file status.hpp.

Collaboration diagram for kagome::network::Status:
Class Members
BlockInfo best_block

Best block

BlockHash genesis_hash

Genesis block hash.

Roles roles

Supported roles.

Typedef Documentation

Definition at line 202 of file collator_messages.hpp.

using kagome::network::ChunkProof = typedef std::vector<common::Buffer>

Definition at line 33 of file collator_messages.hpp.

Collator -> Validator and Validator -> Collator if statement message. Type of the appropriate message.

Definition at line 233 of file collator_messages.hpp.

using kagome::network::CollatorPublicKey = typedef crypto::Sr25519PublicKey

Definition at line 27 of file collator_messages.hpp.

using kagome::network::Dummy = typedef std::tuple<>

NU element.

Definition at line 51 of file collator_messages.hpp.

Definition at line 31 of file collator_messages.hpp.

using kagome::network::Host = typedef libp2p::Host

Definition at line 28 of file protocol_base_impl.hpp.

using kagome::network::ParachainId = typedef uint32_t

Definition at line 26 of file collator_messages.hpp.

Definition at line 30 of file collator_messages.hpp.

typedef libp2p::peer::PeerId kagome::network::PeerId

Definition at line 26 of file protocol_base_impl.hpp.

typedef libp2p::peer::PeerInfo kagome::network::PeerInfo

Definition at line 27 of file protocol_base_impl.hpp.

typedef libp2p::peer::Protocol kagome::network::Protocol

Definition at line 24 of file protocol_base_impl.hpp.

using kagome::network::ProtocolMessage = typedef boost::variant<CollationMessage >

Collation protocol message.

Definition at line 240 of file collator_messages.hpp.

using kagome::network::ProtocolName = typedef std::string

Definition at line 29 of file protocol_base_impl.hpp.

typedef libp2p::StreamProtocols kagome::network::Protocols

Definition at line 25 of file protocol_base_impl.hpp.

typedef std::int32_t kagome::network::Reputation

Definition at line 15 of file reputation_change.hpp.

Definition at line 142 of file collator_messages.hpp.

using kagome::network::Signature = typedef crypto::Sr25519Signature

Definition at line 25 of file collator_messages.hpp.

using kagome::network::SignedBitfield = typedef Signed<scale::BitVec>

Signed availability bitfield.

Definition at line 220 of file collator_messages.hpp.

typedef libp2p::connection::Stream kagome::network::Stream

Definition at line 23 of file protocol_base_impl.hpp.

Definition at line 29 of file collator_messages.hpp.

using kagome::network::ValidatorIndex = typedef uint32_t

Definition at line 28 of file collator_messages.hpp.

ViewUpdate message. Maybe will be implemented later.

Definition at line 54 of file collator_messages.hpp.

using kagome::network::WireMessage = typedef boost::variant<Dummy, ProtocolMessage, ViewUpdate >

Common WireMessage that represents messages in NetworkBridge.

Definition at line 248 of file collator_messages.hpp.

Enumeration Type Documentation

enum kagome::network::AdaptersError : int
strong

interface adapters errors

Enumerator
EMPTY_DATA 
DATA_SIZE_CORRUPTED 
PARSE_FAILED 
UNEXPECTED_VARIANT 
CAST_FAILED 

Definition at line 15 of file adapter_errors.hpp.

enum kagome::network::BlockAttribute : uint8_t
strong

Masks of bits, combination of which shows, which fields are to be presented in the BlockResponse

Enumerator
HEADER 

Include block header.

BODY 

Include block body.

RECEIPT 

Include block receipt.

MESSAGE_QUEUE 

Include block message queue.

JUSTIFICATION 

Include a justification for the block.

Definition at line 21 of file block_attributes.hpp.

enum kagome::network::Direction : uint8_t
strong

Direction, in which to retrieve the blocks

Enumerator
ASCENDING 

from child to parent

DESCENDING 

from parent to canonical child

Definition at line 20 of file block_direction.hpp.

Enumerator
PEER_TYPE_IN 
PEER_TYPE_OUT 

Definition at line 45 of file peer_manager_impl.hpp.

Enumerator
GONE 
PROTOCOL_NOT_IMPLEMENTED 
CAN_NOT_CREATE_STATUS 
NODE_NOT_SYNCHRONIZED_YET 
GENESIS_NO_MATCH 
HANDSHAKE_ERROR 

Definition at line 13 of file protocol_error.hpp.

Function Documentation

template<typename T >
std::vector<uint8_t>::iterator kagome::network::appendToVec ( const T &  msg,
std::vector< uint8_t > &  out,
std::vector< uint8_t >::iterator  loaded 
)
inline

Definition at line 24 of file protobuf.hpp.

CandidateHash kagome::network::candidateHash ( const crypto::Hasher hasher,
const CandidateReceipt receipt 
)
inline

Definition at line 250 of file collator_messages.hpp.

CandidateHash kagome::network::candidateHash ( const crypto::Hasher hasher,
const CommittedCandidateReceipt receipt 
)
inline

Definition at line 255 of file collator_messages.hpp.

CandidateHash kagome::network::candidateHash ( const crypto::Hasher hasher,
const CandidateState statement 
)
inline

Definition at line 265 of file collator_messages.hpp.

kagome::network::KAGOME_DECLARE_CACHE ( BlockAnnounceProtocol  ,
KAGOME_CACHE_UNIT(BlockAnnounce  
)
kagome::network::KAGOME_DECLARE_CACHE ( GrandpaProtocol  ,
KAGOME_CACHE_UNIT(GrandpaMessage  
)
kagome::network::KAGOME_DECLARE_CACHE ( PropagateTransactionsProtocol  ,
KAGOME_CACHE_UNIT(PropagatedExtrinsics  
)
kagome::network::KAGOME_DEFINE_CACHE ( BlockAnnounceProtocol  )
kagome::network::KAGOME_DEFINE_CACHE ( PropagateTransactionsProtocol  )
kagome::network::KAGOME_DEFINE_CACHE ( GrandpaProtocol  )
template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream& kagome::network::operator<< ( Stream s,
const Status v 
)

outputs object of type Status to stream

Template Parameters
Streamoutput stream type
Parameters
sstream reference
vvalue to output
Returns
reference to stream

Definition at line 52 of file status.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream& kagome::network::operator<< ( Stream s,
const Roles v 
)

outputs object of type Roles to stream

Template Parameters
Streamoutput stream type
Parameters
sstream reference
vvalue to output
Returns
reference to stream

Definition at line 54 of file roles.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_encoder_stream>>
Stream& kagome::network::operator<< ( Stream s,
const BlockAttributes v 
)

outputs object of type BlockAttributes to stream

Template Parameters
Streamoutput stream type
Parameters
sstream reference
vvalue to output
Returns
reference to stream

Definition at line 163 of file block_attributes.hpp.

bool kagome::network::operator== ( const NoData lhs,
const NoData rhs 
)
inline

compares two Status instances

Parameters
lhsfirst instance
rhssecond instance
Returns
true if equal false otherwise

Definition at line 25 of file no_data_message.hpp.

bool kagome::network::operator== ( const Roles lhs,
const Roles rhs 
)
inline

compares two Roles instances

Parameters
lhsfirst instance
rhssecond instance
Returns
true if equal false otherwise

Definition at line 41 of file roles.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream& kagome::network::operator>> ( Stream s,
Status v 
)

decodes object of type Status from stream

Template Parameters
Streaminput stream type
Parameters
sstream reference
vvalue to decode
Returns
reference to stream

Definition at line 66 of file status.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream& kagome::network::operator>> ( Stream s,
Roles v 
)

decodes object of type Roles from stream

Template Parameters
Streaminput stream type
Parameters
sstream reference
vvalue to decode
Returns
reference to stream

Definition at line 67 of file roles.hpp.

template<class Stream , typename = std::enable_if_t<Stream::is_decoder_stream>>
Stream& kagome::network::operator>> ( Stream s,
BlockAttributes attributes 
)

decodes object of type BlockAttributes from stream

Template Parameters
Streaminput stream type
Parameters
sstream reference
vvalue to decode
Returns
reference to stream

Definition at line 176 of file block_attributes.hpp.

constexpr BlockAttributes kagome::network::operator| ( const BlockAttribute lhs,
const BlockAttribute rhs 
)
inline

Definition at line 141 of file block_attributes.hpp.

constexpr BlockAttributes kagome::network::operator~ ( const BlockAttribute attribute)
inline

Definition at line 148 of file block_attributes.hpp.

kagome::network::SCALE_EMPTY_CODER ( NoData  )
void kagome::network::streamReadBuffer ( libp2p::StreamAndProtocol &  result)
inline

Wrap stream from setProtocolHandler. Makes reading from stream buffered.

Definition at line 122 of file stream_read_buffer.hpp.

void kagome::network::streamReadBuffer ( libp2p::StreamAndProtocolOrError &  result)
inline

Wrap stream from newStream. Makes reading from stream buffered.

Definition at line 132 of file stream_read_buffer.hpp.

Variable Documentation

constexpr uint32_t kagome::network::CURRENT_VERSION = 6
static

Current protocol version.

Definition at line 13 of file common.hpp.

const libp2p::peer::Protocol kagome::network::kBlockAnnouncesProtocol
Initial value:
=
"/{}/block-announces/1"

Definition at line 21 of file common.hpp.

const libp2p::peer::Protocol kagome::network::kCollationProtocol {"/polkadot/collation/1"}

Definition at line 26 of file common.hpp.

const libp2p::peer::Protocol kagome::network::kGrandpaProtocol = "/{}/grandpa/1"

Definition at line 24 of file common.hpp.

const libp2p::peer::Protocol kagome::network::kGrandpaProtocolLegacy = "/paritytech/grandpa/1"

Definition at line 23 of file common.hpp.

constexpr size_t kagome::network::kMaxBlocksInResponse = 256

Definition at line 14 of file blocks_response.hpp.

constexpr auto kagome::network::kMaxCacheEntriesPerPeer = 5
static

Definition at line 32 of file sync_protocol_impl.hpp.

const libp2p::peer::Protocol kagome::network::kPropagateTransactionsProtocol
Initial value:
=
"/{}/transactions/1"

Definition at line 19 of file common.hpp.

const libp2p::peer::Protocol kagome::network::kReqCollationProtocol
Initial value:
{
"/polkadot/req_collation/1"}

Definition at line 28 of file common.hpp.

constexpr auto kagome::network::kResponsesCacheCapacity = 500
static

Definition at line 29 of file sync_protocol_impl.hpp.

constexpr auto kagome::network::kResponsesCacheExpirationTimeout
static
Initial value:
=
std::chrono::seconds(30)

Definition at line 30 of file sync_protocol_impl.hpp.

const libp2p::peer::Protocol kagome::network::kStateProtocol = "/{}/state/2"

Definition at line 17 of file common.hpp.

const libp2p::peer::Protocol kagome::network::kSyncProtocol = "/{}/sync/2"

Definition at line 18 of file common.hpp.

const libp2p::peer::Protocol kagome::network::kValidationProtocol {"/polkadot/validation/1"}

Definition at line 27 of file common.hpp.

constexpr uint32_t kagome::network::MIN_VERSION = 3
static

Lowest version we support.

Definition at line 15 of file common.hpp.