governance

package
v0.0.0-...-79ba347 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const ProcessorPoolSize = 1

ProcessorPoolSize limits the pool size for governance Processor. Processor manages governance sync tasks. This process must not be interrupted by other sync operation, so we limit the pool size for the processor to one.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlphabetState

type AlphabetState interface {
	IsAlphabet() bool
}

AlphabetState is a callback interface for innerring global state.

type EpochState

type EpochState interface {
	EpochCounter() uint64
}

EpochState is a callback interface for innerring global state.

type IRFetcher

type IRFetcher interface {
	InnerRingKeys() (keys.PublicKeys, error)
}

IRFetcher is a callback interface for innerring keys. Implementation must take into account availability of the notary contract.

type Params

type Params struct {
	Log *logger.Logger

	AlphabetState AlphabetState
	EpochState    EpochState
	Voter         Voter
	IRFetcher     IRFetcher

	MorphClient   *client.Client
	MainnetClient *client.Client
	FrostFSClient *frostfscontract.Client
	NetmapClient  *nmClient.Client

	NotaryDisabled bool
}

Params of the processor constructor.

type Processor

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

Processor of events related to governance in the network.

func New

func New(p *Params) (*Processor, error)

New creates a balance contract processor instance.

func (*Processor) HandleAlphabetSync

func (gp *Processor) HandleAlphabetSync(e event.Event)

func (*Processor) ListenerNotaryHandlers

func (gp *Processor) ListenerNotaryHandlers() []event.NotaryHandlerInfo

ListenerNotaryHandlers for the 'event.Listener' event producer.

func (*Processor) ListenerNotaryParsers

func (gp *Processor) ListenerNotaryParsers() []event.NotaryParserInfo

ListenerNotaryParsers for the 'event.Listener' event producer.

func (*Processor) ListenerNotificationHandlers

func (gp *Processor) ListenerNotificationHandlers() []event.NotificationHandlerInfo

ListenerNotificationHandlers for the 'event.Listener' event producer.

func (*Processor) ListenerNotificationParsers

func (gp *Processor) ListenerNotificationParsers() []event.NotificationParserInfo

ListenerNotificationParsers for the 'event.Listener' event producer.

func (*Processor) TimersHandlers

func (gp *Processor) TimersHandlers() []event.NotificationHandlerInfo

TimersHandlers for the 'Timers' event producer.

type Sync

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

Sync is an event to start governance synchronization.

func NewSyncEvent

func NewSyncEvent(txHash util.Uint256) Sync

NewSyncEvent creates Sync event that was produced in transaction with txHash hash.

func (Sync) MorphEvent

func (s Sync) MorphEvent()

MorphEvent implements Event interface.

func (Sync) TxHash

func (s Sync) TxHash() util.Uint256

TxHash returns hash of the TX that triggers synchronization process.

type VoteValidatorPrm

type VoteValidatorPrm struct {
	Validators keys.PublicKeys
	Hash       *util.Uint256 // hash of the transaction that triggered voting
}

VoteValidatorPrm groups parameters of the VoteForSidechainValidator operation.

type Voter

type Voter interface {
	VoteForSidechainValidator(VoteValidatorPrm) error
}

Voter is a callback interface for alphabet contract voting.

Jump to

Keyboard shortcuts

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