Documentation
¶
Index ¶
- func AssemblePvtRWSet(channelName string, privData *rwset.TxPvtReadWriteSet, ...) (*transientstore.TxPvtReadWriteSetWithConfigInfo, error)
- func CreateCCEventBytes(ccevent *pb.ChaincodeEvent) ([]byte, error)
- func JavaEnabled() bool
- type Channel
- type ChannelFetcher
- type ChannelState
- type ChannelStateRetriever
- type CollectionConfigRetriever
- type Context
- type Endorser
- func (e *Endorser) ProcessProposal(ctx context.Context, signedProp *pb.SignedProposal) (*pb.ProposalResponse, error)
- func (e *Endorser) ProcessProposalSuccessfullyOrError(up *UnpackedProposal) (*pb.ProposalResponse, error)
- func (e *Endorser) SimulateProposal(txParams *ccprovider.TransactionParams, chaincodeName string, ...) (*pb.Response, []byte, *pb.ChaincodeEvent, error)
- type MapBasedPluginMapper
- type Metrics
- type PeerOperations
- type PluginEndorser
- type PluginMapper
- type PluginName
- type PluginSupport
- type PrivateDataDistributor
- type PvtRWSetAssembler
- type QueryCreator
- type StateContext
- type Store
- type Support
- type SupportImpl
- func (s *SupportImpl) ChaincodeEndorsementInfo(channelID, chaincodeName string, txsim ledger.QueryExecutor) (*lifecycle.ChaincodeEndorsementInfo, error)
- func (s *SupportImpl) CheckACL(channelID string, signedProp *pb.SignedProposal) error
- func (s *SupportImpl) Execute(txParams *ccprovider.TransactionParams, name string, input *pb.ChaincodeInput) (*pb.Response, *pb.ChaincodeEvent, error)
- func (s *SupportImpl) ExecuteLegacyInit(txParams *ccprovider.TransactionParams, name, version string, ...) (*pb.Response, *pb.ChaincodeEvent, error)
- func (s *SupportImpl) GetApplicationConfig(cid string) (channelconfig.Application, bool)
- func (s *SupportImpl) GetDeployedCCInfoProvider() ledger.DeployedChaincodeInfoProvider
- func (s *SupportImpl) GetHistoryQueryExecutor(ledgername string) (ledger.HistoryQueryExecutor, error)
- func (s *SupportImpl) GetLedgerHeight(channelID string) (uint64, error)
- func (s *SupportImpl) GetTransactionByID(chid, txID string) (*pb.ProcessedTransaction, error)
- func (s *SupportImpl) GetTxSimulator(ledgername string, txid string) (ledger.TxSimulator, error)
- func (s *SupportImpl) IsSysCC(name string) bool
- func (s *SupportImpl) NewQueryCreator(channel string) (QueryCreator, error)
- func (s *SupportImpl) SigningIdentityForRequest(*pb.SignedProposal) (endorsement.SigningIdentity, error)
- type TransientStoreRetriever
- type UnpackedProposal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssemblePvtRWSet ¶
func AssemblePvtRWSet(channelName string, privData *rwset.TxPvtReadWriteSet, txsim ledger.SimpleQueryExecutor, deployedCCInfoProvider ledger.DeployedChaincodeInfoProvider) ( *transientstore.TxPvtReadWriteSetWithConfigInfo, error, )
func CreateCCEventBytes ¶
func CreateCCEventBytes(ccevent *pb.ChaincodeEvent) ([]byte, error)
func JavaEnabled ¶
func JavaEnabled() bool
Types ¶
type Channel ¶
type Channel struct {
IdentityDeserializer msp.IdentityDeserializer
}
type ChannelFetcher ¶
type ChannelState ¶
type ChannelState struct {
transientstore.Store
QueryCreator
}
func (*ChannelState) FetchState ¶
func (cs *ChannelState) FetchState() (endorsement.State, error)
type ChannelStateRetriever ¶
type ChannelStateRetriever interface {
NewQueryCreator(channel string) (QueryCreator, error)
}
type Context ¶
type Endorser ¶
type Endorser struct {
ChannelFetcher ChannelFetcher
LocalMSP msp.IdentityDeserializer
PrivateDataDistributor PrivateDataDistributor
Support Support
PvtRWSetAssembler PvtRWSetAssembler
Metrics *Metrics
}
func (*Endorser) ProcessProposal ¶
func (e *Endorser) ProcessProposal(ctx context.Context, signedProp *pb.SignedProposal) (*pb.ProposalResponse, error)
func (*Endorser) ProcessProposalSuccessfullyOrError ¶
func (e *Endorser) ProcessProposalSuccessfullyOrError(up *UnpackedProposal) (*pb.ProposalResponse, error)
func (*Endorser) SimulateProposal ¶
func (e *Endorser) SimulateProposal(txParams *ccprovider.TransactionParams, chaincodeName string, chaincodeInput *pb.ChaincodeInput) (*pb.Response, []byte, *pb.ChaincodeEvent, error)
type MapBasedPluginMapper ¶
type MapBasedPluginMapper map[string]endorsement.PluginFactory
func (MapBasedPluginMapper) PluginFactoryByName ¶
func (m MapBasedPluginMapper) PluginFactoryByName(name PluginName) endorsement.PluginFactory
type Metrics ¶
type Metrics struct {
ProposalDuration metrics.Histogram
ProposalsReceived metrics.Counter
SuccessfulProposals metrics.Counter
ProposalValidationFailed metrics.Counter
ProposalACLCheckFailed metrics.Counter
InitFailed metrics.Counter
EndorsementsFailed metrics.Counter
DuplicateTxsFailure metrics.Counter
}
func NewMetrics ¶
type PeerOperations ¶
type PeerOperations interface {
GetApplicationConfig(cid string) (channelconfig.Application, bool)
GetLedger(cid string) ledger.PeerLedger
}
type PluginEndorser ¶
type PluginEndorser struct {
sync.Mutex
PluginMapper
ChannelStateRetriever
endorsement3.SigningIdentityFetcher
TransientStoreRetriever
// contains filtered or unexported fields
}
func NewPluginEndorser ¶
func NewPluginEndorser(ps *PluginSupport) *PluginEndorser
func (*PluginEndorser) EndorseWithPlugin ¶
func (pe *PluginEndorser) EndorseWithPlugin(pluginName, channelID string, prpBytes []byte, signedProposal *pb.SignedProposal) (*pb.Endorsement, []byte, error)
type PluginMapper ¶
type PluginMapper interface {
PluginFactoryByName(name PluginName) endorsement.PluginFactory
}
type PluginName ¶
type PluginName string
type PluginSupport ¶
type PluginSupport struct {
ChannelStateRetriever
endorsement3.SigningIdentityFetcher
PluginMapper
TransientStoreRetriever
}
type PrivateDataDistributor ¶
type PrivateDataDistributor interface {
DistributePrivateData(channel string, txID string, privateData *transientstore.TxPvtReadWriteSetWithConfigInfo, blkHt uint64) error
}
type PvtRWSetAssembler ¶
type PvtRWSetAssembler interface {
AssemblePvtRWSet(channelName string,
privData *rwset.TxPvtReadWriteSet,
txsim ledger.SimpleQueryExecutor,
deployedCCInfoProvider ledger.DeployedChaincodeInfoProvider) (
*transientstore.TxPvtReadWriteSetWithConfigInfo, error,
)
}
type QueryCreator ¶
type QueryCreator interface {
NewQueryExecutor() (ledger.QueryExecutor, error)
}
type StateContext ¶
type StateContext struct {
transientstore.Store
ledger.QueryExecutor
}
func (*StateContext) GetTransientByTXID ¶
func (sc *StateContext) GetTransientByTXID(txID string) ([]*rwset.TxPvtReadWriteSet, error)
type Store ¶
type Store interface {
transientstore.Store
}
type Support ¶
type Support interface {
identity.SignerSerializer
GetTxSimulator(ledgername string, txid string) (ledger.TxSimulator, error)
GetHistoryQueryExecutor(ledgername string) (ledger.HistoryQueryExecutor, error)
GetTransactionByID(chid, txID string) (*pb.ProcessedTransaction, error)
IsSysCC(name string) bool
Execute(txParams *ccprovider.TransactionParams, name string, input *pb.ChaincodeInput) (*pb.Response, *pb.ChaincodeEvent, error)
ExecuteLegacyInit(txParams *ccprovider.TransactionParams, name, version string, spec *pb.ChaincodeInput) (*pb.Response, *pb.ChaincodeEvent, error)
ChaincodeEndorsementInfo(channelID, chaincodeID string, txsim ledger.QueryExecutor) (*lifecycle.ChaincodeEndorsementInfo, error)
CheckACL(channelID string, signedProp *pb.SignedProposal) error
EndorseWithPlugin(pluginName, channnelID string, prpBytes []byte, signedProposal *pb.SignedProposal) (*pb.Endorsement, []byte, error)
GetLedgerHeight(channelID string) (uint64, error)
GetDeployedCCInfoProvider() ledger.DeployedChaincodeInfoProvider
}
type SupportImpl ¶
type SupportImpl struct {
*PluginEndorser
identity.SignerSerializer
Peer PeerOperations
ChaincodeSupport *chaincode.ChaincodeSupport
ACLProvider aclmgmt.ACLProvider
BuiltinSCCs scc.BuiltinSCCs
}
func (*SupportImpl) ChaincodeEndorsementInfo ¶
func (s *SupportImpl) ChaincodeEndorsementInfo(channelID, chaincodeName string, txsim ledger.QueryExecutor) (*lifecycle.ChaincodeEndorsementInfo, error)
func (*SupportImpl) CheckACL ¶
func (s *SupportImpl) CheckACL(channelID string, signedProp *pb.SignedProposal) error
func (*SupportImpl) Execute ¶
func (s *SupportImpl) Execute(txParams *ccprovider.TransactionParams, name string, input *pb.ChaincodeInput) (*pb.Response, *pb.ChaincodeEvent, error)
func (*SupportImpl) ExecuteLegacyInit ¶
func (s *SupportImpl) ExecuteLegacyInit(txParams *ccprovider.TransactionParams, name, version string, input *pb.ChaincodeInput) (*pb.Response, *pb.ChaincodeEvent, error)
func (*SupportImpl) GetApplicationConfig ¶
func (s *SupportImpl) GetApplicationConfig(cid string) (channelconfig.Application, bool)
func (*SupportImpl) GetDeployedCCInfoProvider ¶
func (s *SupportImpl) GetDeployedCCInfoProvider() ledger.DeployedChaincodeInfoProvider
func (*SupportImpl) GetHistoryQueryExecutor ¶
func (s *SupportImpl) GetHistoryQueryExecutor(ledgername string) (ledger.HistoryQueryExecutor, error)
func (*SupportImpl) GetLedgerHeight ¶
func (s *SupportImpl) GetLedgerHeight(channelID string) (uint64, error)
func (*SupportImpl) GetTransactionByID ¶
func (s *SupportImpl) GetTransactionByID(chid, txID string) (*pb.ProcessedTransaction, error)
func (*SupportImpl) GetTxSimulator ¶
func (s *SupportImpl) GetTxSimulator(ledgername string, txid string) (ledger.TxSimulator, error)
func (*SupportImpl) IsSysCC ¶
func (s *SupportImpl) IsSysCC(name string) bool
func (*SupportImpl) NewQueryCreator ¶
func (s *SupportImpl) NewQueryCreator(channel string) (QueryCreator, error)
func (*SupportImpl) SigningIdentityForRequest ¶
func (s *SupportImpl) SigningIdentityForRequest(*pb.SignedProposal) (endorsement.SigningIdentity, error)
type TransientStoreRetriever ¶
type TransientStoreRetriever interface {
StoreForChannel(channel string) transientstore.Store
}
type UnpackedProposal ¶
type UnpackedProposal struct {
ChaincodeName string
ChannelHeader *cb.ChannelHeader
Input *pb.ChaincodeInput
Proposal *pb.Proposal
SignatureHeader *cb.SignatureHeader
SignedProposal *pb.SignedProposal
ProposalHash []byte
}
func UnpackProposal ¶
func UnpackProposal(signedProp *pb.SignedProposal) (*UnpackedProposal, error)
func (*UnpackedProposal) ChannelID ¶
func (up *UnpackedProposal) ChannelID() string
func (*UnpackedProposal) TxID ¶
func (up *UnpackedProposal) TxID() string
func (*UnpackedProposal) Validate ¶
func (up *UnpackedProposal) Validate(idDeserializer msp.IdentityDeserializer) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.