config

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 6 Imported by: 7

Documentation

Index

Constants

View Source
const (

	// ConfBlockStoreDBType is the config key for the block store database type
	ConfBlockStoreDBType = "ledger.storage.blockStore.dbtype"
	// ConfIDStoreDBType is the config key for the ID store database type
	ConfIDStoreDBType = "ledger.storage.idStore.dbtype"
	// ConfPrivateDataStoreDBType is the config key for the private data store database type
	ConfPrivateDataStoreDBType = "ledger.storage.privateDataStore.dbtype"
	// ConfTransientStoreDBType is the config key for the transient store database type
	ConfTransientStoreDBType = "ledger.storage.transientStore.dbtype"

	// ConfDistributedValidationEnabled indicates whether distributed block validation is enabled.
	ConfDistributedValidationEnabled = "peer.validation.distributed"

	// ConfValidationCommitterTransactionThreshold is the transaction threshold at which the committer will validate the block
	ConfValidationCommitterTransactionThreshold = "peer.validation.transactionThreshold.committer"

	// ConfValidationSinglePeerTransactionThreshold is the transaction threshold at which only a single peer with the validator role will validate the block
	ConfValidationSinglePeerTransactionThreshold = "peer.validation.transactionThreshold.validator"
)

Variables

This section is empty.

Functions

func GetBlockStoreBlockByHashCacheSize added in v0.1.5

func GetBlockStoreBlockByHashCacheSize() uint

GetBlockStoreBlockByHashCacheSize returns the size of the blocks-by-hash cache A value of zero disables the cache.

func GetBlockStoreBlockByNumCacheSize added in v0.1.5

func GetBlockStoreBlockByNumCacheSize() uint

GetBlockStoreBlockByNumCacheSize returns the size of the blocks-by-number cache. A value of zero disables the cache.

func GetConfigUpdatePublisherBufferSize

func GetConfigUpdatePublisherBufferSize() int

GetConfigUpdatePublisherBufferSize returns the size of the config update publisher channel buffer for ledger config update events

func GetDCASBlockLayout added in v0.1.5

func GetDCASBlockLayout() string

GetDCASBlockLayout returns the block layout strategy when creating a Merkle DAG. Supported values are "balanced" and "trickle". Leave empty to use the default.

func GetDCASMaxBlockSize added in v0.1.5

func GetDCASMaxBlockSize() int64

GetDCASMaxBlockSize specifies the maximum size of a block in a Merkle DAG.

func GetDCASMaxLinksPerBlock added in v0.1.5

func GetDCASMaxLinksPerBlock() int

GetDCASMaxLinksPerBlock specifies the maximum number of links there will be per block in a Merkle DAG.

func GetOLCollCacheSize

func GetOLCollCacheSize() int

GetOLCollCacheSize returns the size of the off-ledger cache

func GetOLCollExpirationCheckInterval

func GetOLCollExpirationCheckInterval() time.Duration

GetOLCollExpirationCheckInterval is time when the background routine checks expired collection data in db to cleanup.

func GetOLCollLevelDBPath

func GetOLCollLevelDBPath() string

GetOLCollLevelDBPath returns the filesystem path that is used to maintain the off-ledger level db

func GetOLCollMaxPeersForRetrieval

func GetOLCollMaxPeersForRetrieval() int

GetOLCollMaxPeersForRetrieval returns the number of peers that should be concurrently messaged to retrieve collection data that is not stored locally.

func GetOLCollMaxRetrievalAttempts added in v0.1.4

func GetOLCollMaxRetrievalAttempts() int

