Documentation ¶
Index ¶
- func NewHeartbeatInterceptorProcessor(args ArgHeartbeatInterceptorProcessor) (*heartbeatInterceptorProcessor, error)
- func NewPeerAuthenticationInterceptorProcessor(args ArgPeerAuthenticationInterceptorProcessor) (*peerAuthenticationInterceptorProcessor, error)
- func NewPeerShardInterceptorProcessor(args ArgPeerShardInterceptorProcessor) (*peerShardInterceptorProcessor, error)
- func NewTrieNodeChunksProcessor(arg TrieNodesChunksProcessorArgs) (*trieNodeChunksProcessor, error)
- func NewValidatorInfoInterceptorProcessor(args ArgValidatorInfoInterceptorProcessor) (*validatorInfoInterceptorProcessor, error)
- type ArgHdrInterceptorProcessor
- type ArgHeartbeatInterceptorProcessor
- type ArgMiniblockInterceptorProcessor
- type ArgPeerAuthenticationInterceptorProcessor
- type ArgPeerShardInterceptorProcessor
- type ArgTxInterceptorProcessor
- type ArgValidatorInfoInterceptorProcessor
- type HdrInterceptorProcessor
- func (hip *HdrInterceptorProcessor) IsInterfaceNil() bool
- func (hip *HdrInterceptorProcessor) RegisterHandler(handler func(topic string, hash []byte, data interface{}))
- func (hip *HdrInterceptorProcessor) Save(data process.InterceptedData, _ core.PeerID, topic string) error
- func (hip *HdrInterceptorProcessor) Validate(data process.InterceptedData, _ core.PeerID) error
- type MiniblockInterceptorProcessor
- func (mip *MiniblockInterceptorProcessor) IsInterfaceNil() bool
- func (mip *MiniblockInterceptorProcessor) RegisterHandler(handler func(topic string, hash []byte, data interface{}))
- func (mip *MiniblockInterceptorProcessor) Save(data process.InterceptedData, _ core.PeerID, topic string) error
- func (mip *MiniblockInterceptorProcessor) Validate(_ process.InterceptedData, _ core.PeerID) error
- type TrieNodeInterceptorProcessor
- func (tnip *TrieNodeInterceptorProcessor) IsInterfaceNil() bool
- func (tnip *TrieNodeInterceptorProcessor) RegisterHandler(_ func(topic string, hash []byte, data interface{}))
- func (tnip *TrieNodeInterceptorProcessor) Save(data process.InterceptedData, _ core.PeerID, _ string) error
- func (tnip *TrieNodeInterceptorProcessor) Validate(_ process.InterceptedData, _ core.PeerID) error
- type TrieNodesChunksProcessorArgs
- type TxInterceptorProcessor
- func (txip *TxInterceptorProcessor) IsInterfaceNil() bool
- func (txip *TxInterceptorProcessor) RegisterHandler(_ func(topic string, hash []byte, data interface{}))
- func (txip *TxInterceptorProcessor) Save(data process.InterceptedData, peerOriginator core.PeerID, _ string) error
- func (txip *TxInterceptorProcessor) Validate(data process.InterceptedData, _ core.PeerID) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHeartbeatInterceptorProcessor ¶
func NewHeartbeatInterceptorProcessor(args ArgHeartbeatInterceptorProcessor) (*heartbeatInterceptorProcessor, error)
NewHeartbeatInterceptorProcessor creates a new heartbeatInterceptorProcessor
func NewPeerAuthenticationInterceptorProcessor ¶
func NewPeerAuthenticationInterceptorProcessor(args ArgPeerAuthenticationInterceptorProcessor) (*peerAuthenticationInterceptorProcessor, error)
NewPeerAuthenticationInterceptorProcessor creates a new peerAuthenticationInterceptorProcessor
func NewPeerShardInterceptorProcessor ¶
func NewPeerShardInterceptorProcessor(args ArgPeerShardInterceptorProcessor) (*peerShardInterceptorProcessor, error)
NewPeerShardInterceptorProcessor creates an instance of peerShardInterceptorProcessor
func NewTrieNodeChunksProcessor ¶
func NewTrieNodeChunksProcessor(arg TrieNodesChunksProcessorArgs) (*trieNodeChunksProcessor, error)
NewTrieNodeChunksProcessor creates a new trieNodeChunksProcessor instance
func NewValidatorInfoInterceptorProcessor ¶
func NewValidatorInfoInterceptorProcessor(args ArgValidatorInfoInterceptorProcessor) (*validatorInfoInterceptorProcessor, error)
NewValidatorInfoInterceptorProcessor creates a new validator info interceptor processor
Types ¶
type ArgHdrInterceptorProcessor ¶
type ArgHdrInterceptorProcessor struct { Headers dataRetriever.HeadersPool BlockBlackList process.TimeCacher }
ArgHdrInterceptorProcessor is the argument for the interceptor processor used for headers (shard, meta and so on)
type ArgHeartbeatInterceptorProcessor ¶
type ArgHeartbeatInterceptorProcessor struct { HeartbeatCacher storage.Cacher ShardCoordinator sharding.Coordinator PeerShardMapper process.PeerShardMapper }
ArgHeartbeatInterceptorProcessor is the argument for the interceptor processor used for heartbeat
type ArgMiniblockInterceptorProcessor ¶
type ArgMiniblockInterceptorProcessor struct { MiniblockCache storage.Cacher Marshalizer marshal.Marshalizer Hasher hashing.Hasher ShardCoordinator sharding.Coordinator WhiteListHandler process.WhiteListHandler }
ArgMiniblockInterceptorProcessor is the argument for the interceptor processor used for miniblocks
type ArgPeerAuthenticationInterceptorProcessor ¶
type ArgPeerAuthenticationInterceptorProcessor struct { PeerAuthenticationCacher storage.Cacher PeerShardMapper process.PeerShardMapper Marshaller marshal.Marshalizer HardforkTrigger heartbeat.HardforkTrigger }
ArgPeerAuthenticationInterceptorProcessor is the argument for the interceptor processor used for peer authentication
type ArgPeerShardInterceptorProcessor ¶
type ArgPeerShardInterceptorProcessor struct {
PeerShardMapper process.PeerShardMapper
}
ArgPeerShardInterceptorProcessor is the argument for the interceptor processor used for peer shard message
type ArgTxInterceptorProcessor ¶
type ArgTxInterceptorProcessor struct { ShardedDataCache dataRetriever.ShardedDataCacherNotifier TxValidator process.TxValidator }
ArgTxInterceptorProcessor is the argument for the interceptor processor used for transactions (balance txs, smart contract results, reward and so on)
type ArgValidatorInfoInterceptorProcessor ¶
type ArgValidatorInfoInterceptorProcessor struct {
ValidatorInfoPool dataRetriever.ShardedDataCacherNotifier
}
ArgValidatorInfoInterceptorProcessor is the argument structure used to create a new validator info interceptor processor
type HdrInterceptorProcessor ¶
type HdrInterceptorProcessor struct {
// contains filtered or unexported fields
}
HdrInterceptorProcessor is the processor used when intercepting headers (shard headers, meta headers) structs which satisfy HeaderHandler interface.
func NewHdrInterceptorProcessor ¶
func NewHdrInterceptorProcessor(argument *ArgHdrInterceptorProcessor) (*HdrInterceptorProcessor, error)
NewHdrInterceptorProcessor creates a new TxInterceptorProcessor instance
func (*HdrInterceptorProcessor) IsInterfaceNil ¶
func (hip *HdrInterceptorProcessor) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*HdrInterceptorProcessor) RegisterHandler ¶
func (hip *HdrInterceptorProcessor) RegisterHandler(handler func(topic string, hash []byte, data interface{}))
RegisterHandler registers a callback function to be notified of incoming headers
func (*HdrInterceptorProcessor) Save ¶
func (hip *HdrInterceptorProcessor) Save(data process.InterceptedData, _ core.PeerID, topic string) error
Save will save the received data into the headers cacher as hash<->[plain header structure] and in headersNonces as nonce<->hash
func (*HdrInterceptorProcessor) Validate ¶
func (hip *HdrInterceptorProcessor) Validate(data process.InterceptedData, _ core.PeerID) error
Validate checks if the intercepted data can be processed
type MiniblockInterceptorProcessor ¶
type MiniblockInterceptorProcessor struct {
// contains filtered or unexported fields
}
MiniblockInterceptorProcessor is the processor used when intercepting miniblocks
func NewMiniblockInterceptorProcessor ¶
func NewMiniblockInterceptorProcessor(argument *ArgMiniblockInterceptorProcessor) (*MiniblockInterceptorProcessor, error)
NewMiniblockInterceptorProcessor creates a new MiniblockInterceptorProcessor instance
func (*MiniblockInterceptorProcessor) IsInterfaceNil ¶
func (mip *MiniblockInterceptorProcessor) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MiniblockInterceptorProcessor) RegisterHandler ¶
func (mip *MiniblockInterceptorProcessor) RegisterHandler(handler func(topic string, hash []byte, data interface{}))
RegisterHandler registers a callback function to be notified of incoming miniBlocks
func (*MiniblockInterceptorProcessor) Save ¶
func (mip *MiniblockInterceptorProcessor) Save(data process.InterceptedData, _ core.PeerID, topic string) error
Save will save the received miniblocks inside the miniblock cacher after a new validation round that will be done on each miniblock
func (*MiniblockInterceptorProcessor) Validate ¶
func (mip *MiniblockInterceptorProcessor) Validate(_ process.InterceptedData, _ core.PeerID) error
Validate checks if the intercepted data can be processed It returns nil as a body might consist of multiple miniblocks Since some might be valid and others not, we rather do the checking when we iterate the slice for processing as it is optimal to do so
type TrieNodeInterceptorProcessor ¶
type TrieNodeInterceptorProcessor struct {
// contains filtered or unexported fields
}
TrieNodeInterceptorProcessor is the processor used when intercepting trie nodes
func NewTrieNodesInterceptorProcessor ¶
func NewTrieNodesInterceptorProcessor(interceptedNodes storage.Cacher) (*TrieNodeInterceptorProcessor, error)
NewTrieNodesInterceptorProcessor creates a new instance of TrieNodeInterceptorProcessor
func (*TrieNodeInterceptorProcessor) IsInterfaceNil ¶
func (tnip *TrieNodeInterceptorProcessor) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TrieNodeInterceptorProcessor) RegisterHandler ¶
func (tnip *TrieNodeInterceptorProcessor) RegisterHandler(_ func(topic string, hash []byte, data interface{}))
RegisterHandler registers a callback function to be notified of incoming trie nodes
func (*TrieNodeInterceptorProcessor) Save ¶
func (tnip *TrieNodeInterceptorProcessor) Save(data process.InterceptedData, _ core.PeerID, _ string) error
Save saves the intercepted trie node in the intercepted nodes cacher
func (*TrieNodeInterceptorProcessor) Validate ¶
func (tnip *TrieNodeInterceptorProcessor) Validate(_ process.InterceptedData, _ core.PeerID) error
Validate checks if the intercepted data can be processed
type TrieNodesChunksProcessorArgs ¶
type TrieNodesChunksProcessorArgs struct { Hasher hashing.Hasher ChunksCacher storage.Cacher RequestInterval time.Duration RequestHandler process.RequestHandler Topic string }
TrieNodesChunksProcessorArgs is the argument DTO used in the trieNodeChunksProcessor constructor
type TxInterceptorProcessor ¶
type TxInterceptorProcessor struct {
// contains filtered or unexported fields
}
TxInterceptorProcessor is the processor used when intercepting transactions (smart contract results, receipts, transaction) structs which satisfy TransactionHandler interface.
func NewTxInterceptorProcessor ¶
func NewTxInterceptorProcessor(argument *ArgTxInterceptorProcessor) (*TxInterceptorProcessor, error)
NewTxInterceptorProcessor creates a new TxInterceptorProcessor instance
func (*TxInterceptorProcessor) IsInterfaceNil ¶
func (txip *TxInterceptorProcessor) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TxInterceptorProcessor) RegisterHandler ¶
func (txip *TxInterceptorProcessor) RegisterHandler(_ func(topic string, hash []byte, data interface{}))
RegisterHandler registers a callback function to be notified of incoming transactions
func (*TxInterceptorProcessor) Save ¶
func (txip *TxInterceptorProcessor) Save(data process.InterceptedData, peerOriginator core.PeerID, _ string) error
Save will save the received data into the cacher
func (*TxInterceptorProcessor) Validate ¶
func (txip *TxInterceptorProcessor) Validate(data process.InterceptedData, _ core.PeerID) error
Validate checks if the intercepted data can be processed
Source Files ¶
- argHdrInterceptorProcessor.go
- argMiniblockInterceptorProcessor.go
- argTxInterceptorProcessor.go
- hdrInterceptorProcessor.go
- heartbeatInterceptorProcessor.go
- interface.go
- miniblockInterceptorProcessor.go
- peerAuthenticationInterceptorProcessor.go
- peerShardInterceptorProcessor.go
- trieNodeChunksProcessor.go
- trieNodeInterceptorProcessor.go
- txInterceptorProcessor.go
- validatorInfoInterceptorProcessor.go