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

Classes

class  ChainValidator
 
class  ChainValidatorImpl
 
struct  CommandError
 
class  StatefulValidator
 
class  StatefulValidatorImpl
 
struct  TransactionError
 
struct  VerifiedProposalAndErrors
 Type of verified proposal and errors appeared in the process. More...
 

Typedefs

using TransactionsErrors = std::vector< TransactionError >
 Collection of transactions errors. More...
 

Functions

static bool checkTransactions (ametsuchi::TemporaryWsv &temporary_wsv, validation::TransactionsErrors &transactions_errors_log, const shared_model::interface::Transaction &tx)
 
static auto validateTransactions (const shared_model::interface::types::TransactionsCollectionType &txs, ametsuchi::TemporaryWsv &temporary_wsv, validation::TransactionsErrors &transactions_errors_log, const shared_model::interface::TransactionBatchParser &batch_parser)
 
template<typename PublicKeys >
bool signaturesSubset (const shared_model::interface::types::SignatureRangeType &signatures, const PublicKeys &public_keys)
 
template<typename Peers >
bool peersSubset (const shared_model::interface::types::SignatureRangeType &signatures, const Peers &peers)
 

Typedef Documentation

◆ TransactionsErrors

Collection of transactions errors.

Function Documentation

◆ checkTransactions()

static bool iroha::validation::checkTransactions ( ametsuchi::TemporaryWsv temporary_wsv,
validation::TransactionsErrors transactions_errors_log,
const shared_model::interface::Transaction tx 
)
static

Complements initial transaction check with command-by-command check

Parameters
temporary_wsvto apply commands on
transactions_errors_logto write errors to
txto be checked
Returns
empty result, if check is successful, command error otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ peersSubset()

template<typename Peers >
bool iroha::validation::peersSubset ( const shared_model::interface::types::SignatureRangeType signatures,
const Peers &  peers 
)
inline

Checks if `signatures' is a subset of signatures of `peers'

Parameters
signaturesto check
peerswith signatures
Returns
true if is a subset or false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ signaturesSubset()

template<typename PublicKeys >
bool iroha::validation::signaturesSubset ( const shared_model::interface::types::SignatureRangeType signatures,
const PublicKeys &  public_keys 
)
inline

Checks if signatures' public keys are present in vector of pubkeys

Parameters
signatures- collection of signatures
public_keys- collection of public keys
Returns
true, if all public keys of signatures are present in vector of pubkeys
Here is the caller graph for this function:

◆ validateTransactions()

static auto iroha::validation::validateTransactions ( const shared_model::interface::types::TransactionsCollectionType txs,
ametsuchi::TemporaryWsv temporary_wsv,
validation::TransactionsErrors transactions_errors_log,
const shared_model::interface::TransactionBatchParser batch_parser 
)
static

Validate all transactions supplied; includes special rules, such as batch validation etc

Parameters
txsto be validated
temporary_wsvto apply transactions on
transactions_errors_logto write errors to
batch_parserto parse batches from transaction range
Returns
range of transactions, which passed stateful validation
Here is the call graph for this function:
Here is the caller graph for this function: