cmd

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: Apache-2.0 Imports: 58 Imported by: 0

Documentation

Index

Constants

View Source
const StateFileName = "state.cbor"

Variables

View Source
var (
	Opts = &allOptions{}
)

Functions

This section is empty.

Types

type Factory

type Factory interface {
	Logger(cfg *logger.LogConfiguration) (*slog.Logger, error)
	Observability(metrics, traces string) (observability.MeterAndTracer, error)
}

type LoggerFactory

type LoggerFactory func(cfg *logger.LogConfiguration) (*slog.Logger, error)

type MoneyPartition

type MoneyPartition struct {
	// contains filtered or unexported fields
}

func NewMoneyPartition

func NewMoneyPartition() *MoneyPartition

func (*MoneyPartition) CreateTxSystem

func (p *MoneyPartition) CreateTxSystem(flags *ShardNodeRunFlags, nodeConf *partition.NodeConf) (txsystem.TransactionSystem, error)

func (*MoneyPartition) DefaultPartitionParams

func (p *MoneyPartition) DefaultPartitionParams(flags *ShardConfGenerateFlags) map[string]string

func (*MoneyPartition) NewGenesisState

func (p *MoneyPartition) NewGenesisState(pdr *types.PartitionDescriptionRecord) (*state.State, error)

func (*MoneyPartition) PartitionTypeID

func (p *MoneyPartition) PartitionTypeID() types.PartitionTypeID

func (*MoneyPartition) PartitionTypeIDString

func (p *MoneyPartition) PartitionTypeIDString() string

type MoneyPartitionParams

type MoneyPartitionParams struct {
	InitialBillValue          uint64
	InitialBillOwnerPredicate types.PredicateBytes
	DCMoneySupplyValue        uint64 // The initial value for Dust Collector money supply. Total money supply is initial bill + DC money supply.
}

func ParseMoneyPartitionParams

func ParseMoneyPartitionParams(shardConf *types.PartitionDescriptionRecord) (*MoneyPartitionParams, error)

type Observability

type Observability interface {
	Tracer(name string, options ...trace.TracerOption) trace.Tracer
	TracerProvider() trace.TracerProvider
	Meter(name string, opts ...metric.MeterOption) metric.Meter
	PrometheusRegisterer() prometheus.Registerer
	Shutdown() error
	Logger() *slog.Logger
	RoundLogger(func() uint64) *slog.Logger
}

type Option

type Option func(*Options)

type Options

type Options struct {
	// contains filtered or unexported fields
}

type OrchestrationPartition

type OrchestrationPartition struct {
	// contains filtered or unexported fields
}

func NewOrchestrationPartition

func NewOrchestrationPartition() *OrchestrationPartition

func (*OrchestrationPartition) CreateTxSystem

func (*OrchestrationPartition) DefaultPartitionParams

func (p *OrchestrationPartition) DefaultPartitionParams(flags *ShardConfGenerateFlags) map[string]string

func (*OrchestrationPartition) NewGenesisState

func (*OrchestrationPartition) PartitionTypeID

func (p *OrchestrationPartition) PartitionTypeID() types.PartitionTypeID

func (*OrchestrationPartition) PartitionTypeIDString

func (p *OrchestrationPartition) PartitionTypeIDString() string

type OrchestrationPartitionParams

type OrchestrationPartitionParams struct {
	OwnerPredicate types.PredicateBytes // the Proof-of-Authority owner predicate
}

func ParseOrchestrationPartitionParams

func ParseOrchestrationPartitionParams(shardConf *types.PartitionDescriptionRecord) (*OrchestrationPartitionParams, error)

type Partition

type Partition interface {
	PartitionTypeID() types.PartitionTypeID
	PartitionTypeIDString() string
	DefaultPartitionParams(flags *ShardConfGenerateFlags) map[string]string
	NewGenesisState(pdr *types.PartitionDescriptionRecord) (*state.State, error)
	CreateTxSystem(flags *ShardNodeRunFlags, nodeConf *partition.NodeConf) (txsystem.TransactionSystem, error)
}

