Namespaces | |
| ametsuchi | |
| cache | |
| consensus | |
| containers | |
| expected | |
| main | |
| model | |
| multihash | |
| network | |
| ordering | |
| protocol | |
| schedulers | |
| set | |
| simulator | |
| synchronizer | |
| time | |
| to_string | |
| torii | |
| utility_service | |
| validation | |
Classes | |
| class | blob_t |
| struct | combine_latest_until_first_completed |
| class | Completer |
| class | DefaultCompleter |
| class | FairMstProcessor |
| class | GossipPropagationStrategy |
| struct | GossipPropagationStrategyParams |
| struct | IrohadVersion |
| struct | is_any |
| struct | is_any< T, First > |
| struct | is_any< T, First, Rest... > |
| struct | keypair_t |
| class | KeysManager |
| class | KeysManagerImpl |
| struct | LedgerState |
| class | MstProcessor |
| class | MstState |
| class | MstStorage |
| class | MstStorageStateImpl |
| class | MstTimeProvider |
| class | MstTimeProviderImpl |
| class | PendingTransactionStorage |
| class | PendingTransactionStorageImpl |
| class | PendingTransactionStorageInit |
| class | PropagationStrategy |
| class | PropagationStrategyStub |
| struct | ResultVisitor |
| class | Seeder |
| Helper class to seed a PRNG. For not crypto-related use only. More... | |
| struct | StateUpdateResult |
| struct | timeout |
| struct | TopBlockInfo |
Functions | |
| void | clearCharBuffer (Iroha_CharBuffer &buf) |
| void | toCharBuffer (Iroha_CharBuffer &buf, const std::string &string) |
| void | toCharBuffer (Iroha_CharBuffer &buf, std::optional< std::string > const &opt_string) |
| std::string_view | charBufferToStringView (Iroha_CharBuffer const &buf) |
| std::vector< std::string_view > | charBufferArrayToStringViewVector (Iroha_CharBufferArray const &arr) |
| expected::Result< std::shared_ptr< iroha::ametsuchi::Storage >, std::string > | initStorage (iroha::ametsuchi::PostgresOptions const &pg_opt, std::shared_ptr< iroha::ametsuchi::PoolWrapper > pool_wrapper, std::shared_ptr< iroha::PendingTransactionStorage > pending_txs_storage, std::shared_ptr< shared_model::interface::QueryResponseFactory > query_response_factory, boost::optional< std::string > block_storage_dir, std::optional< std::reference_wrapper< const iroha::ametsuchi::VmCaller >> vm_caller_ref, logger::LoggerManagerTreePtr log_manager) |
| template<typename T > | |
| hash256_t | hash (const T &pb) |
| hash256_t | hash (const model::Transaction &tx) |
| hash256_t | hash (const model::Block &block) |
| hash256_t | hash (const model::Query &query) |
| bool | mergeSignaturesInBatch (DataType &target, const DataType &donor) |
| template<typename T , typename Transform > | |
| auto | operator| (T &&t, Transform &&f) -> std::enable_if_t< not std::is_same< decltype(std::forward< Transform >(f)(*std::forward< T >(t))), void >::value, decltype(std::forward< Transform >(f)(*std::forward< T >(t)))> |
| std::vector< uint8_t > | stringToBytes (const std::string &source) |
| std::string | bytesToString (const std::vector< uint8_t > &source) |
| template<size_t size> | |
| boost::optional< blob_t< size > > | stringToBlob (const std::string &string) |
| template<size_t size> | |
| boost::optional< blob_t< size > > | hexstringToArray (const std::string &string) |
| template<class Coordination , class Selector , class Observable , class... ObservableN, class Enabled = rxcpp::util::enable_if_all_true_type_t< rxcpp::is_coordination<Coordination>, rxcpp::operators::detail:: is_combine_latest_selector<Selector, Observable, ObservableN...>, rxcpp::all_observables<Observable, ObservableN...>>, class ResolvedSelector = rxcpp::util::decay_t<Selector>, class combine_latest = combine_latest_until_first_completed< Coordination, ResolvedSelector, rxcpp::util::decay_t<Observable>, rxcpp::util::decay_t<ObservableN>...>, class Value = rxcpp::util::value_type_t<combine_latest>, class Result = rxcpp::observable<Value, combine_latest>> | |
| static Result | makeCombineLatestUntilFirstCompleted (Observable &&o, Coordination &&cn, Selector &&s, ObservableN &&... on) |
| void | remove_dir_contents (const boost::filesystem::path &dir, const logger::LoggerPtr &log) |
| iroha::expected::Result< std::string, std::string > | readTextFile (const boost::filesystem::path &path) |
| iroha::expected::Result< std::vector< uint8_t >, std::string > | readBinaryFile (const boost::filesystem::path &path) |
| template<typename Container > | |
| auto | hexstringToBytestringSize (Container const &c) -> decltype(c.size()) |
| template<typename Container > | |
| auto | bytestringToHexstringSize (Container const &c) -> decltype(c.size()) |
| template<typename OutputContainer > | |
| void | bytestringToHexstringAppend (shared_model::interface::types::ByteRange input, OutputContainer &destination) |
| std::string | bytestringToHexstring (std::string_view str) |
| iroha::expected::Result< std::string, const char * > | hexstringToBytestringResult (std::string_view str) |
| boost::optional< std::string > | hexstringToBytestring (const std::string &str) |
| template<typename T , typename = std::enable_if_t<std::is_arithmetic<T>::value>> | |
| std::string | numToHexstring (const T val) |
| IrohadVersion | getIrohadVersion () |
| template<typename T > | |
| void | memzero (T &t) |
| template<typename T > | |
| void | memcpy (T &dst, T const &src) |
| template<typename C > | |
| auto | makeOptionalGet (C &map) |
| template<typename T , typename... Args> | |
| auto | makeMethodInvoke (T &object, Args &&... args) |
| template<typename V , typename B > | |
| auto | assignObjectField (B object, V B::*member) |
| template<template< typename C > class P, typename V , typename B > | |
| auto | assignObjectField (P< B > object, V B::*member) |
| template<typename T > | |
| constexpr bool | optionalReferenceEqual (const std::optional< std::reference_wrapper< T >> &lhs, const std::optional< std::reference_wrapper< T >> &rhs) |
| RandomEngine | makeSeededPrng (const char *seed_start, size_t seed_length) |
| RandomEngine | makeSeededPrng (const unsigned char *seed_start, size_t seed_length) |
| void | generatePermutation (std::vector< size_t > &permutation, RandomEngine prng, size_t size) |
| template<typename T > | |
| auto | dereferenceOptionals (T range) |
| template<typename Hasher , typename Collection , typename TargetType = typename Collection::value_type> | |
| auto | merge_unique (Collection left, Collection right) |
| template<typename Set , typename Merge > | |
| Set | set_union (const Set &left, const Set &right, Merge &&merge) |
| template<typename Set > | |
| Set | set_difference (const Set &left, const Set &right) |
| template<typename T , typename Selector , typename Coordination , class ResolvedSelector = rxcpp::util::decay_t<Selector>, class Duration = decltype( std::declval<ResolvedSelector>()((std::declval<std::decay_t<T>>()))), class Enabled = rxcpp::util::enable_if_all_true_type_t< rxcpp::is_coordination<Coordination>, rxcpp::util::is_duration<Duration>>, class Timeout = timeout<T, ResolvedSelector, rxcpp::util::decay_t<Coordination>>> | |
| static auto | makeTimeout (Selector &&s, Coordination &&cn) |
| template<typename T > | |
| static std::string | xorCrypt (const T &key, const std::string &pass_phrase) |
| sig_t | sign (const uint8_t *msg, size_t msgsize, const pubkey_t &pub, const privkey_t &priv) |
| sig_t | sign (std::string_view msg, const pubkey_t &pub, const privkey_t &priv) |
| bool | verify (const uint8_t *msg, size_t msgsize, PublicKeyByteRangeView public_key, SignatureByteRangeView signature) |
| bool | verify (std::string_view msg, PublicKeyByteRangeView public_key, SignatureByteRangeView signature) |
| blob_t< 32 > | create_seed () |
| blob_t< 32 > | create_seed (std::string passphrase) |
| keypair_t | create_keypair (blob_t< 32 > seed) |
| keypair_t | create_keypair () |
| bool | verify (const uint8_t *msg, size_t msgsize, shared_model::interface::types::PublicKeyByteRangeView public_key, shared_model::interface::types::SignatureByteRangeView signature) |
| bool | verify (std::string_view msg, shared_model::interface::types::PublicKeyByteRangeView public_key, shared_model::interface::types::SignatureByteRangeView signature) |
| void | sha3_256 (uint8_t *output, const uint8_t *input, size_t in_size) |
| void | sha3_512 (uint8_t *output, const uint8_t *input, size_t in_size) |
| hash256_t | sha3_256 (const uint8_t *input, size_t in_size) |
| hash512_t | sha3_512 (const uint8_t *input, size_t in_size) |
| hash256_t | sha3_256 (const std::string &msg) |
| hash512_t | sha3_512 (const std::string &msg) |
| hash512_t | sha3_512 (const std::vector< uint8_t > &msg) |
| hash256_t | sha3_256 (const std::vector< uint8_t > &msg) |
Variables | |
| static const model::converters::PbTransactionFactory | tx_factory |
| static const model::converters::PbBlockFactory | block_factory |
| static const model::converters::PbQueryFactory | query_factory (std::make_shared< logger::LoggerSpdlog >("QueryFactory", std::make_shared< logger::LoggerConfig >(logger::LoggerConfig{ logger::kDefaultLogLevel, logger::getDefaultLogPatterns()}))) |
| const char * | kGitPrettyVersion = GIT_REPO_PRETTY_VER |
| A string describing current git repository version in a human-readable way. More... | |
Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Copyright Soramitsu Co., Ltd. All Rights Reserved. Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. SPDX-License-Identifier: Apache-2.0
Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 This source file contains common methods related to files
| using iroha::BadFormatException = typedef std::invalid_argument |
| using iroha::BatchPtr = typedef std::shared_ptr<shared_model::interface::TransactionBatch> |
| using iroha::byte_t = typedef uint8_t |
| using iroha::CompleterType = typedef std::shared_ptr<const Completer> |
| using iroha::ConstPeer = typedef const shared_model::interface::Peer |
| using iroha::ConstRefBatch = typedef ConstRefT<BatchPtr> |
| using iroha::ConstRefPeer = typedef ConstRefT<shared_model::interface::Peer> |
| using iroha::ConstRefState = typedef ConstRefT<MstState> |
| using iroha::ConstRefT = typedef const T & |
| using iroha::ConstRefTime = typedef ConstRefT<TimeType> |
| using iroha::DataType = typedef BatchPtr |
| using iroha::hash224_t = typedef hash_t<224 / 8> |
| using iroha::hash256_t = typedef hash_t<256 / 8> |
| using iroha::hash384_t = typedef hash_t<384 / 8> |
| using iroha::hash512_t = typedef hash_t<512 / 8> |
| using iroha::hash_t = typedef blob_t<size> |
| using iroha::OldCommit = typedef rxcpp::observable<model::Block> |
| using iroha::OptPeer = typedef GossipPropagationStrategy::OptPeer |
| using iroha::privkey_t = typedef blob_t<32> |
| using iroha::PropagationData = typedef PropagationStrategy::PropagationData |
| using iroha::pubkey_t = typedef blob_t<32> |
| using iroha::RandomEngine = typedef std::mt19937_64 |
| using iroha::sig_t = typedef blob_t<64> |
| using iroha::TimeType = typedef shared_model::interface::types::TimestampType |
| using iroha::ts32_t = typedef uint32_t |
| using iroha::ts64_t = typedef uint64_t |
| using iroha::TxResponse = typedef std::shared_ptr<shared_model::interface::TransactionResponse> |
|
strong |
|
strong |
| auto iroha::assignObjectField | ( | B | object, |
| V B::* | member | ||
| ) |
Assign the value to the object member
| V | - object member type |
| B | - object type |
| object | - object value for member assignment |
| member | - pointer to member in block |

