executor

package
v0.0.1-RC3 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: GPL-3.0 Imports: 10 Imported by: 5

Documentation

Index

Constants

View Source
const (
	// ERROR_UNSPECIFIED indicates the execution ended successfully
	ERROR_UNSPECIFIED int32 = iota
	// ERROR_NO_ERROR indicates the execution ended successfully
	ERROR_NO_ERROR
	// ERROR_OUT_OF_GAS indicates there is not enough balance to continue the execution
	ERROR_OUT_OF_GAS
	// ERROR_STACK_OVERFLOW indicates a stack overflow has happened
	ERROR_STACK_OVERFLOW
	// ERROR_STACK_UNDERFLOW indicates a stack overflow has happened
	ERROR_STACK_UNDERFLOW
	// ERROR_NOT_ENOUGH_FUNDS indicates there is not enough funds to continue the execution
	ERROR_NOT_ENOUGH_FUNDS
	// ERROR_INSUFFICIENT_BALANCE indicates there is not enough balance to continue the execution
	ERROR_INSUFFICIENT_BALANCE
	// ERROR_CODE_NOT_FOUND indicates the code was not found
	ERROR_CODE_NOT_FOUND
	// ERROR_MAX_CODE_SIZE_EXCEEDED indicates the code size is beyond the maximum
	ERROR_MAX_CODE_SIZE_EXCEEDED
	// ERROR_CONTRACT_ADDRESS_COLLISION there is a collision regarding contract addresses
	ERROR_CONTRACT_ADDRESS_COLLISION
	// ERROR_DEPTH indicates the maximum call depth has been passed
	ERROR_DEPTH
	// ERROR_EXECUTION_REVERTED indicates the execution has been reverted
	ERROR_EXECUTION_REVERTED
	// ERROR_CODE_STORE_OUT_OF_GAS indicates there is not enough gas for the storage
	ERROR_CODE_STORE_OUT_OF_GAS
	// ERROR_OUT_OF_COUNTERS_STEP indicates there is not enough step counters to continue the execution
	ERROR_OUT_OF_COUNTERS_STEP
	// ERROR_OUT_OF_COUNTERS_KECCAK indicates there is not enough keccak counters to continue the execution
	ERROR_OUT_OF_COUNTERS_KECCAK
	// ERROR_OUT_OF_COUNTERS_BINARY indicates there is not enough binary counters to continue the execution
	ERROR_OUT_OF_COUNTERS_BINARY
	// ERROR_OUT_OF_COUNTERS_MEM indicates there is not enough memory aligncounters to continue the execution
	ERROR_OUT_OF_COUNTERS_MEM
	// ERROR_OUT_OF_COUNTERS_ARITH indicates there is not enough arith counters to continue the execution
	ERROR_OUT_OF_COUNTERS_ARITH
	// ERROR_OUT_OF_COUNTERS_PADDING indicates there is not enough padding counters to continue the execution
	ERROR_OUT_OF_COUNTERS_PADDING
	// ERROR_OUT_OF_COUNTERS_POSEIDON indicates there is not enough poseidon counters to continue the execution
	ERROR_OUT_OF_COUNTERS_POSEIDON
	// ERROR_INVALID_TX indicates the transaction is invalid because of invalid jump dest, invalid opcode, invalid deploy
	// or invalid static tx
	ERROR_INVALID_TX
	// ERROR_INTRINSIC_INVALID_SIGNATURE indicates the transaction is failing at the signature intrinsic check
	ERROR_INTRINSIC_INVALID_SIGNATURE
	// ERROR_INTRINSIC_INVALID_CHAIN_ID indicates the transaction is failing at the chain id intrinsic check
	ERROR_INTRINSIC_INVALID_CHAIN_ID
	// ERROR_INTRINSIC_INVALID_NONCE indicates the transaction is failing at the nonce intrinsic check
	ERROR_INTRINSIC_INVALID_NONCE
	// ERROR_INTRINSIC_INVALID_GAS_LIMIT indicates the transaction is failing at the gas limit intrinsic check
	ERROR_INTRINSIC_INVALID_GAS_LIMIT
	// ERROR_INTRINSIC_INVALID_BALANCE indicates the transaction is failing at balance intrinsic check
	ERROR_INTRINSIC_INVALID_BALANCE
	// ERROR_INTRINSIC_INVALID_BATCH_GAS_LIMIT indicates the batch is exceeding the batch gas limit
	ERROR_INTRINSIC_INVALID_BATCH_GAS_LIMIT
	// ERROR_INTRINSIC_INVALID_SENDER_CODE indicates the batch is exceeding the batch gas limit
	ERROR_INTRINSIC_INVALID_SENDER_CODE
	// ERROR_BATCH_DATA_TOO_BIG indicates the batch_l2_data is too big to be processed
	ERROR_BATCH_DATA_TOO_BIG
)

Variables

This section is empty.

Functions

func Err

func Err(errorCode pb.Error) error

Err returns an instance of error related to the ExecutorError

func ErrorCode

func ErrorCode(err error) pb.Error

ErrorCode returns the error code for a given error

func IsIntrinsicError

func IsIntrinsicError(error pb.Error) bool

IsIntrinsicError indicates if the error is due to a intrinsic check

func IsOutOfCountersError

func IsOutOfCountersError(error pb.Error) bool

IsOutOfCountersError indicates if the error is an OOC

func NewExecutorClient

NewExecutorClient is the executor client constructor.

Types

type Config

type Config struct {
	URI string `mapstructure:"URI"`
}

Config represents the configuration of the executor server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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