rolluptest

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 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 added in v0.7.0

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 added in v0.6.0

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

func NewEvilRollupCheckpointer added in v0.6.0

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

func (EvilRollupCheckpointer) AsyncSaveCheckpoint added in v0.6.0

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

func (EvilRollupCheckpointer) GetInitialMachine added in v0.6.0

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

func (EvilRollupCheckpointer) GetMachine added in v0.6.0

func (EvilRollupCheckpointer) GetValue added in v0.6.0

func (EvilRollupCheckpointer) HasCheckpointedState added in v0.6.0

func (e EvilRollupCheckpointer) HasCheckpointedState() bool

func (*EvilRollupCheckpointer) Initialize added in v0.7.0

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

func (*EvilRollupCheckpointer) Initialized added in v0.7.0

func (e *EvilRollupCheckpointer) Initialized() bool

func (EvilRollupCheckpointer) MaxReorgHeight added in v0.6.5

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

func (EvilRollupCheckpointer) RestoreLatestState added in v0.6.0

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