GetOLCollMaxRetrievalAttempts returns the maximum number of attempts to retrieve collection data from remote peers. On each attempt, multiple peers are messaged (up to a maximum number given by confOLCollMaxPeersForRetrieval). If not all data is retrieved on an attempt, then a new set of peers is chosen. This process continues until MaxRetrievalAttempts is reached or no more peers are left (that haven't already been attempted).

func GetOLCollPullTimeout

func GetOLCollPullTimeout() time.Duration

GetOLCollPullTimeout is the amount of time a peer waits for a response from another peer for transient data.

func GetPvtDataCacheSize

func GetPvtDataCacheSize() int

GetPvtDataCacheSize returns the number of pvt data per block to keep the in the cache

func GetRoles

func GetRoles() string

GetRoles returns the roles of the peer. Empty return value indicates that the peer has all roles.

func GetStateCacheGossipTimeout added in v0.1.5

func GetStateCacheGossipTimeout() time.Duration

GetStateCacheGossipTimeout is the maximum amount of time to wait for a response from a committer for cache-updates.

func GetStateCacheRetentionSize added in v0.1.5

func GetStateCacheRetentionSize() int

GetStateCacheRetentionSize is the number of cache-updates that a committer should store in cache in order to process cache-updates requests from endorsers.

func GetTransientDataAlwaysPersist added in v0.1.5

func GetTransientDataAlwaysPersist() bool

GetTransientDataAlwaysPersist indicates whether transient data is to always be persisted or persisted only when the cache has exceeded its maximum size

func GetTransientDataCacheSize

func GetTransientDataCacheSize() int

GetTransientDataCacheSize returns the size of the transient data cache

func GetTransientDataExpiredIntervalTime

func GetTransientDataExpiredIntervalTime() time.Duration

GetTransientDataExpiredIntervalTime is time when background routine check expired transient data in db to cleanup.

func GetTransientDataLevelDBPath

func GetTransientDataLevelDBPath() string

GetTransientDataLevelDBPath returns the filesystem path that is used to maintain the transient data level db

func GetTransientDataPullTimeout

func GetTransientDataPullTimeout() time.Duration

GetTransientDataPullTimeout is the amount of time a peer waits for a response from another peer for transient data.

func GetValidationCommitterTransactionThreshold added in v0.1.6

func GetValidationCommitterTransactionThreshold() int

GetValidationCommitterTransactionThreshold returns the transaction threshold at which the committer will validate the block. If the number of transactions is less than this threshold (even if the committer does not have the validator role) it will still validate the block. If set to 0 then the committer won't perform validation unless there are no validators available.

func GetValidationSinglePeerTransactionThreshold added in v0.1.6

func GetValidationSinglePeerTransactionThreshold() int

GetValidationSinglePeerTransactionThreshold returns the transaction threshold at which only a single peer with the validator role will validate the block, i.e. if the number of transactions is less than this threshold then only a single validator is chosen.

func GetValidationWaitTime added in v0.1.6

func GetValidationWaitTime() time.Duration

GetValidationWaitTime is used by the committer in distributed validation and is the minimum time to wait for Tx validation responses from other validators.

func IsDCASRawLeaves added in v0.1.5

func IsDCASRawLeaves() bool

IsDCASRawLeaves indicates whether or not to use raw leaf nodes in a Merkle DAG.

func IsDistributedValidationEnabled added in v0.1.6

func IsDistributedValidationEnabled() bool

IsDistributedValidationEnabled returns true if distributed block validation is enabled.

func IsPrePopulateStateCache added in v0.1.5

func IsPrePopulateStateCache() bool

IsPrePopulateStateCache indicates whether or not the state cache on the endorsing peer should be pre-populated with values retrieved from the committing peer.

func IsSkipCheckForDupTxnID added in v0.1.5

func IsSkipCheckForDupTxnID() bool

IsSkipCheckForDupTxnID indicates whether or not endorsers should skip the check for duplicate transactions IDs. The check would still be performed during validation.

Types

type DBType added in v0.1.4

type DBType = string

DBType is the database type

const (
	// CouchDBType indicates that the storage type is CouchDB
	CouchDBType DBType = "couchdb"
	// LevelDBType indicates that the storage type is LevelDB
	LevelDBType DBType = "leveldb"
	// MemDBType indicates that the storage type is in-memory
	MemDBType DBType = "memory"
)

func GetBlockStoreDBType added in v0.1.4

func GetBlockStoreDBType() DBType

GetBlockStoreDBType returns the type of database that should be used for block storage

func GetIDStoreDBType added in v0.1.4

func GetIDStoreDBType() DBType

GetIDStoreDBType returns the type of database that should be used for ID storage

func GetPrivateDataStoreDBType added in v0.1.4

func GetPrivateDataStoreDBType() DBType

GetPrivateDataStoreDBType returns the type of database that should be used for private data storage

func GetTransientStoreDBType added in v0.1.4

func GetTransientStoreDBType() DBType

GetTransientStoreDBType returns the type of database that should be used for private data transient storage

Directories

Path Synopsis
ledgerconfig
mgr
mocks
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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