consensusModule

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HashConsensusHelper

type HashConsensusHelper struct {
	ReportContract ReportContract

	KeyTransactOpts *bind.TransactOpts
}

func (*HashConsensusHelper) GetLastData

func (v *HashConsensusHelper) GetLastData(ctx context.Context) (*big.Int, *MemberInfo, error)

func (*HashConsensusHelper) GetMemberInfo

func (v *HashConsensusHelper) GetMemberInfo(ctx context.Context) (*MemberInfo, error)

func (*HashConsensusHelper) GetRefSlotAndIsReport

func (v *HashConsensusHelper) GetRefSlotAndIsReport(ctx context.Context) (*big.Int, bool, error)

func (*HashConsensusHelper) ProcessReportHash

func (v *HashConsensusHelper) ProcessReportHash(ctx context.Context, dataHash [32]byte, refSlot, consensusVersion *big.Int) error

type MemberInfo

type MemberInfo struct {
	IsReportMember              bool
	IsFastLane                  bool
	LastReportRefSlot           *big.Int
	FastLaneLengthSlot          *big.Int
	CurrentFrameRefSlot         *big.Int
	DeadlineSlot                *big.Int
	CurrentFrameMemberReport    [32]byte
	CurrentFrameConsensusReport [32]byte
}

type ReportContract

type ReportContract interface {
	GetConsensusContractAddress(ctx context.Context) (common.Address, error)

	GetConsensusContract(ctx context.Context) (*hashConsensus.HashConsensus, error)

	CheckContractVersions(ctx context.Context) error

	IsContractReportable(ctx context.Context) (bool, error)

	IsMainDataSubmitted(ctx context.Context) (bool, error)
}

Jump to

Keyboard shortcuts

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