protocol

package
v1.0.0-alpha.13 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Component *app.Component
)
View Source
var ParamsDatabase = &ParametersDatabase{}

ParamsDatabase contains configuration parameters used by Database.

View Source
var ParamsProtocol = &ParametersProtocol{}

ParamsProtocol contains the configuration parameters used by the Protocol.

View Source
var ParamsRetainer = &ParametersRetainer{}

ParamsRetainer contains configuration parameters used by Retainer.

Functions

This section is empty.

Types

type BaseToken

type BaseToken struct {
	// the base token name
	Name string `default:"Shimmer" usage:"the base token name"`
	// the base token ticker symbol
	TickerSymbol string `default:"SMR" usage:"the base token ticker symbol"`
	// the base token unit
	Unit string `default:"SMR" usage:"the base token unit"`
	// the base token subunit
	Subunit string `default:"glow" usage:"the base token subunit"`
	// the base token amount of decimals
	Decimals uint32 `default:"6" usage:"the base token amount of decimals"`
}

type ParametersDatabase

type ParametersDatabase struct {
	Engine     string `default:"rocksdb" usage:"the used database engine (rocksdb/mapdb)"`
	Path       string `default:"testnet/database" usage:"the path to the database folder"`
	MaxOpenDBs int    `default:"5" usage:"maximum number of open database instances"`

	Pruning struct {
		Threshold uint64 `default:"30" usage:"how many finalized epochs should be retained"`
		Size      struct {
			// Enabled defines whether to delete old block data from the database based on maximum database size
			Enabled bool `default:"true" usage:"whether to delete old block data from the database based on maximum database size"`
			// TargetSize defines the target size of the database
			TargetSize string `default:"30GB" usage:"target size of the database"`
			// ReductionPercentage defines the percentage the database size gets reduced if the target size is reached
			ReductionPercentage float64 `default:"10.0" usage:"the percentage the database size gets reduced if the target size is reached"`
			// CooldownTime defines the cooldown time between two pruning by database size events
			CooldownTime time.Duration `default:"5m" usage:"cooldown time between two pruning by database size events"`
		}
	}
}

ParametersDatabase contains the definition of configuration parameters used by the storage layer.

type ParametersProtocol

type ParametersProtocol struct {
	// Snapshot contains snapshots related configuration parameters.
	Snapshot struct {
		// Path is the path to the snapshot file.
		Path string `default:"testnet/snapshot.bin" usage:"the path of the snapshot file"`
		// Depth defines how many slot diffs are stored in the snapshot, starting from the full ledgerstate.
		Depth int `default:"5" usage:"defines how many slot diffs are stored in the snapshot, starting from the full ledgerstate"`
	}

	CommitmentCheck bool `default:"true" usage:"specifies whether commitment and ledger checks should be enabled"`

	Filter struct {
		// MaxAllowedClockDrift defines the maximum drift our wall clock can have to future blocks being received from the network.
		MaxAllowedClockDrift time.Duration `default:"5s" usage:"the maximum drift our wall clock can have to future blocks being received from the network"`
	}

	ProtocolParametersPath string `default:"testnet/protocol_parameters.json" usage:"the path of the protocol parameters file"`

	BaseToken BaseToken
}

ParametersProtocol contains the definition of the configuration parameters used by the Protocol.

type ParametersRetainer

type ParametersRetainer struct {
	// DebugStoreErrorMessages defines whether to store debug error messages in the database.
	DebugStoreErrorMessages bool `default:"false" usage:"whether to store debug error messages in the database"`
}

ParametersRetainer contains the definition of configuration parameters used by the Retainer.

Jump to

Keyboard shortcuts

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