type ShardConfGenerateFlags

type ShardConfGenerateFlags struct {
	NetworkID       uint16
	PartitionID     uint32
	PartitionTypeID uint32
	ShardID         string
	Epoch           uint64
	EpochStart      uint64
	NodeInfoFiles   []string

	MoneyInitialBillOwnerPredicate string
	TokensAdminOwnerPredicate      string
	TokensFeelessMode              bool
	OrchestrationOwnerPredicate    string
	// contains filtered or unexported fields
}

func (ShardConfGenerateFlags) LoggerCfgFilename

func (r ShardConfGenerateFlags) LoggerCfgFilename() string

LoggerCfgFilename always returns non-empty filename - either the value of the flag set by user or default cfg location. The flag will be assigned the default filename (ie without path) if user doesn't specify that flag.

func (ShardConfGenerateFlags) PathWithDefault

func (r ShardConfGenerateFlags) PathWithDefault(path string, defaultFileName string) string

type ShardNodeRunFlags

type ShardNodeRunFlags struct {
	StateFile      string
	BlockStoreFile string
	ProofStoreFile string
	ShardStoreFile string

	WithOwnerIndex bool
	WithGetUnits   bool

	LedgerReplicationMaxBlocksFetch uint64
	LedgerReplicationMaxBlocks      uint64
	LedgerReplicationMaxTx          uint32
	LedgerReplicationTimeoutMs      uint32
	BlockSubscriptionTimeoutMs      uint32
	T1TimeoutMs                     uint32
	// contains filtered or unexported fields
}

func (ShardNodeRunFlags) LoggerCfgFilename

func (r ShardNodeRunFlags) LoggerCfgFilename() string

LoggerCfgFilename always returns non-empty filename - either the value of the flag set by user or default cfg location. The flag will be assigned the default filename (ie without path) if user doesn't specify that flag.

func (ShardNodeRunFlags) PathWithDefault

func (r ShardNodeRunFlags) PathWithDefault(path string, defaultFileName string) string

type TokensPartition

type TokensPartition struct {
	// contains filtered or unexported fields
}

func NewTokensPartition

func NewTokensPartition() *TokensPartition

func (*TokensPartition) CreateTxSystem

func (p *TokensPartition) CreateTxSystem(flags *ShardNodeRunFlags, nodeConf *partition.NodeConf) (txsystem.TransactionSystem, error)

func (*TokensPartition) DefaultPartitionParams

func (p *TokensPartition) DefaultPartitionParams(flags *ShardConfGenerateFlags) map[string]string

func (*TokensPartition) NewGenesisState

func (p *TokensPartition) NewGenesisState(pdr *types.PartitionDescriptionRecord) (*state.State, error)

func (*TokensPartition) PartitionTypeID

func (p *TokensPartition) PartitionTypeID() types.PartitionTypeID

func (*TokensPartition) PartitionTypeIDString

func (p *TokensPartition) PartitionTypeIDString() string

type TokensPartitionParams

type TokensPartitionParams struct {
	AdminOwnerPredicate types.PredicateBytes // the admin owner predicate for permissioned mode
	FeelessMode         bool                 // if true then fees are not charged (applies only in permissioned mode)
}

func ParseTokensPartitionParams

func ParseTokensPartitionParams(shardConf *types.PartitionDescriptionRecord) (*TokensPartitionParams, error)

type UnicityBFTApp

type UnicityBFTApp struct {
	// contains filtered or unexported fields
}

func New

func New(obsF Factory, opts ...interface{}) *UnicityBFTApp

func (*UnicityBFTApp) AddSubcommands

func (a *UnicityBFTApp) AddSubcommands(opts []interface{})

func (*UnicityBFTApp) Execute

func (a *UnicityBFTApp) Execute(ctx context.Context) (err error)

Execute runs the application

func (*UnicityBFTApp) RegisterPartition

func (a *UnicityBFTApp) RegisterPartition(partition Partition) error

Jump to

Keyboard shortcuts

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