hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::ametsuchi Namespace Reference

Namespaces

 tx_cache_response_details
 
 tx_cache_status_responses
 The namespace contains concrete result types of transaction cache.
 

Classes

class  BlockIndex
 
class  BlockQuery
 
class  BlockQueryFactory
 
class  BlockStorage
 
class  BlockStorageFactory
 
struct  CommandError
 
class  CommandExecutor
 
class  FailoverCallback
 
class  FailoverCallbackHolder
 
class  FlatFile
 
class  FlatFileBlockStorage
 
class  FlatFileBlockStorageFactory
 
class  Indexer
 
class  InMemoryBlockStorage
 
class  InMemoryBlockStorageFactory
 
class  KeyValueStorage
 
class  KTimesReconnectionStrategy
 
class  KTimesReconnectionStrategyFactory
 
class  MutableFactory
 
class  MutableStorage
 
class  MutableStorageImpl
 
class  PeerQuery
 
class  PeerQueryFactory
 
class  PeerQueryWsv
 
class  PgConnectionInit
 
struct  PoolWrapper
 
class  PostgresBlockIndex
 
class  PostgresBlockQuery
 
class  PostgresBlockStorage
 
class  PostgresBlockStorageFactory
 
class  PostgresCommandExecutor
 
class  PostgresIndexer
 
class  PostgresOptions
 
class  PostgresQueryExecutor
 
class  PostgresSettingQuery
 
class  PostgresSpecificQueryExecutor
 
class  PostgresTemporaryBlockStorage
 
class  PostgresWsvCommand
 
class  PostgresWsvQuery
 
class  QueryExecutor
 
class  QueryExecutorFactory
 
class  ReconnectionStrategy
 
class  ReconnectionStrategyFactory
 
class  SettingQuery
 
class  SettingQueryFactory
 
class  SpecificQueryExecutor
 
class  Storage
 
class  StorageImpl
 
class  TemporaryFactory
 
class  TemporaryWsv
 
class  TemporaryWsvImpl
 
class  TransactionExecutor
 
struct  TxExecutionError
 
class  TxPresenceCache
 
class  TxPresenceCacheImpl
 
class  WsvCommand
 
class  WsvQuery
 
class  WsvRestorer
 
class  WsvRestorerImpl
 

Typedefs

using CommandResult = expected::Result< void, CommandError >
 
using CommitResult = iroha::expected::Result< std::shared_ptr< const iroha::LedgerState >, std::string >
 
using QueryErrorType = shared_model::interface::QueryResponseFactory::ErrorQueryType
 
using ErrorQueryResponse = shared_model::interface::ErrorQueryResponse
 
using QueryErrorMessageType = ErrorQueryResponse::ErrorMessageType
 
using QueryErrorCodeType = ErrorQueryResponse::ErrorCodeType
 
template<std::size_t N, typename T >
using element_t = typename boost::tuples::element< N, T >::type
 tuple element type shortcut More...
 
template<class Tuple1 , class Tuple2 >
using concat = decltype(concat_impl< Tuple1, Tuple2 >(std::make_index_sequence< length_v< std::decay_t< Tuple1 > >>{}, std::make_index_sequence< length_v< std::decay_t< Tuple2 > >>{}))
 tuple with types from two given tuples More...
 
using QueryExecutorResult = std::unique_ptr< shared_model::interface::QueryResponse >
 
using TxCacheStatusType = boost::variant< tx_cache_status_responses::Committed, tx_cache_status_responses::Rejected, tx_cache_status_responses::Missing >
 Sum type of all possible concrete responses from the tx cache. More...
 
using WsvError = std::string
 
using WsvCommandResult = expected::Result< void, WsvError >
 

Functions

shared_model::interface::types::DomainIdType getDomainFromName (const shared_model::interface::types::AccountIdType &account_id)
 
template<typename Function >
WsvCommandResult execute (soci::statement &st, Function &&error)
 
template<typename ParamType , typename Function >
void processSoci (soci::statement &st, soci::indicator &ind, ParamType &row, Function f)
 
