opnode

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: MIT Imports: 15 Imported by: 9

README

opnode

This is the reference implementation of the rollup-node spec.

Compiling

From the repository root:

go build -o op ./op-node/cmd
go test ./op-node/...

Running

Options can be reviewed with:

./op --help

To start syncing the rollup:

Connect to at least one L1 RPC and L2 execution engine:

Initialize the L2 chain with a genesis.json chain spec like L1, with the Merge fork activated from genesis.

Specify genesis details:

  • L1 number / hash: starting-point of L2 chain inputs
  • L2 genesis hash: to confirm we are building on the correct L2 genesis
# websockets or IPC preferred for event notifications to improve sync, http RPC works with adaptive polling.
op \
  --l1=ws://localhost:8546 --l2=ws//localhost:9001 \
  --genesis.l1-num=.... --genesis.l1-hash=..... --genesis.l2-hash=....

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig(ctx *cli.Context, log log.Logger) (*node.Config, error)

NewConfig creates a Config from the provided flags or environment variables.

func NewDriverConfig

func NewDriverConfig(ctx *cli.Context) (*driver.Config, error)

func NewL1EndpointConfig

func NewL1EndpointConfig(ctx *cli.Context) (*node.L1EndpointConfig, error)

func NewL2EndpointConfig

func NewL2EndpointConfig(ctx *cli.Context, log log.Logger) (*node.L2EndpointConfig, error)

func NewLogConfig

func NewLogConfig(ctx *cli.Context) (node.LogConfig, error)

NewLogConfig creates a log config from the provided flags or environment variables.

func NewRollupConfig

func NewRollupConfig(ctx *cli.Context) (*rollup.Config, error)

func NewSnapshotLogger

func NewSnapshotLogger(ctx *cli.Context) (log.Logger, error)

Types

This section is empty.

Directories

Path Synopsis
cmd
p2p
derive
Package derive provides the data transformation functions that take L1 data and turn it into L2 blocks and results.
Package derive provides the data transformation functions that take L1 data and turn it into L2 blocks and results.
sync
The sync package is responsible for reconciling L1 and L2.
The sync package is responsible for reconciling L1 and L2.
sources
Package testlog provides a log handler for unit tests.
Package testlog provides a log handler for unit tests.

Jump to

Keyboard shortcuts

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