Kagome
Polkadot Runtime Engine in C++17
|
#include <authority_manager.hpp>
Public Member Functions | |
virtual | ~AuthorityManager ()=default |
virtual outcome::result< void > | recalculateStoredState (primitives::BlockNumber last_finalized_number)=0 |
virtual primitives::BlockInfo | base () const =0 |
virtual std::optional< std::shared_ptr< const primitives::AuthoritySet > > | authorities (const primitives::BlockInfo &block, IsBlockFinalized finalized) const =0 |
Returns authorities according specified block. More... | |
virtual outcome::result< void > | applyScheduledChange (const primitives::BlockInfo &block, const primitives::AuthorityList &authorities, primitives::BlockNumber activate_at)=0 |
Schedule an authority set change after the given delay of N blocks, after next one would be finalized by the finality consensus engine. More... | |
virtual outcome::result< void > | applyForcedChange (const primitives::BlockInfo &block, const primitives::AuthorityList &authorities, primitives::BlockNumber delay_start, size_t delay)=0 |
Force an authority set change after the given delay of N blocks, after next one would be imported block which has been validated by the block production consensus engine. More... | |
virtual outcome::result< void > | applyOnDisabled (const primitives::BlockInfo &block, uint64_t authority_index)=0 |
An index of the individual authority in the current authority list that should be immediately disabled until the next authority set change. When an authority gets disabled, the node should stop performing any authority functionality from that authority, including authoring blocks and casting GRANDPA votes for finalization. Similarly, other nodes should ignore all messages from the indicated authority which pertain to their authority role. Once an authority set change after the given delay of N blocks, is an imported block which has been validated by the block production consensus engine. More... | |
virtual outcome::result< void > | applyPause (const primitives::BlockInfo &block, primitives::BlockNumber activate_at)=0 |
A signal to pause the current authority set after the given delay, is a block finalized by the finality consensus engine. After finalizing block, the authorities should stop voting. More... | |
virtual outcome::result< void > | applyResume (const primitives::BlockInfo &block, primitives::BlockNumber activate_at)=0 |
A signal to resume the current authority set after the given delay, is an imported block and validated by the block production consensus engine. After authoring the block B 0 , the authorities should resume voting. More... | |
virtual void | prune (const primitives::BlockInfo &block)=0 |
Prunes data which was needed only till {. More... | |
Definition at line 28 of file authority_manager.hpp.
|
virtualdefault |
|
pure virtual |
Force an authority set change after the given delay of N blocks, after next one would be imported block which has been validated by the block production consensus engine.
block | the block where a digest with this change was discovered |
authorities | new authority set |
delay_start | block at which the delay before this change is applied starts |
delay | the chain length until the delay is over |
Implemented in kagome::authority::AuthorityManagerImpl.
|
pure virtual |
An index of the individual authority in the current authority list that should be immediately disabled until the next authority set change. When an authority gets disabled, the node should stop performing any authority functionality from that authority, including authoring blocks and casting GRANDPA votes for finalization. Similarly, other nodes should ignore all messages from the indicated authority which pertain to their authority role. Once an authority set change after the given delay of N blocks, is an imported block which has been validated by the block production consensus engine.
block | the block where a digest with this change was discovered |
authority_index | is index of one authority in current authority set |
Implemented in kagome::authority::AuthorityManagerImpl.
|
pure virtual |
A signal to pause the current authority set after the given delay, is a block finalized by the finality consensus engine. After finalizing block, the authorities should stop voting.
block | the block where a digest with this change was discovered |
activateAt | is number of block when changes will applied |
Implemented in kagome::authority::AuthorityManagerImpl.
|
pure virtual |
A signal to resume the current authority set after the given delay, is an imported block and validated by the block production consensus engine. After authoring the block B 0 , the authorities should resume voting.
block | the block where a digest with this change was discovered |
activateAt | is number of block when changes will applied |
Implemented in kagome::authority::AuthorityManagerImpl.
|
pure virtual |
Schedule an authority set change after the given delay of N blocks, after next one would be finalized by the finality consensus engine.
block | the block where a digest with this change was discovered |
authorities | is authority set for renewal |
activateAt | is number of block when changes will applied |
Implemented in kagome::authority::AuthorityManagerImpl.
|
pure virtual |
Returns authorities according specified block.
block | for which authority set is requested |
finalized | - true if we consider that the provided block is finalized |
Implemented in kagome::authority::AuthorityManagerImpl.
|
pure virtual |
Implemented in kagome::authority::AuthorityManagerImpl.
|
pure virtual |
Prunes data which was needed only till {.
block} | and won't be used anymore |
Implemented in kagome::authority::AuthorityManagerImpl.
|
pure virtual |
Recalculate the authority change graph starting from genesis and up to the last finalized block. The result shall be stored in the provided storage. This operation may take a considerable amount of time.
Implemented in kagome::authority::AuthorityManagerImpl.