template<class Tuple1 , class Tuple2 , std::size_t... Is, std::size_t... Js>
auto concat_impl (std::index_sequence< Is... >, std::index_sequence< Js... >) -> boost::tuple< element_t< Is, std::decay_t< Tuple1 >>..., element_t< Js, std::decay_t< Tuple2 >>... >
 index sequence helper for concat More...
 
template<typename F , std::size_t... Is>
decltype(auto) constexpr index_apply_impl (F &&f, std::index_sequence< Is... >)
 index sequence helper for index_apply More...
 
template<size_t N, typename F >
decltype(auto) constexpr index_apply (F &&f)
 apply F to an integer sequence [0, N) More...
 
template<typename Tuple , typename F >
decltype(auto) constexpr apply (Tuple &&t, F &&f)
 apply F to Tuple More...
 
template<typename R , typename T >
constexpr auto viewQuery (T &&t)
 view first length_v<R> elements of T without copying More...
 
template<typename R , typename T >
constexpr auto viewPermissions (T &&t)
 view last length_v<R> elements of T without copying More...
 
template<typename T >
constexpr auto rebind (T &&t)
 map tuple<optional<Ts>...> to optional<tuple<Ts...>> More...
 
template<typename C , typename T , typename F >
auto mapValues (T &t, F &&f)
 
template<typename C , typename T , typename F >
boost::optional< C > flatMapValues (T &t, F &&f)
 
template<typename R , typename T , typename F >
auto flatMapValue (T &t, F &&f)
 
bool isAlreadyProcessed (const TxCacheStatusType &tx_status) noexcept
 
tx_cache_response_details::HashType getHash (const TxCacheStatusType &status) noexcept
 

Variables

const std::string kRootRolePermStr
 
const shared_model::interface::types::SettingKeyType kMaxDescriptionSizeKey = "MaxDescriptionSize"
 
template<typename T >
constexpr std::size_t length_v = boost::tuples::length<T>::value
 tuple length shortcut More...
 
const char * kCommandExecutorError = "Cannot create CommandExecutorFactory"
 
const char * kPsqlBroken = "Connection to PostgreSQL broken: %s"
 
const char * kTmpWsv = "TemporaryWsv"
 

Typedef Documentation

◆ CommandResult

using iroha::ametsuchi::CommandResult = typedef expected::Result<void, CommandError>

If command is successful, we assume changes are made, and do not need anything If something goes wrong, Result will contain Error with additional information

◆ CommitResult

using iroha::ametsuchi::CommitResult = typedef iroha::expected::Result<std::shared_ptr<const iroha::LedgerState>, std::string>

◆ concat

template<class Tuple1 , class Tuple2 >
using iroha::ametsuchi::concat = typedef decltype(concat_impl<Tuple1, Tuple2>( std::make_index_sequence<length_v<std::decay_t<Tuple1> >>{}, std::make_index_sequence<length_v<std::decay_t<Tuple2> >>{}))

tuple with types from two given tuples

◆ element_t

template<std::size_t N, typename T >
using iroha::ametsuchi::element_t = typedef typename boost::tuples::element<N, T>::type

tuple element type shortcut

◆ ErrorQueryResponse

◆ QueryErrorCodeType

◆ QueryErrorMessageType

◆ QueryErrorType

◆ QueryExecutorResult

◆ TxCacheStatusType

Sum type of all possible concrete responses from the tx cache.

◆ WsvCommandResult

using iroha::ametsuchi::WsvCommandResult = typedef expected::Result<void, WsvError>

If command is successful, we assume changes are made, and do not need anything If something goes wrong, Result will contain WsvError with additional information

◆ WsvError

using iroha::ametsuchi::WsvError = typedef std::string

Error returned by wsv command. It is a string which contains what action has failed (e.g, "failed to insert role"), and an error which was provided by underlying implementation (e.g, database exception info)

Function Documentation

◆ apply()

template<typename Tuple , typename F >
decltype(auto) constexpr iroha::ametsuchi::apply ( Tuple &&  t,
F &&  f 
)

apply F to Tuple

Here is the caller graph for this function:

