genesis

package
v0.9.12 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XNS                        = "XNS"
	FundsDepositName           = "genesis_deposit"
	MigrationDaemonLockup      = 1604102400
	MigrationDaemonVesting     = 1735689600
	MigrationDaemonVestingStep = 2629746
	MigrationDaemonMaturePulse = 1635638400

	EnterpriseLockup      = 0
	EnterpriseVesting     = 10
	EnterpriseVestingStep = 10
	EnterpriseMaturePulse = 0

	FundsLockup      = 0
	FundsVesting     = 10
	FundsVestingStep = 10
	FundsMaturePulse = 0

	NetworkIncentivesLockup      = 1593475200
	NetworkIncentivesVesting     = 315569520
	NetworkIncentivesVestingStep = 2629746
	NetworkIncentivesMaturePulse = 1909008000

	ApplicationIncentivesLockup      = 1593475200
	ApplicationIncentivesVesting     = 315569520
	ApplicationIncentivesVestingStep = 2629746
	ApplicationIncentivesMaturePulse = 1909008000

	FoundationLockup      = 1672444800
	FoundationVesting     = 10
	FoundationVestingStep = 10
	FoundationMaturePulse = 1672444800
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRecord

type BaseRecord struct {
	DB             store.DB
	DropModifier   drop.Modifier
	PulseAppender  insolarPulse.Appender
	PulseAccessor  insolarPulse.Accessor
	RecordModifier object.RecordModifier
	IndexModifier  object.IndexModifier
}

BaseRecord provides methods for genesis base record manipulation.

func (*BaseRecord) Create

func (br *BaseRecord) Create(ctx context.Context) error

Create creates new base genesis record if needed.

func (*BaseRecord) Done

func (br *BaseRecord) Done(ctx context.Context) error

Done saves genesis value. Should be called when all genesis steps finished properly.

func (*BaseRecord) IsGenesisRequired

func (br *BaseRecord) IsGenesisRequired(ctx context.Context) (bool, error)

IsGenesisRequired checks if genesis record already exists.

type DiscoveryNodeManager

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

DiscoveryNodeManager should be created by NewDiscoveryNodeManager.

func NewDiscoveryNodeManager

func NewDiscoveryNodeManager(
	am artifact.Manager,
) *DiscoveryNodeManager

NewDiscoveryNodeManager creates new DiscoveryNodeManager instance.

func (*DiscoveryNodeManager) StoreDiscoveryNodes

func (nm *DiscoveryNodeManager) StoreDiscoveryNodes(ctx context.Context, discoveryNodes []insolar.DiscoveryNodeRegister) error

StoreDiscoveryNodes saves discovery nodes objects and saves discovery nodes index in node domain index. If node domain index not empty this method does nothing.

type Genesis

type Genesis struct {
	ArtifactManager artifact.Manager
	BaseRecord      *BaseRecord

	DiscoveryNodes  []insolar.DiscoveryNodeRegister
	PluginsDir      string
	ContractsConfig insolar.GenesisContractsConfig
}

Genesis holds data and objects required for genesis on heavy node.

func (*Genesis) Start

func (g *Genesis) Start(ctx context.Context) error

Start implements components.Starter.

type Key

type Key struct{}

Key is genesis key.

func (Key) ID

func (Key) ID() []byte

func (Key) Scope

func (Key) Scope() store.Scope

Jump to

Keyboard shortcuts

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