consensusModule

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomSleepTime added in v0.0.6

func RandomSleepTime() time.Duration

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) GetModuleId added in v0.1.0

func (v *HashConsensusHelper) GetModuleId(oracleAddress common.Address) (*big.Int, error)

func (*HashConsensusHelper) GetRefSlotAndIsReport

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

func (*HashConsensusHelper) IsModuleReport added in v0.1.0

func (v *HashConsensusHelper) IsModuleReport(module, slot *big.Int) (bool, error)

func (*HashConsensusHelper) ProcessReportHash

func (v *HashConsensusHelper) ProcessReportHash(
	ctx context.Context,
	dataHash [][32]byte,
	refSlot *big.Int,
	withdrawOracleReportData *withdrawOracle.WithdrawOracleReportData,
	largeStakeReportData *largeStakeOracle.LargeStakeOracleReportData,
) error

type MemberInfo

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

type ReportContract

type ReportContract interface {
	GetReportAsyncProcessorAddress() (common.Address, error)

	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)

	GetLastProcessingRefSlot(ctx context.Context) (*big.Int, error)
}

Jump to

Keyboard shortcuts

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