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 logger::Logger &log, const shared_model::interface::TransactionBatchParser &batch_parser)
 
bool signaturesSubset (const shared_model::interface::types::SignatureRangeType &signatures, const boost::any_range< shared_model::crypto::PublicKey, boost::forward_traversal_tag > &public_keys)
 

Typedef Documentation

Collection of transactions errors.

Function Documentation

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:

bool iroha::validation::signaturesSubset ( const shared_model::interface::types::SignatureRangeType signatures,
const boost::any_range< shared_model::crypto::PublicKey, boost::forward_traversal_tag > &  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:

static auto iroha::validation::validateTransactions ( const shared_model::interface::types::TransactionsCollectionType txs,
ametsuchi::TemporaryWsv temporary_wsv,
validation::TransactionsErrors transactions_errors_log,
const logger::Logger 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
logto write errors to console
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: