challenges

package
v0.7.4-0...-66d0465 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContinueChallenge

func ContinueChallenge(typeReq ExecutionChallengeInfo) bool

Types

type AssertionDefender

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

func NewAssertionDefender

func NewAssertionDefender(numSteps uint64, initState machine.Machine, inbox *structures.MessageStack, assertion *valprotocol.ExecutionAssertionStub) AssertionDefender

func (AssertionDefender) AssertionStub

func (AssertionDefender) MoveDefender

func (AssertionDefender) NBisect

func (ad AssertionDefender) NBisect(slices uint64) []AssertionDefender

func (AssertionDefender) NumSteps

func (ad AssertionDefender) NumSteps() uint64

func (AssertionDefender) SolidityOneStepProof

func (ad AssertionDefender) SolidityOneStepProof() ([]byte, *inbox.InboxMessage, error)

type ChallengeState

type ChallengeState uint8
const (
	ChallengeContinuing ChallengeState = iota
	ChallengeAsserterWon
	ChallengeAsserterTimedOut
	ChallengeChallengerTimedOut
	ChallengerDiscontinued
	DefenderDiscontinued
)

func ChallengeExecutionClaim

func ChallengeExecutionClaim(
	ctx context.Context,
	client arbbridge.ArbAuthClient,
	address common.Address,
	startBlockId *common.BlockId,
	startLogIndex uint,
	inboxStack *structures.MessageStack,
	numSteps uint64,
	startMachine machine.Machine,
	beforeInboxHash common.Hash,
	challengeEverything bool,
	challengeType ExecutionChallengeInfo,
) (ChallengeState, error)

func ChallengeInboxTopClaim

func ChallengeInboxTopClaim(
	ctx context.Context,
	client arbbridge.ArbAuthClient,
	challengeAddress common.Address,
	startBlockId *common.BlockId,
	startLogIndex uint,
	inbox *structures.MessageStack,
	challengeEverything bool,
) (ChallengeState, error)

func DefendExecutionClaim

func DefendExecutionClaim(
	ctx context.Context,
	client arbbridge.ArbAuthClient,
	address common.Address,
	startBlockId *common.BlockId,
	startLogIndex uint,
	startMachine machine.Machine,
	assertion *valprotocol.ExecutionAssertionStub,
	inboxStack *structures.MessageStack,
	numSteps uint64,
	bisectionCount uint32,
	challengeType ExecutionChallengeInfo,
) (ChallengeState, error)

func DefendInboxTopClaim

func DefendInboxTopClaim(
	ctx context.Context,
	client arbbridge.ArbAuthClient,
	challengeAddress common.Address,
	startBlockId *common.BlockId,
	startLogIndex uint,
	inbox *structures.MessageStack,
	inboxTopInitial common.Hash,
	messageCount *big.Int,
	bisectionCount uint64,
) (ChallengeState, error)

type ExecutionChallengeInfo

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

func StandardExecutionChallenge

func StandardExecutionChallenge() ExecutionChallengeInfo

Jump to

Keyboard shortcuts

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