p2p

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func NewSocketP2PLayer

func NewSocketP2PLayer(config *config.HostConfig, serviceLocator p2pServiceLocator, logger gethlog.Logger, metricReg gethmetrics.Registry) *Service

NewSocketP2PLayer - returns the Socket implementation of the P2P

func (*Service) BroadcastBatches

func (p *Service) BroadcastBatches(batches []*common.ExtBatch) error

func (*Service) HealthStatus

func (p *Service) HealthStatus() host.HealthStatus

func (*Service) RefreshPeerList

func (p *Service) RefreshPeerList()

RefreshPeerList - fetches the latest peer list from L1 and updates the peerAddresses. Note: this is designed to be run in a separate goroutine, it will retry a few times before giving up.

func (*Service) RequestBatchesFromSequencer

func (p *Service) RequestBatchesFromSequencer(fromSeqNo *big.Int) error

func (*Service) RespondToBatchRequest

func (p *Service) RespondToBatchRequest(requestID string, batches []*common.ExtBatch) error

func (*Service) SendTxToSequencer

func (p *Service) SendTxToSequencer(tx common.EncryptedTx) error

func (*Service) Start

func (p *Service) Start() error

func (*Service) Stop

func (p *Service) Stop() error

func (*Service) SubscribeForBatchRequests

func (p *Service) SubscribeForBatchRequests(handler host.P2PBatchRequestHandler) func()

func (*Service) SubscribeForBatches

func (p *Service) SubscribeForBatches(handler host.P2PBatchHandler) func()

func (*Service) SubscribeForTx

func (p *Service) SubscribeForTx(handler host.P2PTxHandler) func()

Jump to

Keyboard shortcuts

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