keccak

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 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 added in v1.5.1

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,
	m Metrics,
	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 Metrics added in v1.8.0

type Metrics interface {
	RecordLargePreimageCount(count int)
}

type Oracle

type Oracle interface {
	VerifierPreimageOracle
	ChallengeTx(ident keccakTypes.LargePreimageIdent, challenge keccakTypes.Challenge) (txmgr.TxCandidate, error)
}

type OracleSource added in v1.7.2

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 added in v1.5.1

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