rolluptest

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EvilMachine

type EvilMachine struct {
	*cmachine.Machine
}

evil machine is like a regular machine, except it returns a wrong hash w/ probability 1/8, repeatably this is useful for testing challenge functionality

func NewEvilMachine

func NewEvilMachine(machine *cmachine.Machine) *EvilMachine

func (EvilMachine) Clone

func (e EvilMachine) Clone() machine.Machine

func (EvilMachine) ExecuteAssertion

func (e EvilMachine) ExecuteAssertion(
	maxSteps uint64,
	inboxMessages []inbox.InboxMessage,
	maxWallTime time.Duration,
) (*protocol.ExecutionAssertion, uint64)

func (EvilMachine) ExecuteSideloadedAssertion

func (e EvilMachine) ExecuteSideloadedAssertion(
	maxSteps uint64,
	inboxMessages []inbox.InboxMessage,
	sideloadValue *value.TupleValue,
	maxWallTime time.Duration,
) (*protocol.ExecutionAssertion, uint64)

func (EvilMachine) Hash

func (e EvilMachine) Hash() common.Hash

type EvilRollupCheckpointer

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

func NewEvilRollupCheckpointer

func NewEvilRollupCheckpointer(
	rollupAddr common.Address,
	databasePath string,
	maxReorgDepth *big.Int,
	forceFreshStart bool,
) (*EvilRollupCheckpointer, error)

func (EvilRollupCheckpointer) AsyncSaveCheckpoint

func (e EvilRollupCheckpointer) AsyncSaveCheckpoint(blockId *common.BlockId, contents []byte, cpCtx *ckptcontext.CheckpointContext) <-chan error

func (EvilRollupCheckpointer) GetInitialMachine

func (e EvilRollupCheckpointer) GetInitialMachine(vc machine.ValueCache) (machine.Machine, error)

func (EvilRollupCheckpointer) GetMachine

func (EvilRollupCheckpointer) GetValue

func (EvilRollupCheckpointer) HasCheckpointedState

func (e EvilRollupCheckpointer) HasCheckpointedState() bool

func (*EvilRollupCheckpointer) Initialize

func (e *EvilRollupCheckpointer) Initialize(arbitrumCodeFilePath string) error

func (*EvilRollupCheckpointer) Initialized

func (e *EvilRollupCheckpointer) Initialized() bool

func (EvilRollupCheckpointer) MaxReorgHeight

func (e EvilRollupCheckpointer) MaxReorgHeight() *big.Int

func (EvilRollupCheckpointer) RestoreLatestState

func (e EvilRollupCheckpointer) RestoreLatestState(
	ctx context.Context,
	clnt arbbridge.ChainTimeGetter,
	unmarshalFunc func([]byte, ckptcontext.RestoreContext, *common.BlockId) error,
) error

Jump to

Keyboard shortcuts

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