Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapabilityProvider ¶
type CapabilityProvider interface { // Capabilities defines the capabilities for the application portion of this channel Capabilities() channelconfig.ApplicationCapabilities }
CapabilityProvider contains functions to retrieve capability information for a channel
type CollectionStore ¶
type CollectionStore interface { privdata.CollectionStore }
CollectionStore is the local interface used to generate mocks for foreign interface.
type Coordinator ¶
type Coordinator interface { // StoreBlock deliver new block with underlined private data // returns missing transaction ids StoreBlock(block *common.Block, data util.PvtDataCollections) error // StorePvtData used to persist private data into transient store StorePvtData(txid string, privData *protostransientstore.TxPvtReadWriteSetWithConfigInfo, blckHeight uint64) error // GetPvtDataAndBlockByNum gets block by number and also returns all related private data // that requesting peer is eligible for. // The order of private data in slice of PvtDataCollections doesn't imply the order of // transactions in the block related to these private data, to get the correct placement // need to read TxPvtData.SeqInBlock field GetPvtDataAndBlockByNum(seqNum uint64, peerAuth protoutil.SignedData) (*common.Block, util.PvtDataCollections, error) // Get recent block sequence number LedgerHeight() (uint64, error) // Close coordinator, shuts down coordinator service Close() }
Coordinator orchestrates the flow of the new blocks arrival and in flight transient data, responsible to complete missing parts of transient data for given block.
func NewCoordinator ¶
func NewCoordinator(mspID string, support Support, store *transientstore.Store, selfSignedData protoutil.SignedData, metrics *metrics.PrivdataMetrics, config CoordinatorConfig, idDeserializerFactory IdentityDeserializerFactory) Coordinator
NewCoordinator creates a new instance of coordinator
type CoordinatorConfig ¶
type CoordinatorConfig struct { // TransientBlockRetention indicates the number of blocks to retain in the transient store // when purging below height on committing every TransientBlockRetention-th block TransientBlockRetention uint64 // PullRetryThreshold indicates the max duration an attempted fetch from a remote peer will retry // for before giving up and leaving the private data as missing PullRetryThreshold time.Duration // SkipPullingInvalidTransactions if true will skip the fetch from remote peer step for transactions // marked as invalid SkipPullingInvalidTransactions bool }
CoordinatorConfig encapsulates the config that is passed to a new coordinator
type Fetcher ¶
type Fetcher interface {
// contains filtered or unexported methods
}
Fetcher interface which defines API to fetch missing private data elements
type Support ¶
type Support struct { ChainID string privdata.CollectionStore txvalidator.Validator committer.Committer Fetcher CapabilityProvider }
Support encapsulates set of interfaces to aggregate required functionality by single struct