Documentation ¶
Index ¶
- func NewMiniblockResolver(arg ArgMiniblockResolver) (*miniblockResolver, error)
- type ArgHeaderResolver
- type ArgMiniblockResolver
- type ArgTrieNodeResolver
- type ArgTxResolver
- type HeaderResolver
- func (hdrRes *HeaderResolver) Close() error
- func (hdrRes *HeaderResolver) IsInterfaceNil() bool
- func (hdrRes *HeaderResolver) NumPeersToQuery() (int, int)
- func (hdrRes *HeaderResolver) ProcessReceivedMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
- func (hdrRes *HeaderResolver) RequestDataFromEpoch(identifier []byte) error
- func (hdrRes *HeaderResolver) RequestDataFromHash(hash []byte, epoch uint32) error
- func (hdrRes *HeaderResolver) RequestDataFromNonce(nonce uint64, epoch uint32) error
- func (hdrRes *HeaderResolver) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error
- func (hdrRes *HeaderResolver) SetNumPeersToQuery(intra int, cross int)
- func (hdrRes *HeaderResolver) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
- type TrieNodeResolver
- func (tnRes *TrieNodeResolver) Close() error
- func (tnRes *TrieNodeResolver) IsInterfaceNil() bool
- func (tnRes *TrieNodeResolver) NumPeersToQuery() (int, int)
- func (tnRes *TrieNodeResolver) ProcessReceivedMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
- func (tnRes *TrieNodeResolver) RequestDataFromHash(hash []byte, _ uint32) error
- func (tnRes *TrieNodeResolver) RequestDataFromHashArray(hashes [][]byte, _ uint32) error
- func (tnRes *TrieNodeResolver) RequestDataFromReferenceAndChunk(hash []byte, chunkIndex uint32) error
- func (tnRes *TrieNodeResolver) SetNumPeersToQuery(intra int, cross int)
- func (tnRes *TrieNodeResolver) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
- type TxResolver
- func (txRes *TxResolver) Close() error
- func (txRes *TxResolver) IsInterfaceNil() bool
- func (txRes *TxResolver) NumPeersToQuery() (int, int)
- func (txRes *TxResolver) ProcessReceivedMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
- func (txRes *TxResolver) RequestDataFromHash(hash []byte, epoch uint32) error
- func (txRes *TxResolver) RequestDataFromHashArray(hashes [][]byte, epoch uint32) error
- func (txRes *TxResolver) SetNumPeersToQuery(intra int, cross int)
- func (txRes *TxResolver) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMiniblockResolver ¶ added in v1.0.104
func NewMiniblockResolver(arg ArgMiniblockResolver) (*miniblockResolver, error)
NewMiniblockResolver creates a miniblock resolver
Types ¶
type ArgHeaderResolver ¶
type ArgHeaderResolver struct { SenderResolver dataRetriever.TopicResolverSender Headers dataRetriever.HeadersPool HdrStorage storage.Storer HeadersNoncesStorage storage.Storer Marshalizer marshal.Marshalizer NonceConverter typeConverters.Uint64ByteSliceConverter ShardCoordinator sharding.Coordinator AntifloodHandler dataRetriever.P2PAntifloodHandler Throttler dataRetriever.ResolverThrottler IsFullHistoryNode bool }
ArgHeaderResolver is the argument structure used to create new HeaderResolver instance
type ArgMiniblockResolver ¶ added in v1.0.104
type ArgMiniblockResolver struct { SenderResolver dataRetriever.TopicResolverSender MiniBlockPool storage.Cacher MiniBlockStorage storage.Storer Marshalizer marshal.Marshalizer AntifloodHandler dataRetriever.P2PAntifloodHandler Throttler dataRetriever.ResolverThrottler DataPacker dataRetriever.DataPacker IsFullHistoryNode bool }
ArgMiniblockResolver is the argument structure used to create a new miniblockResolver instance
type ArgTrieNodeResolver ¶
type ArgTrieNodeResolver struct { SenderResolver dataRetriever.TopicResolverSender TrieDataGetter dataRetriever.TrieDataGetter Marshalizer marshal.Marshalizer AntifloodHandler dataRetriever.P2PAntifloodHandler Throttler dataRetriever.ResolverThrottler }
ArgTrieNodeResolver is the argument structure used to create new TrieNodeResolver instance
type ArgTxResolver ¶
type ArgTxResolver struct { SenderResolver dataRetriever.TopicResolverSender TxPool dataRetriever.ShardedDataCacherNotifier TxStorage storage.Storer Marshalizer marshal.Marshalizer DataPacker dataRetriever.DataPacker AntifloodHandler dataRetriever.P2PAntifloodHandler Throttler dataRetriever.ResolverThrottler IsFullHistoryNode bool }
ArgTxResolver is the argument structure used to create new TxResolver instance
type HeaderResolver ¶
type HeaderResolver struct { dataRetriever.TopicResolverSender // contains filtered or unexported fields }
HeaderResolver is a wrapper over Resolver that is specialized in resolving headers requests
func NewHeaderResolver ¶
func NewHeaderResolver(arg ArgHeaderResolver) (*HeaderResolver, error)
NewHeaderResolver creates a new header resolver
func (*HeaderResolver) Close ¶ added in v1.2.0
func (hdrRes *HeaderResolver) Close() error
Close returns nil
func (*HeaderResolver) IsInterfaceNil ¶
func (hdrRes *HeaderResolver) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*HeaderResolver) NumPeersToQuery ¶ added in v1.0.110
func (hdrRes *HeaderResolver) NumPeersToQuery() (int, int)
NumPeersToQuery will return the number of intra shard and cross shard number of peer to query
func (*HeaderResolver) ProcessReceivedMessage ¶
func (hdrRes *HeaderResolver) ProcessReceivedMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
ProcessReceivedMessage will be the callback func from the p2p.Messenger and will be called each time a new message was received (for the topic this validator was registered to, usually a request topic)
func (*HeaderResolver) RequestDataFromEpoch ¶
func (hdrRes *HeaderResolver) RequestDataFromEpoch(identifier []byte) error
RequestDataFromEpoch requests a header from other peers having input the epoch
func (*HeaderResolver) RequestDataFromHash ¶
func (hdrRes *HeaderResolver) RequestDataFromHash(hash []byte, epoch uint32) error
RequestDataFromHash requests a header from other peers having input the hdr hash
func (*HeaderResolver) RequestDataFromNonce ¶
func (hdrRes *HeaderResolver) RequestDataFromNonce(nonce uint64, epoch uint32) error
RequestDataFromNonce requests a header from other peers having input the hdr nonce
func (*HeaderResolver) SetEpochHandler ¶
func (hdrRes *HeaderResolver) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error
SetEpochHandler sets the epoch handler for this component
func (*HeaderResolver) SetNumPeersToQuery ¶ added in v1.0.102
func (hdrRes *HeaderResolver) SetNumPeersToQuery(intra int, cross int)
SetNumPeersToQuery will set the number of intra shard and cross shard number of peer to query
func (*HeaderResolver) SetResolverDebugHandler ¶ added in v1.0.110
func (hdrRes *HeaderResolver) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
SetResolverDebugHandler will set a resolver debug handler
type TrieNodeResolver ¶
type TrieNodeResolver struct { dataRetriever.TopicResolverSender // contains filtered or unexported fields }
TrieNodeResolver is a wrapper over Resolver that is specialized in resolving trie node requests
func NewTrieNodeResolver ¶
func NewTrieNodeResolver(arg ArgTrieNodeResolver) (*TrieNodeResolver, error)
NewTrieNodeResolver creates a new trie node resolver
func (*TrieNodeResolver) Close ¶ added in v1.2.0
func (tnRes *TrieNodeResolver) Close() error
Close returns nil
func (*TrieNodeResolver) IsInterfaceNil ¶
func (tnRes *TrieNodeResolver) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TrieNodeResolver) NumPeersToQuery ¶ added in v1.0.110
func (tnRes *TrieNodeResolver) NumPeersToQuery() (int, int)
NumPeersToQuery will return the number of intra shard and cross shard number of peer to query
func (*TrieNodeResolver) ProcessReceivedMessage ¶
func (tnRes *TrieNodeResolver) ProcessReceivedMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
ProcessReceivedMessage will be the callback func from the p2p.Messenger and will be called each time a new message was received (for the topic this validator was registered to, usually a request topic)
func (*TrieNodeResolver) RequestDataFromHash ¶
func (tnRes *TrieNodeResolver) RequestDataFromHash(hash []byte, _ uint32) error
RequestDataFromHash requests trie nodes from other peers having input a trie node hash
func (*TrieNodeResolver) RequestDataFromHashArray ¶ added in v1.0.110
func (tnRes *TrieNodeResolver) RequestDataFromHashArray(hashes [][]byte, _ uint32) error
RequestDataFromHashArray requests trie nodes from other peers having input multiple trie node hashes
func (*TrieNodeResolver) RequestDataFromReferenceAndChunk ¶ added in v1.2.4
func (tnRes *TrieNodeResolver) RequestDataFromReferenceAndChunk(hash []byte, chunkIndex uint32) error
RequestDataFromReferenceAndChunk requests a trie node's chunk by specifying the reference and the chunk index
func (*TrieNodeResolver) SetNumPeersToQuery ¶ added in v1.0.102
func (tnRes *TrieNodeResolver) SetNumPeersToQuery(intra int, cross int)
SetNumPeersToQuery will set the number of intra shard and cross shard number of peer to query
func (*TrieNodeResolver) SetResolverDebugHandler ¶ added in v1.0.110
func (tnRes *TrieNodeResolver) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
SetResolverDebugHandler will set a resolver debug handler
type TxResolver ¶
type TxResolver struct { dataRetriever.TopicResolverSender // contains filtered or unexported fields }
TxResolver is a wrapper over Resolver that is specialized in resolving transaction requests
func NewTxResolver ¶
func NewTxResolver(arg ArgTxResolver) (*TxResolver, error)
NewTxResolver creates a new transaction resolver
func (*TxResolver) IsInterfaceNil ¶
func (txRes *TxResolver) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TxResolver) NumPeersToQuery ¶ added in v1.0.110
func (txRes *TxResolver) NumPeersToQuery() (int, int)
NumPeersToQuery will return the number of intra shard and cross shard number of peer to query
func (*TxResolver) ProcessReceivedMessage ¶
func (txRes *TxResolver) ProcessReceivedMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error
ProcessReceivedMessage will be the callback func from the p2p.Messenger and will be called each time a new message was received (for the topic this validator was registered to, usually a request topic)
func (*TxResolver) RequestDataFromHash ¶
func (txRes *TxResolver) RequestDataFromHash(hash []byte, epoch uint32) error
RequestDataFromHash requests a transaction from other peers having input the tx hash
func (*TxResolver) RequestDataFromHashArray ¶
func (txRes *TxResolver) RequestDataFromHashArray(hashes [][]byte, epoch uint32) error
RequestDataFromHashArray requests a list of tx hashes from other peers
func (*TxResolver) SetNumPeersToQuery ¶ added in v1.0.102
func (txRes *TxResolver) SetNumPeersToQuery(intra int, cross int)
SetNumPeersToQuery will set the number of intra shard and cross shard number of peer to query
func (*TxResolver) SetResolverDebugHandler ¶ added in v1.0.110
func (txRes *TxResolver) SetResolverDebugHandler(handler dataRetriever.ResolverDebugHandler) error
SetResolverDebugHandler will set a resolver debug handler