Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChallengeMetrics ¶
type ChallengeMetrics interface { RecordPreimageChallenged() RecordPreimageChallengeFailed() }
type Challenger ¶
type Challenger interface {
Challenge(ctx context.Context, blockHash common.Hash, oracle Oracle, preimages []keccakTypes.LargePreimageMetaData) error
}
type Fetcher ¶
type Fetcher interface {
FetchInputs(ctx context.Context, blockHash common.Hash, oracle fetcher.Oracle, ident keccakTypes.LargePreimageIdent) ([]keccakTypes.InputData, error)
}
type LargePreimageScheduler ¶
type LargePreimageScheduler struct {
// contains filtered or unexported fields
}
func NewLargePreimageScheduler ¶
func NewLargePreimageScheduler( logger log.Logger, cl faultTypes.ClockReader, oracleSource OracleSource, challenger Challenger) *LargePreimageScheduler
func (*LargePreimageScheduler) Close ¶
func (s *LargePreimageScheduler) Close() error
func (*LargePreimageScheduler) Schedule ¶
func (s *LargePreimageScheduler) Schedule(blockHash common.Hash, _ uint64) error
func (*LargePreimageScheduler) Start ¶
func (s *LargePreimageScheduler) Start(ctx context.Context)
type Oracle ¶
type Oracle interface { VerifierPreimageOracle ChallengeTx(ident keccakTypes.LargePreimageIdent, challenge keccakTypes.Challenge) (txmgr.TxCandidate, error) }
type OracleSource ¶
type OracleSource interface {
Oracles() []keccakTypes.LargePreimageOracle
}
type PreimageChallenger ¶
type PreimageChallenger struct {
// contains filtered or unexported fields
}
func NewPreimageChallenger ¶
func NewPreimageChallenger(logger log.Logger, metrics ChallengeMetrics, verifier Verifier, sender Sender) *PreimageChallenger
func (*PreimageChallenger) Challenge ¶
func (c *PreimageChallenger) Challenge(ctx context.Context, blockHash common.Hash, oracle Oracle, preimages []keccakTypes.LargePreimageMetaData) error
type PreimageVerifier ¶
type PreimageVerifier struct {
// contains filtered or unexported fields
}
func NewPreimageVerifier ¶
func NewPreimageVerifier(logger log.Logger, fetcher Fetcher) *PreimageVerifier
func (*PreimageVerifier) CreateChallenge ¶
func (v *PreimageVerifier) CreateChallenge(ctx context.Context, blockHash common.Hash, oracle VerifierPreimageOracle, preimage keccakTypes.LargePreimageMetaData) (keccakTypes.Challenge, error)
type Sender ¶
type Sender interface {
SendAndWaitSimple(txPurpose string, txs ...txmgr.TxCandidate) error
}
type Verifier ¶
type Verifier interface {
CreateChallenge(ctx context.Context, blockHash common.Hash, oracle VerifierPreimageOracle, preimage keccakTypes.LargePreimageMetaData) (keccakTypes.Challenge, error)
}
type VerifierPreimageOracle ¶
Click to show internal directories.
Click to hide internal directories.