statebased

package
v0.0.0-...-95b87ed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewV13Evaluator

func NewV13Evaluator(policySupport validation.PolicyEvaluator, vpmgr KeyLevelValidationParameterManager) *policyCheckerFactoryV13

func NewV20Evaluator

func NewV20Evaluator(
	vpmgr KeyLevelValidationParameterManager,
	policySupport validation.PolicyEvaluator,
	collRes CollectionResources,
	StateFetcher s.StateFetcher,
) *policyCheckerFactoryV20

Types

type CollectionResources

type CollectionResources interface {
	CollectionValidationInfo(chaincodeName, collectionName string, state s.State) (args []byte, unexpectedErr error, validationErr error)
}

type KeyLevelValidationParameterManager

type KeyLevelValidationParameterManager interface {
	GetValidationParameterForKey(cc, coll, key string, blockNum, txNum uint64) ([]byte, error)

	ExtractValidationParameterDependency(blockNum, txNum uint64, rwset []byte)

	SetTxValidationResult(cc string, blockNum, txNum uint64, err error)
}

type KeyLevelValidationParameterManagerImpl

type KeyLevelValidationParameterManagerImpl struct {
	StateFetcher validation.StateFetcher

	PolicyTranslator PolicyTranslator
	// contains filtered or unexported fields
}

func (*KeyLevelValidationParameterManagerImpl) ExtractValidationParameterDependency

func (m *KeyLevelValidationParameterManagerImpl) ExtractValidationParameterDependency(blockNum, txNum uint64, rwsetBytes []byte)

func (*KeyLevelValidationParameterManagerImpl) GetValidationParameterForKey

func (m *KeyLevelValidationParameterManagerImpl) GetValidationParameterForKey(cc, coll, key string, blockNum, txNum uint64) ([]byte, error)

func (*KeyLevelValidationParameterManagerImpl) SetTxValidationResult

func (m *KeyLevelValidationParameterManagerImpl) SetTxValidationResult(ns string, blockNum, txNum uint64, err error)

type KeyLevelValidator

type KeyLevelValidator struct {
	// contains filtered or unexported fields
}

func (*KeyLevelValidator) PostValidate

func (klv *KeyLevelValidator) PostValidate(cc string, blockNum, txNum uint64, err error)

func (*KeyLevelValidator) PreValidate

func (klv *KeyLevelValidator) PreValidate(txNum uint64, block *common.Block)

func (*KeyLevelValidator) Validate

func (klv *KeyLevelValidator) Validate(cc string, blockNum, txNum uint64, rwsetBytes, prp, ccEP []byte, endorsements []*peer.Endorsement) commonerrors.TxValidationError

type PolicyTranslator

type PolicyTranslator interface {
	Translate([]byte) ([]byte, error)
}

type RWSetPolicyEvaluator

type RWSetPolicyEvaluator interface {
	Evaluate(blockNum, txNum uint64, NsRwSets []*rwsetutil.NsRwSet, ns string, sd []*protoutil.SignedData) commonerrors.TxValidationError
}

type RWSetPolicyEvaluatorFactory

type RWSetPolicyEvaluatorFactory interface {
	Evaluator(ccEP []byte) RWSetPolicyEvaluator
}

type StateBasedValidator

type StateBasedValidator interface {
	PreValidate(ch, cc string, blockNum, txNum uint64, rwset []byte) error

	Validate(ch, cc string, blockNum, txNum uint64, rwset, prp, ep []byte, endorsements []*peer.Endorsement) error

	PostValidate(ch, cc string, blockNum, txNum uint64, vc peer.TxValidationCode) error
}

type ValidationParameterUpdatedError

type ValidationParameterUpdatedError struct {
	CC     string
	Coll   string
	Key    string
	Height uint64
	Txnum  uint64
}

func (*ValidationParameterUpdatedError) Error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL