Documentation ¶
Index ¶
- type ArgHdrInterceptorProcessor
- type ArgMiniblockInterceptorProcessor
- type ArgTxInterceptorProcessor
- type HdrInterceptorProcessor
- func (hip *HdrInterceptorProcessor) IsInterfaceNil() bool
- func (hip *HdrInterceptorProcessor) Save(data process.InterceptedData, _ p2p.PeerID) error
- func (hip *HdrInterceptorProcessor) SignalEndOfProcessing(data []process.InterceptedData)
- func (hip *HdrInterceptorProcessor) Validate(data process.InterceptedData, _ p2p.PeerID) error
- type InterceptedTransactionHandler
- type MiniblockInterceptorProcessor
- func (mip *MiniblockInterceptorProcessor) IsInterfaceNil() bool
- func (mip *MiniblockInterceptorProcessor) Save(data process.InterceptedData, _ p2p.PeerID) error
- func (mip *MiniblockInterceptorProcessor) SignalEndOfProcessing(_ []process.InterceptedData)
- func (mip *MiniblockInterceptorProcessor) Validate(_ process.InterceptedData, _ p2p.PeerID) error
- type ShardedPool
- type TrieNodeInterceptorProcessor
- func (tnip *TrieNodeInterceptorProcessor) IsInterfaceNil() bool
- func (tnip *TrieNodeInterceptorProcessor) Save(data process.InterceptedData, _ p2p.PeerID) error
- func (tnip *TrieNodeInterceptorProcessor) SignalEndOfProcessing(data []process.InterceptedData)
- func (tnip *TrieNodeInterceptorProcessor) Validate(data process.InterceptedData, _ p2p.PeerID) error
- type TxInterceptorProcessor
- func (txip *TxInterceptorProcessor) IsInterfaceNil() bool
- func (txip *TxInterceptorProcessor) Save(data process.InterceptedData, _ p2p.PeerID) error
- func (txip *TxInterceptorProcessor) SignalEndOfProcessing(_ []process.InterceptedData)
- func (txip *TxInterceptorProcessor) Validate(data process.InterceptedData, _ p2p.PeerID) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgHdrInterceptorProcessor ¶
type ArgHdrInterceptorProcessor struct { Headers dataRetriever.HeadersPool HdrValidator process.HeaderValidator BlackList process.BlackListHandler }
ArgHdrInterceptorProcessor is the argument for the interceptor processor used for headers (shard, meta and so on)
type ArgMiniblockInterceptorProcessor ¶ added in v1.0.104
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 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 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) Save ¶
func (hip *HdrInterceptorProcessor) Save(data process.InterceptedData, _ p2p.PeerID) error
Save will save the received data into the headers cacher as hash<->[plain header structure] and in headersNonces as nonce<->hash
func (*HdrInterceptorProcessor) SignalEndOfProcessing ¶
func (hip *HdrInterceptorProcessor) SignalEndOfProcessing(data []process.InterceptedData)
SignalEndOfProcessing signals the end of processing
func (*HdrInterceptorProcessor) Validate ¶
func (hip *HdrInterceptorProcessor) Validate(data process.InterceptedData, _ p2p.PeerID) error
Validate checks if the intercepted data can be processed
type InterceptedTransactionHandler ¶
type InterceptedTransactionHandler interface { SenderShardId() uint32 ReceiverShardId() uint32 Nonce() uint64 SenderAddress() state.AddressContainer Fee() *big.Int Transaction() data.TransactionHandler }
InterceptedTransactionHandler defines an intercepted data wrapper over transaction handler that has receiver and sender shard getters
type MiniblockInterceptorProcessor ¶ added in v1.0.104
type MiniblockInterceptorProcessor struct {
// contains filtered or unexported fields
}
MiniblockInterceptorProcessor is the processor used when intercepting miniblocks
func NewMiniblockInterceptorProcessor ¶ added in v1.0.104
func NewMiniblockInterceptorProcessor(argument *ArgMiniblockInterceptorProcessor) (*MiniblockInterceptorProcessor, error)
NewMiniblockInterceptorProcessor creates a new MiniblockInterceptorProcessor instance
func (*MiniblockInterceptorProcessor) IsInterfaceNil ¶ added in v1.0.104
func (mip *MiniblockInterceptorProcessor) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MiniblockInterceptorProcessor) Save ¶ added in v1.0.104
func (mip *MiniblockInterceptorProcessor) Save(data process.InterceptedData, _ p2p.PeerID) 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) SignalEndOfProcessing ¶ added in v1.0.104
func (mip *MiniblockInterceptorProcessor) SignalEndOfProcessing(_ []process.InterceptedData)
SignalEndOfProcessing signals the end of processing
func (*MiniblockInterceptorProcessor) Validate ¶ added in v1.0.104
func (mip *MiniblockInterceptorProcessor) Validate(_ process.InterceptedData, _ p2p.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 ShardedPool ¶
ShardedPool is a perspective of the sharded data pool
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) Save ¶
func (tnip *TrieNodeInterceptorProcessor) Save(data process.InterceptedData, _ p2p.PeerID) error
Save saves the intercepted trie node in the intercepted nodes cacher
func (*TrieNodeInterceptorProcessor) SignalEndOfProcessing ¶
func (tnip *TrieNodeInterceptorProcessor) SignalEndOfProcessing(data []process.InterceptedData)
SignalEndOfProcessing signals the end of processing
func (*TrieNodeInterceptorProcessor) Validate ¶
func (tnip *TrieNodeInterceptorProcessor) Validate(data process.InterceptedData, _ p2p.PeerID) error
Validate checks if the intercepted data can be processed
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) Save ¶
func (txip *TxInterceptorProcessor) Save(data process.InterceptedData, _ p2p.PeerID) error
Save will save the received data into the cacher
func (*TxInterceptorProcessor) SignalEndOfProcessing ¶
func (txip *TxInterceptorProcessor) SignalEndOfProcessing(_ []process.InterceptedData)
SignalEndOfProcessing signals the end of processing
func (*TxInterceptorProcessor) Validate ¶
func (txip *TxInterceptorProcessor) Validate(data process.InterceptedData, _ p2p.PeerID) error
Validate checks if the intercepted data can be processed