Documentation ¶
Index ¶
- func IsProvingWindowExpired(metadata metadata.TaikoBlockMetaData, tiers []*rpc.TierProviderTierWithID) (bool, time.Time, time.Duration, error)
- type AssignmentExpiredEventHandler
- type AssignmentExpiredHandler
- type BlockProposedEventHandler
- type BlockProposedGuaridanEventHandler
- type BlockProposedHandler
- type BlockVerifiedEventHandler
- type BlockVerifiedHandler
- type NewBlockProposedEventHandlerOps
- type NewBlockProposedGuardianEventHandlerOps
- type TransitionContestedEventHandler
- type TransitionContestedHandler
- type TransitionProvedEventHandler
- type TransitionProvedHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsProvingWindowExpired ¶
func IsProvingWindowExpired( metadata metadata.TaikoBlockMetaData, tiers []*rpc.TierProviderTierWithID, ) (bool, time.Time, time.Duration, error)
IsProvingWindowExpired returns true as the first return parameter if the assigned prover proving window of the given proposed block is expired, and the second return parameter is the time remaining til proving window is expired.
Types ¶
type AssignmentExpiredEventHandler ¶
type AssignmentExpiredEventHandler struct {
// contains filtered or unexported fields
}
AssignmentExpiredEventHandler is responsible for handling the expiration of proof assignments.
func NewAssignmentExpiredEventHandler ¶
func NewAssignmentExpiredEventHandler( rpc *rpc.Client, proverAddress common.Address, proverSetAddress common.Address, proofSubmissionCh chan *proofProducer.ProofRequestBody, proofContestCh chan *proofProducer.ContestRequestBody, contesterMode bool, isGuardian bool, ) *AssignmentExpiredEventHandler
NewAssignmentExpiredEventHandler creates a new AssignmentExpiredEventHandler instance.
func (*AssignmentExpiredEventHandler) Handle ¶
func (h *AssignmentExpiredEventHandler) Handle( ctx context.Context, meta metadata.TaikoBlockMetaData, ) error
Handle implements the AssignmentExpiredHandler interface.
type AssignmentExpiredHandler ¶
type AssignmentExpiredHandler interface {
Handle(ctx context.Context, meta metadata.TaikoBlockMetaData) error
}
AssignmentExpiredHandler is the interface for handling the proof assignment expiration.
type BlockProposedEventHandler ¶
type BlockProposedEventHandler struct {
// contains filtered or unexported fields
}
BlockProposedEventHandler is responsible for handling the BlockProposed event as a prover.
func NewBlockProposedEventHandler ¶
func NewBlockProposedEventHandler(opts *NewBlockProposedEventHandlerOps) *BlockProposedEventHandler
NewBlockProposedEventHandler creates a new BlockProposedEventHandler instance.
func (*BlockProposedEventHandler) Handle ¶
func (h *BlockProposedEventHandler) Handle( ctx context.Context, meta metadata.TaikoBlockMetaData, end eventIterator.EndBlockProposedEventIterFunc, ) error
Handle implements the BlockProposedHandler interface.
type BlockProposedGuaridanEventHandler ¶
type BlockProposedGuaridanEventHandler struct { *BlockProposedEventHandler GuardianProverHeartbeater guardianProverHeartbeater.BlockSenderHeartbeater }
BlockProposedGuaridanEventHandler is responsible for handling the BlockProposed event as a guardian prover.
func NewBlockProposedEventGuardianHandler ¶
func NewBlockProposedEventGuardianHandler( opts *NewBlockProposedGuardianEventHandlerOps, ) *BlockProposedGuaridanEventHandler
NewBlockProposedEventGuardianHandler creates a new BlockProposedEventHandler instance.
func (*BlockProposedGuaridanEventHandler) Handle ¶
func (h *BlockProposedGuaridanEventHandler) Handle( ctx context.Context, meta metadata.TaikoBlockMetaData, end eventIterator.EndBlockProposedEventIterFunc, ) error
Handle implements the BlockProposedHandler interface.
type BlockProposedHandler ¶
type BlockProposedHandler interface { Handle(ctx context.Context, meta metadata.TaikoBlockMetaData, end eventIterator.EndBlockProposedEventIterFunc, ) error }
BlockProposedHandler is the interface for handling `TaikoL1.BlockProposed` events.
type BlockVerifiedEventHandler ¶
type BlockVerifiedEventHandler struct {
// contains filtered or unexported fields
}
BlockVerifiedEventHandler is responsible for handling the BlockVerified event.
func NewBlockVerifiedEventHandler ¶
func NewBlockVerifiedEventHandler(guardianProverAddress common.Address) *BlockVerifiedEventHandler
NewBlockVerifiedEventHandler creates a new BlockVerifiedEventHandler instance.
func (*BlockVerifiedEventHandler) Handle ¶
func (h *BlockVerifiedEventHandler) Handle(e *bindings.TaikoL1ClientBlockVerifiedV2)
Handle handles the BlockVerified event.
type BlockVerifiedHandler ¶
type BlockVerifiedHandler interface {
Handle(e *bindings.TaikoL1ClientBlockVerifiedV2)
}
BlockVerifiedHandler is the interface for handling `TaikoL1.BlockVerifiedV2` events.
type NewBlockProposedEventHandlerOps ¶
type NewBlockProposedEventHandlerOps struct { ProverAddress common.Address ProverSetAddress common.Address RPC *rpc.Client ProofGenerationCh chan *proofProducer.ProofWithHeader AssignmentExpiredCh chan metadata.TaikoBlockMetaData ProofSubmissionCh chan *proofProducer.ProofRequestBody ProofContestCh chan *proofProducer.ContestRequestBody BackOffRetryInterval time.Duration BackOffMaxRetrys uint64 ContesterMode bool ProveUnassignedBlocks bool }
NewBlockProposedEventHandlerOps is the options for creating a new BlockProposedEventHandler.
type NewBlockProposedGuardianEventHandlerOps ¶
type NewBlockProposedGuardianEventHandlerOps struct { *NewBlockProposedEventHandlerOps GuardianProverHeartbeater guardianProverHeartbeater.BlockSenderHeartbeater }
NewBlockProposedGuardianEventHandlerOps is the options for creating a new BlockProposedEventHandler.
type TransitionContestedEventHandler ¶
type TransitionContestedEventHandler struct {
// contains filtered or unexported fields
}
TransitionContestedEventHandler is responsible for handling the TransitionContested event.
func NewTransitionContestedEventHandler ¶
func NewTransitionContestedEventHandler( rpc *rpc.Client, proofSubmissionCh chan *proofProducer.ProofRequestBody, contesterMode bool, ) *TransitionContestedEventHandler
NewTransitionContestedEventHandler creates a new TransitionContestedEventHandler instance.
func (*TransitionContestedEventHandler) Handle ¶
func (h *TransitionContestedEventHandler) Handle( ctx context.Context, e *bindings.TaikoL1ClientTransitionContestedV2, ) error
Handle implements the TransitionContestedHandler interface.
type TransitionContestedHandler ¶
type TransitionContestedHandler interface {
Handle(ctx context.Context, event *bindings.TaikoL1ClientTransitionContestedV2) error
}
TransitionContestedHandler is the interface for handling `TaikoL1.TransitionContestedV2` events.
type TransitionProvedEventHandler ¶
type TransitionProvedEventHandler struct {
// contains filtered or unexported fields
}
TransitionProvedEventHandler is responsible for handling the TransitionProved event.
func NewTransitionProvedEventHandler ¶
func NewTransitionProvedEventHandler( rpc *rpc.Client, proofContestCh chan *proofProducer.ContestRequestBody, proofSubmissionCh chan *proofProducer.ProofRequestBody, contesterMode bool, isGuardian bool, ) *TransitionProvedEventHandler
NewTransitionProvedEventHandler creates a new TransitionProvedEventHandler instance.
func (*TransitionProvedEventHandler) Handle ¶
func (h *TransitionProvedEventHandler) Handle( ctx context.Context, e *bindings.TaikoL1ClientTransitionProvedV2, ) error
Handle implements the TransitionProvedHandler interface.
type TransitionProvedHandler ¶
type TransitionProvedHandler interface {
Handle(ctx context.Context, event *bindings.TaikoL1ClientTransitionProvedV2) error
}
TransitionProvedHandler is the interface for handling `TaikoL1.TransitionProvedV2` events.