geth

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

func ConnectP2P

func ConnectP2P(t *testing.T, node1 *ethclient.Client, node2 *ethclient.Client)

ConnectP2P creates a p2p peer connection between node1 and node2.

func FindBlock added in v1.4.0

func FindBlock(client *ethclient.Client,
	from, to int, timeout time.Duration,
	pred func(*types.Block) (bool, error),
) (*types.Block, error)

FindBlock finds the first block for which the predicate [pred] matches and returns it. It starts at [from] and iterates until [to], inclusively, using the provided [client]. It supports both search directions, forwards and backwards.

func InitL1

func InitL1(chainID uint64, blockTime uint64, genesis *core.Genesis, c clock.Clock, blobPoolDir string, beaconSrv Beacon, opts ...GethOption) (*node.Node, *eth.Ethereum, error)

func InitL2

func InitL2(name string, l2ChainID *big.Int, genesis *core.Genesis, jwtPath string, opts ...GethOption) (*node.Node, *eth.Ethereum, error)

InitL2 inits a L2 geth node.

func WaitForBlock

func WaitForBlock(number *big.Int, client *ethclient.Client, timeout time.Duration) (*types.Block, error)

func WaitForBlockToBeFinalized added in v1.3.0

func WaitForBlockToBeFinalized(number *big.Int, client *ethclient.Client, timeout time.Duration) (*types.Block, error)

func WaitForBlockToBeSafe added in v1.3.0

func WaitForBlockToBeSafe(number *big.Int, client *ethclient.Client, timeout time.Duration) (*types.Block, error)

func WaitForL1OriginOnL2

func WaitForL1OriginOnL2(rollupCfg *rollup.Config, l1BlockNum uint64, client *ethclient.Client, timeout time.Duration) (*types.Block, error)

func WaitForL2Transaction

func WaitForL2Transaction(hash common.Hash, client *ethclient.Client, timeout time.Duration) (*types.Receipt, error)

func WaitForTransaction

func WaitForTransaction(hash common.Hash, client *ethclient.Client, timeout time.Duration) (*types.Receipt, error)

func WithP2P

func WithP2P() func(ethCfg *ethconfig.Config, nodeCfg *node.Config) error

Types

type Beacon added in v1.3.0

type Beacon interface {
	StoreBlobsBundle(slot uint64, bundle *engine.BlobsBundleV1) error
}

type GethOption

type GethOption func(ethCfg *ethconfig.Config, nodeCfg *node.Config) error

Jump to

Keyboard shortcuts

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