instruction

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(votingCfg *config.Voting, teeID common.Address, privKey *ecdsa.PrivateKey, policiesChan <-chan policy.SigningPolicy, aq *queue.ActionQueues, meta meta.Meta) Service

func (*Service) Forward

func (s *Service) Forward(ctx context.Context) error

Forward listens to the out channel and enqueues received actions.

func (*Service) ListenToPolicies

func (s *Service) ListenToPolicies(ctx context.Context) error

ListenToPolicies listens to policy channel and creates a new round when a new policy arrives.

func (*Service) Run

func (s *Service) Run(ctx context.Context)

func (*Service) ServeInstruction

func (s *Service) ServeInstruction(_ context.Context, i *instruction.Instruction) (*pkgvoting.Receipt, error)

ServeInstruction accepts instruction, processes it, and returns the receipt.

It checks that:

  • correct teeID is set
  • has a valid opType, opCommand pair

Additional checks are done by the voting storage.

func (*Service) Statuses

func (s *Service) Statuses(instructionID common.Hash, rewardEpochID uint32) (*pkgvoting.Statuses, error)

Statuses returns the statuses for instructionID if it is present in the given rewardEpochID.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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