| auto iroha::assignObjectField | ( | P< B > | object, |
| V B::* | member | ||
| ) |
Assign the value to the object member. Block is wrapped in monad
| P | - monadic type |
| V | - object member type |
| B | - object type |
| object | - object value for member assignment |
| member | - pointer to member in object |
|
inline |
blob vector to string
| source | - vector for conversion |

|
inline |
Convert string of raw bytes to printable hex string
| str | - raw bytes string to convert |


|
inline |
Convert string of raw bytes to printable hex string
| str | - raw bytes string to convert |


|
inline |

|
inline |


|
inline |

|
inline |

Create keypair
Create new keypair
| seed |

| keypair_t iroha::create_keypair | ( | ) |
Create new keypair with a default seed (by create_seed())

| blob_t< 32 > iroha::create_seed | ( | ) |
Generate seed
Generate random seed reading from /dev/urandom


| blob_t< 32 > iroha::create_seed | ( | std::string | passphrase | ) |
Generate 32 bytes seed based on a passphrase
| passphrase |
Generate random seed as sha3_256(passphrase)
| passphrase |

| auto iroha::dereferenceOptionals | ( | T | range | ) |
| void iroha::generatePermutation | ( | std::vector< size_t > & | permutation, |
| RandomEngine | prng, | ||
| size_t | size | ||
| ) |
Generate permutation of numbers from 0 to size - 1. Is guaranteed to generate same permutation on any platform.
| [out] | permutation | container to store the permutation. |
| [in] | prng | the source of pseudo-random data to generate permutation. |
| [in] | size | the size of permutation to generate. |

