Documentation ¶
Index ¶
- type Service
- func (p *Service) BroadcastBatches(batches []*common.ExtBatch) error
- func (p *Service) EnsureSubscribedToSequencer()
- func (p *Service) HealthStatus(context.Context) host.HealthStatus
- func (p *Service) RegisterForBroadcasts() error
- func (p *Service) RequestBatchesFromSequencer(fromSeqNo *big.Int) error
- func (p *Service) RespondToBatchRequest(requestID string, batches []*common.ExtBatch) error
- func (p *Service) SendTxToSequencer(tx common.EncryptedTx) error
- func (p *Service) Start() error
- func (p *Service) Stop() error
- func (p *Service) SubscribeForBatchRequests(handler host.P2PBatchRequestHandler) func()
- func (p *Service) SubscribeForBatches(handler host.P2PBatchHandler) func()
- func (p *Service) SubscribeForTx(handler host.P2PTxHandler) func()
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 (*Service) EnsureSubscribedToSequencer ¶ added in v0.24.1
func (p *Service) EnsureSubscribedToSequencer()
EnsureSubscribedToSequencer - validators need to register with the sequencer for broadcasts Note: this should be run **once** in a goroutine, it will re-request registration if we stop receiving broadcasts
func (*Service) HealthStatus ¶
func (p *Service) HealthStatus(context.Context) host.HealthStatus
func (*Service) RegisterForBroadcasts ¶ added in v0.24.1
RegisterForBroadcasts - called by validators to register with the sequencer for broadcasts of batch data etc. Validators will call this again if they stop receiving broadcasts for a period of _maxWaitWithoutBroadcast Sequencer will evict validators from the broadcast pool if sending fails _maxPeerFailures times
func (*Service) RequestBatchesFromSequencer ¶
func (*Service) RespondToBatchRequest ¶
func (*Service) SendTxToSequencer ¶
func (p *Service) SendTxToSequencer(tx common.EncryptedTx) 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()
Click to show internal directories.
Click to hide internal directories.