challenge

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Challenger

type Challenger struct {
	// contains filtered or unexported fields
}

func NewChallenger

func NewChallenger(challenge *ethbridge.Challenge, lookup core.ArbCoreLookup, challengedNode *core.NodeInfo, stakerAddress common.Address) *Challenger

func (*Challenger) ChallengeAddress

func (c *Challenger) ChallengeAddress() common.Address

func (*Challenger) HandleConflict

func (c *Challenger) HandleConflict(ctx context.Context) error

type DivergenceInfo

type DivergenceInfo struct {
	DifferentIndex   int
	SegmentSteps     *big.Int
	EndIsUnreachable bool
}

type ExecutionImpl

type ExecutionImpl struct {
}

func (*ExecutionImpl) Bisect

func (e *ExecutionImpl) Bisect(
	ctx context.Context,
	challenge *ethbridge.Challenge,
	prevBisection *core.Bisection,
	segmentToChallenge int,
	inconsistentSegment *core.ChallengeSegment,
	subCuts []core.Cut,
) error

func (*ExecutionImpl) FindFirstDivergence

func (e *ExecutionImpl) FindFirstDivergence(lookup core.ArbCoreLookup, assertion *core.Assertion, offsets []*big.Int, cuts []core.Cut) (DivergenceInfo, error)

func (*ExecutionImpl) GetCuts

func (e *ExecutionImpl) GetCuts(lookup core.ArbCoreLookup, assertion *core.Assertion, offsets []*big.Int) ([]core.Cut, error)

func (*ExecutionImpl) OneStepProof

func (e *ExecutionImpl) OneStepProof(
	ctx context.Context,
	challenge *ethbridge.Challenge,
	lookup core.ArbCoreLookup,
	assertion *core.Assertion,
	prevBisection *core.Bisection,
	segmentToChallenge int,
	challengedSegment *core.ChallengeSegment,
) error

func (*ExecutionImpl) ProveContinuedExecution

func (e *ExecutionImpl) ProveContinuedExecution(
	ctx context.Context,
	challenge *ethbridge.Challenge,
	lookup core.ArbCoreLookup,
	assertion *core.Assertion,
	prevBisection *core.Bisection,
	segmentToChallenge int,
	challengedSegment *core.ChallengeSegment,
) error

func (*ExecutionImpl) SegmentTarget

func (e *ExecutionImpl) SegmentTarget() int

type FaultConfig

type FaultConfig struct {
	DistortMachineAtGas *big.Int
	MessagesReadCap     *big.Int
	PhantomMessageAtGas *big.Int
	StallMachineAt      *big.Int
}

type FaultyCore

type FaultyCore struct {
	core.ArbCore
	// contains filtered or unexported fields
}

func NewFaultyCore

func NewFaultyCore(core core.ArbCore, config FaultConfig) FaultyCore

func (FaultyCore) AdvanceExecutionCursor

func (c FaultyCore) AdvanceExecutionCursor(executionCursor core.ExecutionCursor, maxGas *big.Int, goOverGas bool) error

func (FaultyCore) GetExecutionCursor

func (c FaultyCore) GetExecutionCursor(totalGasUsed *big.Int) (core.ExecutionCursor, error)

func (FaultyCore) TakeMachine

func (c FaultyCore) TakeMachine(executionCursor core.ExecutionCursor) (machine.Machine, error)

type FaultyExecutionCursor

type FaultyExecutionCursor struct {
	core.ExecutionCursor
	// contains filtered or unexported fields
}

func (FaultyExecutionCursor) Clone

func (FaultyExecutionCursor) MachineHash

func (e FaultyExecutionCursor) MachineHash() (common.Hash, error)

func (FaultyExecutionCursor) TotalGasConsumed

func (e FaultyExecutionCursor) TotalGasConsumed() *big.Int

func (FaultyExecutionCursor) TotalMessagesRead

func (e FaultyExecutionCursor) TotalMessagesRead() *big.Int

Jump to

Keyboard shortcuts

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