privdata

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: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPuller

func NewPuller(metrics *metrics.PrivdataMetrics, cs privdata.CollectionStore, g gossip,
	dataRetriever PrivateDataRetriever, factory CollectionAccessFactory, channel string, btlPullMargin uint64) *puller

Types

type AppCapabilities

type AppCapabilities interface {
	channelconfig.ApplicationCapabilities
}

type CapabilityProvider

type CapabilityProvider interface {
	Capabilities() channelconfig.ApplicationCapabilities
}

type CollectionAccessFactory

type CollectionAccessFactory interface {
	AccessPolicy(config *common.CollectionConfig, chainID string) (privdata.CollectionAccessPolicy, error)
}

type CollectionStore

type CollectionStore interface {
	privdata.CollectionStore
}

type Committer

type Committer interface {
	committer.Committer
}

type ConfigHistoryRetriever

type ConfigHistoryRetriever interface {
	ledger.ConfigHistoryRetriever
}

type Coordinator

type Coordinator interface {
	StoreBlock(block *common.Block, data util.PvtDataCollections) error

	StorePvtData(txid string, privData *protostransientstore.TxPvtReadWriteSetWithConfigInfo, blckHeight uint64) error

	GetPvtDataAndBlockByNum(seqNum uint64, peerAuth protoutil.SignedData) (*common.Block, util.PvtDataCollections, error)

	LedgerHeight() (uint64, error)

	Close()
}

func NewCoordinator

func NewCoordinator(support Support, selfSignedData protoutil.SignedData, metrics *metrics.PrivdataMetrics,
	config CoordinatorConfig) Coordinator

type CoordinatorConfig

type CoordinatorConfig struct {
	TransientBlockRetention        uint64
	PullRetryThreshold             time.Duration
	SkipPullingInvalidTransactions bool
}

type DataStore

type DataStore interface {
	GetTxPvtRWSetByTxid(txid string, filter ledger.PvtNsCollFilter) (transientstore.RWSetScanner, error)

	GetPvtDataByNum(blockNum uint64, filter ledger.PvtNsCollFilter) ([]*ledger.TxPvtData, error)

	GetConfigHistoryRetriever() (ledger.ConfigHistoryRetriever, error)

	LedgerHeight() (uint64, error)
}

type Fetcher

type Fetcher interface {
	// contains filtered or unexported methods
}

type IdentityDeserializerFactory

type IdentityDeserializerFactory interface {
	GetIdentityDeserializer(chainID string) msp.IdentityDeserializer
}

type IdentityDeserializerFactoryFunc

type IdentityDeserializerFactoryFunc func(chainID string) msp.IdentityDeserializer

func (IdentityDeserializerFactoryFunc) GetIdentityDeserializer

func (i IdentityDeserializerFactoryFunc) GetIdentityDeserializer(chainID string) msp.IdentityDeserializer

type MissingPvtDataTracker

type MissingPvtDataTracker interface {
	ledger.MissingPvtDataTracker
}

type NoOpReconciler

type NoOpReconciler struct {
}

func (*NoOpReconciler) Start

func (*NoOpReconciler) Start()

func (*NoOpReconciler) Stop

func (*NoOpReconciler) Stop()

type PrivateDataRetriever

type PrivateDataRetriever interface {
	CollectionRWSet(dig []*protosgossip.PvtDataDigest, blockNum uint64) (Dig2PvtRWSetWithConfig, bool, error)
}

type PrivdataConfig

type PrivdataConfig struct {
	ReconcileSleepInterval time.Duration

	ReconcileBatchSize int

	ReconciliationEnabled bool
}

func GlobalConfig

func GlobalConfig() *PrivdataConfig

type PvtDataDistributor

type PvtDataDistributor interface {
	Distribute(txID string, privData *transientstore.TxPvtReadWriteSetWithConfigInfo, blkHt uint64) error
}

func NewDistributor

func NewDistributor(chainID string, gossip gossipAdapter, factory CollectionAccessFactory,
	metrics *metrics.PrivdataMetrics, pushAckTimeout time.Duration) PvtDataDistributor

type PvtDataReconciler

type PvtDataReconciler interface {
	Start()

	Stop()
}

type RWSetScanner

type RWSetScanner interface {
	transientstore.RWSetScanner
}

type Reconciler

type Reconciler struct {
	ReconcileSleepInterval time.Duration
	ReconcileBatchSize     int

	ReconciliationFetcher
	committer.Committer
	// contains filtered or unexported fields
}

func NewReconciler

func NewReconciler(channel string, metrics *metrics.PrivdataMetrics, c committer.Committer,
	fetcher ReconciliationFetcher, config *PrivdataConfig) *Reconciler

func (*Reconciler) Start

func (r *Reconciler) Start()

func (*Reconciler) Stop

func (r *Reconciler) Stop()

type ReconciliationFetcher

type ReconciliationFetcher interface {
	FetchReconciledItems(dig2collectionConfig privdatacommon.Dig2CollectionConfig) (*privdatacommon.FetchedPvtDataContainer, error)
}

type StorageDataRetriever

type StorageDataRetriever interface {
	CollectionRWSet(dig []*protosgossip.PvtDataDigest, blockNum uint64) (Dig2PvtRWSetWithConfig, bool, error)
}

func NewDataRetriever

func NewDataRetriever(store DataStore) StorageDataRetriever

type TransientStore

type TransientStore interface {
	Persist(txid string, blockHeight uint64, privateSimulationResultsWithConfig *protostransientstore.TxPvtReadWriteSetWithConfigInfo) error

	GetTxPvtRWSetByTxid(txid string, filter ledger.PvtNsCollFilter) (transientstore.RWSetScanner, error)

	PurgeByTxids(txids []string) error

	PurgeByHeight(maxBlockNumToRetain uint64) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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