Skip to content

sgns::runtime::binaryen::CoreImpl

#include <core_impl.hpp>

Inherits from sgns::runtime::binaryen::RuntimeApi, sgns::runtime::Core

Public Functions

Name
CoreImpl(const std::shared_ptr< WasmProvider > & wasm_provider, const std::shared_ptr< RuntimeManager > & runtime_manager, std::shared_ptr< storage::changes_trie::ChangesTracker > changes_tracker, std::shared_ptr< blockchain::BlockHeaderRepository > header_repo)
~CoreImpl() override =default
virtual outcome::result< primitives::Version > version(const boost::optional< primitives::BlockHash > & block_hash) override
Returns the version of the runtime.
virtual outcome::result< void > execute_block(const primitives::Block & block) override
Executes the given block.
virtual outcome::result< void > initialise_block(const sgns::primitives::BlockHeader & header) override
Initialize a block with the given header.
virtual outcome::result< std::vector< primitives::AuthorityId > > authorities(const primitives::BlockId & block_id) override

Additional inherited members

Public Types inherited from sgns::runtime::binaryen::RuntimeApi

Name
enum class CallPersistency

Public Functions inherited from sgns::runtime::binaryen::RuntimeApi

Name
RuntimeApi(std::shared_ptr< WasmProvider > wasm_provider, std::shared_ptr< RuntimeManager > runtime_manager)

Protected Functions inherited from sgns::runtime::binaryen::RuntimeApi

Name
template <typename R ,typename... Args>
outcome::result< R >
executeAt(std::string_view name, const base::Hash256 & state_root, CallPersistency persistency, Args &&... args)
executes wasm export method returning non-void result
template <typename R ,typename... Args>
outcome::result< R >
execute(std::string_view name, CallPersistency persistency, Args &&... args)
executes wasm export method returning non-void result

Public Functions inherited from sgns::runtime::Core

Name
virtual ~Core() =default

Public Functions Documentation

function CoreImpl

explicit CoreImpl(
    const std::shared_ptr< WasmProvider > & wasm_provider,
    const std::shared_ptr< RuntimeManager > & runtime_manager,
    std::shared_ptr< storage::changes_trie::ChangesTracker > changes_tracker,
    std::shared_ptr< blockchain::BlockHeaderRepository > header_repo
)

function ~CoreImpl

~CoreImpl() override =default

function version

virtual outcome::result< primitives::Version > version(
    const boost::optional< primitives::BlockHash > & block_hash
) override

Returns the version of the runtime.

Return: runtime version

Reimplements: sgns::runtime::Core::version

function execute_block

virtual outcome::result< void > execute_block(
    const primitives::Block & block
) override

Executes the given block.

Parameters:

  • block block to execute

Reimplements: sgns::runtime::Core::execute_block

function initialise_block

virtual outcome::result< void > initialise_block(
    const sgns::primitives::BlockHeader & header
) override

Initialize a block with the given header.

Parameters:

  • header header used for block initialization

Reimplements: sgns::runtime::Core::initialise_block

function authorities

virtual outcome::result< std::vector< primitives::AuthorityId > > authorities(
    const primitives::BlockId & block_id
) override

Return: collection of authorities

Reimplements: sgns::runtime::Core::authorities

Get current authorities


Updated on 2026-03-04 at 13:10:43 -0800