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

Classes

class  AbstractValidator
 
class  AlwaysValidValidator
 
class  AmountTrueValidator
 
class  Answer
 
class  AnyOrderValidator
 
class  BatchOrderValidator
 
class  BatchValidator
 
class  BlocksQueryValidator
 
class  BlockValidator
 
class  CommandValidatorVisitor
 
class  ContainerValidator
 
class  FieldValidator
 
class  OrderValidator
 
class  ProposalValidator
 
class  ProtoBlocksQueryValidator
 
class  ProtoBlockValidator
 
class  ProtoCommandValidator
 
class  ProtoProposalValidator
 
class  ProtoQueryValidator
 
class  ProtoTransactionValidator
 
class  QueryValidator
 
class  QueryValidatorVisitor
 
struct  Settings
 
class  SignableModelValidator
 
class  TransactionsCollectionValidator
 
class  TransactionValidator
 
struct  ValidatorsConfig
 

Typedefs

using ConcreteReasonType = std::string
 
using GroupedReasons = std::vector< ConcreteReasonType >
 
using ReasonsGroupName = std::string
 
using ReasonsGroupType = std::pair< ReasonsGroupName, GroupedReasons >
 
using DefaultUnsignedTransactionValidator = TransactionValidator< FieldValidator, CommandValidatorVisitor< FieldValidator > >
 
using DefaultSignedTransactionValidator = SignableModelValidator< DefaultUnsignedTransactionValidator, const interface::Transaction &, FieldValidator >
 
using DefaultOptionalSignedTransactionValidator = SignableModelValidator< DefaultUnsignedTransactionValidator, const interface::Transaction &, FieldValidator, false >
 
using DefaultUnsignedQueryValidator = QueryValidator< FieldValidator, QueryValidatorVisitor< FieldValidator > >
 
using DefaultSignedQueryValidator = SignableModelValidator< DefaultUnsignedQueryValidator, const interface::Query &, FieldValidator >
 
using DefaultUnsignedBlocksQueryValidator = BlocksQueryValidator< FieldValidator >
 
using DefaultSignedBlocksQueryValidator = SignableModelValidator< DefaultUnsignedBlocksQueryValidator, const interface::BlocksQuery &, FieldValidator >
 
using DefaultUnsignedTransactionsValidator = TransactionsCollectionValidator< DefaultUnsignedTransactionValidator >
 
using DefaultUnsignedOptionalTransactionsValidator = TransactionsCollectionValidator< DefaultUnsignedTransactionValidator, true >
 
using DefaultSignedTransactionsValidator = TransactionsCollectionValidator< DefaultSignedTransactionValidator >
 
using DefaultProposalValidator = ProposalValidator< FieldValidator, DefaultSignedTransactionsValidator >
 
using DefaultUnsignedBlockValidator = BlockValidator< FieldValidator, DefaultUnsignedOptionalTransactionsValidator >
 
using DefaultSignedBlockValidator = SignableModelValidator< DefaultUnsignedBlockValidator, const interface::Block &, FieldValidator >
 

Functions

boost::optional< ConcreteReasonTypevalidatePubkey (const interface::types::PubkeyType &pubkey)
 
void validatePaginationMetaPageSize (ReasonsGroupType &reason, const size_t &page_size)
 
void validatePublicKey (const std::string &public_key, ReasonsGroupType &reason)
 
void validatePaginationMeta (const iroha::protocol::TxPaginationMeta &paginationMeta, ReasonsGroupType &reason)
 
Answer validateProtoQuery (const iroha::protocol::Query &qry)
 
std::unique_ptr< shared_model::validation::SettingsgetDefaultSettings ()
 
bool validateHexString (const std::string &str)
 

Variables

const size_t kDefaultDescriptionSize = 64
 

Typedef Documentation

◆ ConcreteReasonType

using shared_model::validation::ConcreteReasonType = typedef std::string

◆ DefaultOptionalSignedTransactionValidator

Same as DefaultSignedTransactionValidator, but checks signatures only if they are present

◆ DefaultProposalValidator

Proposal validator which checks stateless validation of proposal

◆ DefaultSignedBlocksQueryValidator

Block query validator which checks stateless validation including signatures

◆ DefaultSignedBlockValidator

Block validator which checks blocks including signatures

◆ DefaultSignedQueryValidator

Query validator which checks stateless validation including signatures

◆ DefaultSignedTransactionsValidator

Transactions collection validator that checks signatures and stateless validness of transactions

◆ DefaultSignedTransactionValidator

Transaction validator which checks stateless validation and signature of transaction

◆ DefaultUnsignedBlocksQueryValidator

Block query validator checks stateless validation WITHOUT signatures

◆ DefaultUnsignedBlockValidator

Block validator which checks blocks WITHOUT signatures. Note that it does not check transactions' signatures as well

◆ DefaultUnsignedOptionalTransactionsValidator

Transactions collection validator that checks stateless validness of transactions WITHOUT signatures and allows transaction collection to be empty

◆ DefaultUnsignedQueryValidator

Query validator which checks stateless validation WITHOUT signatures

◆ DefaultUnsignedTransactionsValidator

Transactions collection validator that checks stateless validness of transactions WITHOUT signatures

◆ DefaultUnsignedTransactionValidator

Transaction validator which checks stateless validation WITHOUT signatures

◆ GroupedReasons

◆ ReasonsGroupName

using shared_model::validation::ReasonsGroupName = typedef std::string

◆ ReasonsGroupType

Function Documentation

◆ getDefaultSettings()

std::unique_ptr< shared_model::validation::Settings > shared_model::validation::getDefaultSettings ( )
Here is the caller graph for this function:

◆ validateHexString()

bool shared_model::validation::validateHexString ( const std::string &  str)

Check if given string has hex format

Parameters
strstring to check
Returns
true if string is in hex, false otherwise
Here is the caller graph for this function:

◆ validatePaginationMeta()

void shared_model::validation::validatePaginationMeta ( const iroha::protocol::TxPaginationMeta &  paginationMeta,
ReasonsGroupType reason 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validatePaginationMetaPageSize()

void shared_model::validation::validatePaginationMetaPageSize ( ReasonsGroupType reason,
const size_t &  page_size 
)
Here is the caller graph for this function:

◆ validateProtoQuery()

Answer shared_model::validation::validateProtoQuery ( const iroha::protocol::Query &  qry)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validatePubkey()

boost::optional< ConcreteReasonType > shared_model::validation::validatePubkey ( const interface::types::PubkeyType pubkey)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ validatePublicKey()

void shared_model::validation::validatePublicKey ( const std::string &  public_key,
ReasonsGroupType reason 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ kDefaultDescriptionSize

const size_t shared_model::validation::kDefaultDescriptionSize = 64