| IrohadVersion iroha::getIrohadVersion | ( | ) |

| hash256_t iroha::hash | ( | const model::Transaction & | tx | ) |

| hash256_t iroha::hash | ( | const model::Block & | block | ) |

| hash256_t iroha::hash | ( | const model::Query & | query | ) |

| hash256_t iroha::hash | ( | const T & | pb | ) |
Calculate hash from protobuf model object
| T | - protobuf model type |
| pb | - protobuf model object |


| boost::optional<blob_t<size> > iroha::hexstringToArray | ( | const std::string & | string | ) |
Convert hexstring to array of given size
| size | - output array size |
| string | - input string for transform |


|
inline |


|
inline |
Convert printable hex string to string of raw bytes
| str | - hex string to convert |


|
inline |

| expected::Result<std::shared_ptr<iroha::ametsuchi::Storage>, std::string> iroha::initStorage | ( | iroha::ametsuchi::PostgresOptions const & | pg_opt, |
| std::shared_ptr< iroha::ametsuchi::PoolWrapper > | pool_wrapper, | ||
| std::shared_ptr< iroha::PendingTransactionStorage > | pending_txs_storage, | ||
| std::shared_ptr< shared_model::interface::QueryResponseFactory > | query_response_factory, | ||
| boost::optional< std::string > | block_storage_dir, | ||
| std::optional< std::reference_wrapper< const iroha::ametsuchi::VmCaller >> | vm_caller_ref, | ||
| logger::LoggerManagerTreePtr | log_manager | ||
| ) |

|
static |

| auto iroha::makeMethodInvoke | ( | T & | object, |
| Args &&... | args | ||
| ) |
Return function which invokes class method by pointer to member with provided arguments
class A { int f(int, double); }
A a; int i = makeMethodInvoke(a, 1, 1.0);
| T | - provided class type |
| Args | - provided arguments types |
| object | - class object |
| args | - function arguments |

| auto iroha::makeOptionalGet | ( | C & | map | ) |
Create map get function for value retrieval by key
| K | - map key type |
| V | - map value type |
| map | - map for value retrieval |

| RandomEngine iroha::makeSeededPrng | ( | const char * | seed_start, |
| size_t | seed_length | ||
| ) |


| RandomEngine iroha::makeSeededPrng | ( | const unsigned char * | seed_start, |
| size_t | seed_length | ||
| ) |

|
static |
| void iroha::memcpy | ( | T & | dst, |
| T const & | src | ||
| ) |

| void iroha::memzero | ( | T & | t | ) |

| auto iroha::merge_unique | ( | Collection | left, |
| Collection | right | ||
| ) |
Merge collections with unique elements
| Collection | - type of collection |
| TargetType | - type of elements in collection |
| Hasher | - class for hashing TargetType objects |
| left | - first collection |
| right | - second collection |
Merge signatures in batches
| target | - batch for inserting |
| donor | - batch with transactions to copy signatures from |
|
inline |
Convert a number to a printable hex string
| val | - numeric type value |

| auto iroha::operator| | ( | T && | t, |
| Transform && | f | ||
| ) | -> std::enable_if_t< not std::is_same< decltype(std::forward<Transform>(f)(*std::forward<T>(t))), void>::value, decltype(std::forward<Transform>(f)(*std::forward<T>(t)))> |
Bind operator. If argument has value, dereferences argument and calls given function, which should return wrapped value operator| is used since it has to be binary and left-associative Non-void returning specialization
boost::optional<int> f(); boost::optional<double> g(int);
boost::optional<double> d = f() | g;
std::forward should be used in any reference of arguments because operator bool, operator*, and operator() of arguments can have different implementation with ref-qualifiers
Trailing return type checks that result of applying function to unwrapped value results in non-void type
| T | - monadic type |
| Transform | - transform function type |
| t | - monadic value |
| f | - function, which takes dereferenced value, and returns wrapped value |
Bind operator. If argument has value, dereferences argument and calls given function, which should return wrapped value operator| is used since it has to be binary and left-associative Void specialization
boost::optional<int> f(); void g(int);
f() | g;
std::forward should be used in any reference of arguments because operator bool, operator*, and operator() of arguments can have different implementation with ref-qualifiers
Trailing return type checks that result of applying function to unwrapped value results in void type
| T | - monadic type |
| Transform | - transform function type |
| t | - monadic value |
| f | - function, which takes dereferenced value, and returns wrapped value |
| constexpr bool iroha::optionalReferenceEqual | ( | const std::optional< std::reference_wrapper< T >> & | lhs, |
| const std::optional< std::reference_wrapper< T >> & | rhs | ||
| ) |
Compares optional references by accesing the stored reference, if it is present

| iroha::expected::Result< std::vector< uint8_t >, std::string > iroha::readBinaryFile | ( | const boost::filesystem::path & | path | ) |
Read file in binary mode, and either return its contents as a byte vector or return the error as a string
| path | - path to the file |

| iroha::expected::Result< std::string, std::string > iroha::readTextFile | ( | const boost::filesystem::path & | path | ) |
Read file in text mode, and either return its contents as a string or return the error as a string
| path | - path to the file |

| void iroha::remove_dir_contents | ( | const boost::filesystem::path & | dir, |
| const logger::LoggerPtr & | log | ||
| ) |
Remove all files and directories inside a folder. Keeps the target folder.
| dir | - target folder |
| log | - a log for local messages |

| Set iroha::set_difference | ( | const Set & | left, |
| const Set & | right | ||
| ) |
Provide difference operation on set
| Set | - type of set |
| Set iroha::set_union | ( | const Set & | left, |
| const Set & | right, | ||
| Merge && | merge | ||
| ) |
Provide merge of sets based on mering same elements
| Set | - type of set |
| Merge | - type of merge predicate |
| left | - first set |
| right | - second set |
| merge | - merge predicate |
| void iroha::sha3_256 | ( | uint8_t * | output, |
| const uint8_t * | input, | ||
| size_t | in_size | ||
| ) |

| hash256_t iroha::sha3_256 | ( | const uint8_t * | input, |
| size_t | in_size | ||
| ) |

| hash256_t iroha::sha3_256 | ( | const std::string & | msg | ) |

| hash256_t iroha::sha3_256 | ( | const std::vector< uint8_t > & | msg | ) |

| void iroha::sha3_512 | ( | uint8_t * | output, |
| const uint8_t * | input, | ||
| size_t | in_size | ||
| ) |

| hash512_t iroha::sha3_512 | ( | const uint8_t * | input, |
| size_t | in_size | ||
| ) |

| hash512_t iroha::sha3_512 | ( | const std::string & | msg | ) |

| hash512_t iroha::sha3_512 | ( | const std::vector< uint8_t > & | msg | ) |

| sig_t iroha::sign | ( | const uint8_t * | msg, |
| size_t | msgsize, | ||
| const pubkey_t & | pub, | ||
| const privkey_t & | priv | ||
| ) |
Sign the message
Sign message with ed25519 crypto algorithm
| msg | |
| msgsize | |
| pub | |
| priv |


| boost::optional<blob_t<size> > iroha::stringToBlob | ( | const std::string & | string | ) |
|
inline |
Convert string to blob vector
| source | - string for conversion |
|
inline |

|
inline |

| bool iroha::verify | ( | const uint8_t * | msg, |
| size_t | msgsize, | ||
| PublicKeyByteRangeView | public_key, | ||
| SignatureByteRangeView | signature | ||
| ) |
Verify signature


| bool iroha::verify | ( | const uint8_t * | msg, |
| size_t | msgsize, | ||
| shared_model::interface::types::PublicKeyByteRangeView | public_key, | ||
| shared_model::interface::types::SignatureByteRangeView | signature | ||
| ) |
Verify signature of ed25519 crypto algorithm
| msg | |
| msgsize | |
| pub | |
| sig |
| bool iroha::verify | ( | std::string_view | msg, |
| shared_model::interface::types::PublicKeyByteRangeView | public_key, | ||
| shared_model::interface::types::SignatureByteRangeView | signature | ||
| ) |
| bool iroha::verify | ( | std::string_view | msg, |
| PublicKeyByteRangeView | public_key, | ||
| SignatureByteRangeView | signature | ||
| ) |

|
static |
Function for the key (en|de)cryption via XOR
| is | a key type |
| privkey | is a private key |
| pass_phrase | is a key for encryption |

|
static |
| const char * iroha::kGitPrettyVersion = GIT_REPO_PRETTY_VER |
A string describing current git repository version in a human-readable way.
|
static |
|
static |