Documentation ¶
Index ¶
- type Cache
- type CachingExecutionLayer
- func (e *CachingExecutionLayer) ForEachNode(closure ForEachNodeClosure) error
- func (e *CachingExecutionLayer) ForEachOdaoNode(closure ForEachNodeClosure) error
- func (e *CachingExecutionLayer) GetRPInfo(pubkey rptypes.ValidatorPubkey) (*RPInfo, error)
- func (e *CachingExecutionLayer) Init() error
- func (e *CachingExecutionLayer) REthAddress() *common.Address
- func (e *CachingExecutionLayer) Start() error
- func (e *CachingExecutionLayer) Stop()
- type ExecutionLayer
- type ForEachNodeClosure
- type MapsCache
- type NotFoundError
- type RPInfo
- type SqliteCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 NotFoundError ¶
type NotFoundError struct{}
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
type SqliteCache ¶
type SqliteCache struct { Path string // contains filtered or unexported fields }