executionlayer

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: AGPL-3.0-or-later Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	// contains filtered or unexported methods
}

type CachingExecutionLayer

type CachingExecutionLayer struct {
	// Fields passed in by the constructor which are later referenced
	Logger            *zap.Logger
	ECURL             *url.URL
	RocketStorageAddr string

	// Somewhere to store chain data we care about
	CachePath string
	// contains filtered or unexported fields
}

CachingExecutionLayer is a bespoke execution layer client for the rescue proxy. It abstracts away all the work to cache in-memory the data needed to enforce that fee recipients are 'correct'.

func (*CachingExecutionLayer) ForEachNode

func (e *CachingExecutionLayer) ForEachNode(closure ForEachNodeClosure) error

ForEachNode calls the provided closure with the address of every rocket pool node the ExecutionLayer has observed

func (*CachingExecutionLayer) ForEachOdaoNode

func (e *CachingExecutionLayer) ForEachOdaoNode(closure ForEachNodeClosure) error

ForEachOdaoNode calls the provided closure with the address of every odao node the ExecutionLayer has observed

func (*CachingExecutionLayer) GetRPInfo

func (e *CachingExecutionLayer) GetRPInfo(pubkey rptypes.ValidatorPubkey) (*RPInfo, error)

GetRPInfo returns the expected fee recipient and node address for a validator, or nil if the validator is not a minipool

func (*CachingExecutionLayer) Init

func (e *CachingExecutionLayer) Init() error

Init creates and warms up the ExecutionLayer cache.

func (*CachingExecutionLayer) REthAddress

func (e *CachingExecutionLayer) REthAddress() *common.Address

REthAddress is a convenience function to get the rEth contract address

func (*CachingExecutionLayer) Start

func (e *CachingExecutionLayer) Start() error

func (*CachingExecutionLayer) Stop

func (e *CachingExecutionLayer) Stop()

Stop shuts down this ExecutionLayer

type ExecutionLayer

type ExecutionLayer interface {
	ForEachNode(ForEachNodeClosure) error
	ForEachOdaoNode(ForEachNodeClosure) error
	GetRPInfo(rptypes.ValidatorPubkey) (*RPInfo, error)
	REthAddress() *common.Address
}

ExecutionLayer is the abstract interface which provides the rescue proxy with all the data needed to enforce fee recipients are 'correct'.

type ForEachNodeClosure

type ForEachNodeClosure func(common.Address) bool

type MapsCache

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

type NotFoundError

type NotFoundError struct{}

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

type RPInfo

type RPInfo struct {
	ExpectedFeeRecipient *common.Address
	NodeAddress          common.Address
}

type SqliteCache

type SqliteCache struct {
	Path string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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