Kagome
Polkadot Runtime Engine in C++17
kagome::parachain::BitfieldSigner Class Reference

Signs, stores and broadcasts bitfield for every new head. More...

#include <signer.hpp>

Inheritance diagram for kagome::parachain::BitfieldSigner:
Collaboration diagram for kagome::parachain::BitfieldSigner:

Public Member Functions

 BitfieldSigner (std::shared_ptr< crypto::Hasher > hasher, std::shared_ptr< ValidatorSignerFactory > signer_factory, std::shared_ptr< libp2p::basic::Scheduler > scheduler, std::shared_ptr< runtime::ParachainHost > parachain_api, std::shared_ptr< AvailabilityStore > store, std::shared_ptr< BitfieldStore > bitfield_store)
 
void start (std::shared_ptr< primitives::events::ChainSubscriptionEngine > chain_sub_engine)
 Subscribes to new heads. More...
 
outcome::result< void > sign (const ValidatorSigner &signer)
 Sign bitfield for given block. More...
 

Private Types

using BlockHash = primitives::BlockHash
 

Private Member Functions

outcome::result< void > onBlock (const BlockHash &relay_parent)
 

Private Attributes

std::shared_ptr< crypto::Hasherhasher_
 
std::shared_ptr< ValidatorSignerFactorysigner_factory_
 
std::shared_ptr< libp2p::basic::Scheduler > scheduler_
 
std::shared_ptr< runtime::ParachainHostparachain_api_
 
std::shared_ptr< AvailabilityStorestore_
 
std::shared_ptr< BitfieldStorebitfield_store_
 
std::shared_ptr< primitives::events::ChainEventSubscriberchain_sub_
 

Detailed Description

Signs, stores and broadcasts bitfield for every new head.

Definition at line 20 of file signer.hpp.

Member Typedef Documentation

Constructor & Destructor Documentation

kagome::parachain::BitfieldSigner::BitfieldSigner ( std::shared_ptr< crypto::Hasher hasher,
std::shared_ptr< ValidatorSignerFactory signer_factory,
std::shared_ptr< libp2p::basic::Scheduler >  scheduler,
std::shared_ptr< runtime::ParachainHost parachain_api,
std::shared_ptr< AvailabilityStore store,
std::shared_ptr< BitfieldStore bitfield_store 
)

Definition at line 20 of file signer.cpp.

Member Function Documentation

outcome::result< void > kagome::parachain::BitfieldSigner::onBlock ( const BlockHash relay_parent)
private

Definition at line 77 of file signer.cpp.

outcome::result< void > kagome::parachain::BitfieldSigner::sign ( const ValidatorSigner signer)

Sign bitfield for given block.

Definition at line 59 of file signer.cpp.

void kagome::parachain::BitfieldSigner::start ( std::shared_ptr< primitives::events::ChainSubscriptionEngine chain_sub_engine)

Subscribes to new heads.

Definition at line 34 of file signer.cpp.

Member Data Documentation

std::shared_ptr<BitfieldStore> kagome::parachain::BitfieldSigner::bitfield_store_
private

Definition at line 46 of file signer.hpp.

std::shared_ptr<primitives::events::ChainEventSubscriber> kagome::parachain::BitfieldSigner::chain_sub_
private

Definition at line 47 of file signer.hpp.

std::shared_ptr<crypto::Hasher> kagome::parachain::BitfieldSigner::hasher_
private

Definition at line 41 of file signer.hpp.

std::shared_ptr<runtime::ParachainHost> kagome::parachain::BitfieldSigner::parachain_api_
private

Definition at line 44 of file signer.hpp.

std::shared_ptr<libp2p::basic::Scheduler> kagome::parachain::BitfieldSigner::scheduler_
private

Definition at line 43 of file signer.hpp.

std::shared_ptr<ValidatorSignerFactory> kagome::parachain::BitfieldSigner::signer_factory_
private

Definition at line 42 of file signer.hpp.

std::shared_ptr<AvailabilityStore> kagome::parachain::BitfieldSigner::store_
private

Definition at line 45 of file signer.hpp.


The documentation for this class was generated from the following files: