keccak

package
v0.0.0-...-011bec4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 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 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

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

type VerifierPreimageOracle interface {
	fetcher.Oracle
	GetProposalTreeRoot(ctx context.Context, block rpcblock.Block, ident keccakTypes.LargePreimageIdent) (common.Hash, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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