fault

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 16 Imported by: 0

README

Fault Monitor

The fault monitor checks for changes in output roots posted to the L2OutputOracle contract. On change, reconstructing the output root from a trusted L2 source and looking for a match

OPTIONS:
   --l1.node.url value             [$FAULT_MON_L1_NODE_URL]         Node URL of L1 peer (default: "127.0.0.1:8545")
   --l2.node.url value             [$FAULT_MON_L2_NODE_URL]         Node URL of L2 peer (default: "127.0.0.1:9545")
   --start.output.index value      [$FAULT_MON_START_OUTPUT_INDEX]  Output index to start from. -1 to find first unfinalized index (default: -1)
   --optimismportal.address value  [$FAULT_MON_OPTIMISM_PORTAL]     Address of the OptimismPortal contract

On mismatch the isCurrentlyMismatched metrics is set to 1.

Documentation

Index

Constants

View Source
const (
	L1NodeURLFlagName = "l1.node.url"
	L2NodeURLFlagName = "l2.node.url"

	OptimismPortalAddressFlagName = "optimismportal.address"
	StartOutputIndexFlagName      = "start.output.index"
)
View Source
const (
	MetricsNamespace = "fault_detector"
)

Variables

This section is empty.

Functions

func CLIFlags

func CLIFlags(envVar string) []cli.Flag

Types

type CLIConfig

type CLIConfig struct {
	L1NodeURL string
	L2NodeURL string

	OptimismPortalAddress common.Address
	StartOutputIndex      int64
}

func ReadCLIFlags

func ReadCLIFlags(ctx *cli.Context) (CLIConfig, error)

type Monitor

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

func NewMonitor

func NewMonitor(ctx context.Context, log log.Logger, m metrics.Factory, cfg CLIConfig) (*Monitor, error)

func (*Monitor) Close

func (m *Monitor) Close(_ context.Context) error

func (*Monitor) Run

func (m *Monitor) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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