protocol

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: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesArrayToVals added in v0.7.3

func BytesArrayToVals(data []byte, valCount uint64) []value.Value

func PathSliceToInt added in v0.8.0

func PathSliceToInt(path []bool) *big.Int

Types

type ChainParams added in v0.8.0

type ChainParams struct {
	StakeRequirement          *big.Int
	StakeToken                common.Address
	GracePeriod               *common.TimeBlocks
	MaxExecutionSteps         uint64
	ArbGasSpeedLimitPerSecond uint64
}

If StakeToken is 0, stake requirement is ETH measured in Wei, otherwise stake requirement is units of stakeStoken

func NewRandomChainParams added in v0.8.0

func NewRandomChainParams() ChainParams

func (ChainParams) Equals added in v0.8.0

func (cp ChainParams) Equals(cp2 ChainParams) bool

func (ChainParams) WithArbGasSpeedLimitPerSecond added in v0.8.0

func (cp ChainParams) WithArbGasSpeedLimitPerSecond(limit uint64) ChainParams

func (ChainParams) WithGracePeriod added in v0.8.0

func (cp ChainParams) WithGracePeriod(period *common.TimeBlocks) ChainParams

func (ChainParams) WithMaxExecutionSteps added in v0.8.0

func (cp ChainParams) WithMaxExecutionSteps(steps uint64) ChainParams

func (ChainParams) WithStakeRequirement added in v0.8.0

func (cp ChainParams) WithStakeRequirement(amount *big.Int) ChainParams

func (ChainParams) WithStakeToken added in v0.8.0

func (cp ChainParams) WithStakeToken(address common.Address) ChainParams

type ExecutionAssertion added in v0.4.0

type ExecutionAssertion struct {
	NumGas                uint64
	InboxMessagesConsumed uint64
	Sends                 [][]byte
	SendAcc               common.Hash
	Logs                  []value.Value
	LogAcc                common.Hash
}

func NewExecutionAssertion added in v0.4.0

func NewExecutionAssertion(
	numGas uint64,
	inboxMessagesConsumed uint64,
	sendsData []byte,
	sendsCount uint64,
	sendAcc common.Hash,
	logsData []byte,
	logsCount uint64,
	logAcc common.Hash,
) *ExecutionAssertion

type MerkleTree added in v0.8.0

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

func NewMerkleTree added in v0.8.0

func NewMerkleTree(elements [][32]byte) *MerkleTree

func (*MerkleTree) GetNode added in v0.8.0

func (m *MerkleTree) GetNode(index int) common.Hash

func (*MerkleTree) GetProof added in v0.8.0

func (m *MerkleTree) GetProof(index int) ([][32]byte, *big.Int)

func (*MerkleTree) GetRoot added in v0.8.0

func (m *MerkleTree) GetRoot() common.Hash

Jump to

Keyboard shortcuts

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