◆ concat_impl()

template<class Tuple1 , class Tuple2 , std::size_t... Is, std::size_t... Js>
auto iroha::ametsuchi::concat_impl ( std::index_sequence< Is... >  ,
std::index_sequence< Js... >   
) -> boost::tuple< element_t< Is, std::decay_t< Tuple1 >>..., element_t< Js, std::decay_t< Tuple2 >>... >

index sequence helper for concat

◆ execute()

template<typename Function >
WsvCommandResult iroha::ametsuchi::execute ( soci::statement &  st,
Function &&  error 
)
Here is the caller graph for this function:

◆ flatMapValue()

template<typename R , typename T , typename F >
auto iroha::ametsuchi::flatMapValue ( T &  t,
F &&  f 
)
Here is the call graph for this function:

◆ flatMapValues()

template<typename C , typename T , typename F >
boost::optional<C> iroha::ametsuchi::flatMapValues ( T &  t,
F &&  f 
)
Here is the call graph for this function:

◆ getDomainFromName()

shared_model::interface::types::DomainIdType iroha::ametsuchi::getDomainFromName ( const shared_model::interface::types::AccountIdType account_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHash()

tx_cache_response_details::HashType iroha::ametsuchi::getHash ( const TxCacheStatusType status)
inlinenoexcept

Retrieve hash from status

Parameters
status- transaction status obtained from cache
Returns
hash of the transaction
Here is the caller graph for this function:

◆ index_apply()

template<size_t N, typename F >
decltype(auto) constexpr iroha::ametsuchi::index_apply ( F &&  f)

apply F to an integer sequence [0, N)

Here is the call graph for this function:

◆ index_apply_impl()

template<typename F , std::size_t... Is>
decltype(auto) constexpr iroha::ametsuchi::index_apply_impl ( F &&  f,
std::index_sequence< Is... >   
)

index sequence helper for index_apply

Here is the caller graph for this function:

◆ isAlreadyProcessed()

bool iroha::ametsuchi::isAlreadyProcessed ( const TxCacheStatusType tx_status)
inlinenoexcept

Determine if transaction was already processed by its status

Parameters
tx_status- status obtained from transaction cache
Returns
true if transaction was committed or rejected
Here is the caller graph for this function:

◆ mapValues()

template<typename C , typename T , typename F >
auto iroha::ametsuchi::mapValues ( T &  t,
F &&  f 
)
Here is the call graph for this function:

◆ processSoci()

template<typename ParamType , typename Function >
void iroha::ametsuchi::processSoci ( soci::statement &  st,
soci::indicator &  ind,
ParamType &  row,
Function  f 
)
inline

◆ rebind()

template<typename T >
constexpr auto iroha::ametsuchi::rebind ( T &&  t)

map tuple<optional<Ts>...> to optional<tuple<Ts...>>

Here is the call graph for this function:
Here is the caller graph for this function:

◆ viewPermissions()

template<typename R , typename T >
constexpr auto iroha::ametsuchi::viewPermissions ( T &&  t)

view last length_v<R> elements of T without copying

◆ viewQuery()

template<typename R , typename T >
constexpr auto iroha::ametsuchi::viewQuery ( T &&  t)

view first length_v<R> elements of T without copying

Variable Documentation

◆ kCommandExecutorError

const char* iroha::ametsuchi::kCommandExecutorError = "Cannot create CommandExecutorFactory"

◆ kMaxDescriptionSizeKey

const shared_model::interface::types::SettingKeyType iroha::ametsuchi::kMaxDescriptionSizeKey = "MaxDescriptionSize"

◆ kPsqlBroken

const char* iroha::ametsuchi::kPsqlBroken = "Connection to PostgreSQL broken: %s"

◆ kRootRolePermStr

const std::string iroha::ametsuchi::kRootRolePermStr
Initial value:

◆ kTmpWsv

const char* iroha::ametsuchi::kTmpWsv = "TemporaryWsv"

◆ length_v

template<typename T >
constexpr std::size_t iroha::ametsuchi::length_v = boost::tuples::length<T>::value

tuple length shortcut