Documentation ¶
Index ¶
- Constants
- Variables
- func CreatePostMiniBlocks(args ArgsHardForkProcessor) error
- func GetPendingMiniBlocks(epochStartMetaBlock *block.MetaBlock, ...) ([]block.MiniBlockHeader, error)
- type AccountsDBSyncContainer
- type AccountsDBSyncer
- type ArgsHardForkProcessor
- type Closer
- type DataWriter
- type EpochChangeConfirmedNotifier
- type EpochHandler
- type EpochStartPendingMiniBlocksSyncHandler
- type EpochStartTriesSyncHandler
- type EpochStartVerifier
- type ExportFactoryHandler
- type ExportHandler
- type GenesisNodesSetupHandler
- type HardForkBlockProcessor
- type HardforkStorer
- type HeaderSyncHandler
- type HistoryStorer
- type ImportHandler
- type ImportStartHandler
- type MbInfo
- type MissingHeadersByHashSyncer
- type PendingTransactionProcessor
- type PendingTransactionsSyncHandler
- type RequestHandler
- type RoundHandler
- type SigVerifier
- type StateSyncer
- type TrieSyncContainer
- type TrieSyncer
- type TxInfo
- type WhiteListHandler
Constants ¶
const TimeoutGettingTrieNodes = time.Minute * 10
TimeoutGettingTrieNodes represents the maximum time allowed between 2 nodes fetches (and commits)
Variables ¶
var ErrContainerKeyAlreadyExists = errors.New("provided key already exists in container")
ErrContainerKeyAlreadyExists signals that an element was already set in the container's map
var ErrEmptyChainID = errors.New("empty chain ID")
ErrEmptyChainID signals that empty chain ID was provided
var ErrEmptyExportFolderPath = errors.New("empty export folder path")
ErrEmptyExportFolderPath signals that the provided export folder's length is empty
var ErrEmptyVersionString = errors.New("empty version string")
ErrEmptyVersionString signals that the provided version string is empty
var ErrExpectedOneStartOfEpochMetaBlock = errors.New("expected one start of epoch metaBlock")
ErrExpectedOneStartOfEpochMetaBlock signals that exactly one start of epoch metaBlock should have been used
var ErrImportingData = errors.New("error importing data")
ErrImportingData signals that an import error occurred
var ErrIncorrectHardforkMessage = errors.New("incorrect hardfork message")
ErrIncorrectHardforkMessage signals that the hardfork message is incorrectly formatted
var ErrInvalidContainerKey = errors.New("element does not exist in container")
ErrInvalidContainerKey signals that an element does not exist in the container's map
var ErrInvalidEpoch = errors.New("invalid epoch")
ErrInvalidEpoch signals that an invalid epoch has been provided
var ErrInvalidFolderName = errors.New("invalid folder name")
ErrInvalidFolderName signals that folder name is nil
var ErrInvalidMaxHardCapForMissingNodes = errors.New("invalid max hardcap for missing nodes")
ErrInvalidMaxHardCapForMissingNodes signals that the maximum hardcap value for missing nodes is invalid
var ErrInvalidMiniBlockType = errors.New("invalid miniBlock type")
ErrInvalidMiniBlockType signals that an invalid miniBlock type has been provided
var ErrInvalidNumConcurrentTrieSyncers = errors.New("invalid num concurrent trie syncers")
ErrInvalidNumConcurrentTrieSyncers signals that the number of concurrent trie syncers is invalid
var ErrInvalidTimeToWaitAfterHardfork = errors.New("invalid time to wait after hard fork")
ErrInvalidTimeToWaitAfterHardfork signals that an invalid time to wait after hardfork was provided
var ErrInvalidValue = errors.New("invalid value")
ErrInvalidValue signals that the value provided is invalid
var ErrKeyTypeMismatch = errors.New("key type mismatch while importing")
ErrKeyTypeMismatch signals that key type was mismatch during import
var ErrLenMismatch = errors.New("lengths mismatch")
ErrLenMismatch signals that 2 or more slices have different lengths
var ErrMiniBlockNotFoundInImportedMap = errors.New("miniBlock was not found in imported map")
ErrMiniBlockNotFoundInImportedMap signals that the given miniBlock was not found in imported map
var ErrNilAccounts = errors.New("nil accounts")
ErrNilAccounts signals that nil accounts was provided
var ErrNilAccountsDBSyncContainer = errors.New("nil accounts db sync container")
ErrNilAccountsDBSyncContainer signals that nil accounts sync container was provided
var ErrNilAntiFloodHandler = errors.New("nil anti flood handler")
ErrNilAntiFloodHandler signals that nil anti flood handler has been provided
var ErrNilArgumentParser = errors.New("nil argument parser")
ErrNilArgumentParser signals that nil argument parser was provided
var ErrNilBlockBody = errors.New("nil block body")
ErrNilBlockBody signals that a nil block body has been provided
var ErrNilBlockKeyGen = errors.New("nil block key gen")
ErrNilBlockKeyGen signals that nil block key gen was provided
var ErrNilBlockSigner = errors.New("nil block signer")
ErrNilBlockSigner signals the nil block signer was provided
var ErrNilCacher = errors.New("nil cacher")
ErrNilCacher signals that nil cacher was provided
var ErrNilChanStopNodeProcess = errors.New("nil channel to stop node")
ErrNilChanStopNodeProcess signals that nil channel to stop node was provided
var ErrNilCloser = errors.New("nil closer instance")
ErrNilCloser signals that a nil closer instance was provided
var ErrNilContainerElement = errors.New("element cannot be nil")
ErrNilContainerElement signals when trying to add a nil element in the container
var ErrNilDataPoolHolder = errors.New("nil data pool holder")
ErrNilDataPoolHolder signals that the data pool holder is nil
var ErrNilEpochConfirmedNotifier = errors.New("nil epoch confirmed notifier")
ErrNilEpochConfirmedNotifier signals that nil epoch confirmed notifier was provided
var ErrNilEpochHandler = errors.New("nil epoch handler")
ErrNilEpochHandler signals that nil epoch handler was provided
var ErrNilEpochNotifier = errors.New("nil EpochNotifier")
ErrNilEpochNotifier signals that the provided EpochNotifier is nil
var ErrNilEpochStartMetaBlock = errors.New("nil epoch start metaBlock was provided")
ErrNilEpochStartMetaBlock signals that a nil epoch start metaBlock was provided
var ErrNilExportFactoryHandler = errors.New("nil export factory handler")
ErrNilExportFactoryHandler signals that nil export factory handler has been provided
var ErrNilGenesisNodesSetupHandler = errors.New("nil genesis nodes setup handler")
ErrNilGenesisNodesSetupHandler signals that a nil genesis nodes setup handler has been provided
var ErrNilHardForkBlockProcessor = errors.New("nil hard fork block processor")
ErrNilHardForkBlockProcessor signals that nil hard fork block processor has been provided
var ErrNilHardforkStorer = errors.New("nil hardfork storer")
ErrNilHardforkStorer signals that a nil hardfork storer has been provided
var ErrNilHasher = errors.New("nil Hasher")
ErrNilHasher signals that an operation has been attempted to or with a nil hasher implementation
var ErrNilHeaderHandler = errors.New("nil header handler")
ErrNilHeaderHandler signals that a nil header handler has been provided
var ErrNilHeaderIntegrityVerifier = errors.New("nil header integrity verifier")
ErrNilHeaderIntegrityVerifier signals that nil header integrity verifier was provided
var ErrNilHeaderSigVerifier = errors.New("nil header sig verifier")
ErrNilHeaderSigVerifier signals that nil header sig verifier was provided
var ErrNilHeaderSyncHandler = errors.New("nil header sync handler")
ErrNilHeaderSyncHandler signals that nil header sync handler was provided
var ErrNilHeaderValidator = errors.New("nil header validator")
ErrNilHeaderValidator signals that nil header validator has been provided
var ErrNilImportHandler = errors.New("nil import handler")
ErrNilImportHandler signals that nil import handler has been provided
var ErrNilImportStartHandler = errors.New("nil import start handler")
ErrNilImportStartHandler signals that a nil import start handler has been provided
var ErrNilInterceptorsContainer = errors.New("nil interceptors container")
ErrNilInterceptorsContainer signals that a nil interceptors container has been provided
var ErrNilKeyGenerator = errors.New("nil key generator")
ErrNilKeyGenerator signals that nil key generator was provided
var ErrNilMarshalizer = errors.New("nil Marshalizer")
ErrNilMarshalizer signals that an operation has been attempted to or with a nil Marshalizer implementation
var ErrNilMessenger = errors.New("nil Messenger")
ErrNilMessenger signals that a nil Messenger object was provided
var ErrNilMiniBlocksSyncHandler = errors.New("nil miniblocks sync handler")
ErrNilMiniBlocksSyncHandler signals that nil miniblocks sync handler was provided
var ErrNilMultiSigner = errors.New("nil multi signer")
ErrNilMultiSigner signals that nil multi signer was provided
var ErrNilNodesCoordinator = errors.New("nil nodes coordinator")
ErrNilNodesCoordinator signals that nil nodes coordinator was provided
var ErrNilPendingTxProcessor = errors.New("nil pending tx processor")
ErrNilPendingTxProcessor signals that nil pending tx processor has been provided
var ErrNilPubKeyConverter = errors.New("nil public key converter")
ErrNilPubKeyConverter signals that a nil public key converter was provided
var ErrNilRequestHandler = errors.New("nil request handler")
ErrNilRequestHandler signals that a nil request handler interface was provided
var ErrNilResolverContainer = errors.New("nil resolver container")
ErrNilResolverContainer signals that a nil resolver container was provided
var ErrNilRoundHandler = errors.New("nil round handler")
ErrNilRoundHandler signals that nil round handler has been provided
var ErrNilRwdTxProcessor = errors.New("nil reward transaction processor")
ErrNilRwdTxProcessor signals that nil reward transaction processor has been provided
var ErrNilSCRProcessor = errors.New("nil smart contract result processor")
ErrNilSCRProcessor signals that nil smart contract result processor has been provided
var ErrNilShardCoordinator = errors.New("nil shard coordinator")
ErrNilShardCoordinator signals that an operation has been attempted to or with a nil shard coordinator
var ErrNilSingleSigner = errors.New("nil single signer")
ErrNilSingleSigner signals that nil single signer was provided
var ErrNilStateSyncer = errors.New("nil state syncer")
ErrNilStateSyncer signals that state syncer is nil
var ErrNilStorage = errors.New("nil storage")
ErrNilStorage signals that storage is nil
var ErrNilStorageManager = errors.New("nil trie storage manager")
ErrNilStorageManager signals that nil storage manager has been provided
var ErrNilTimeCache = errors.New("nil time cache")
ErrNilTimeCache signals that a nil time cache was provided
var ErrNilTransactionsSyncHandler = errors.New("nil transaction sync handler")
ErrNilTransactionsSyncHandler signals that nil transactions sync handler was provided
var ErrNilTrieDataGetter = errors.New("nil trie data getter provided")
ErrNilTrieDataGetter signals that a nil trie data getter has been provided
var ErrNilTrieStorageManagers = errors.New("nil trie storage managers")
ErrNilTrieStorageManagers signals that nil trie storage managers has been provided
var ErrNilTrieSyncers = errors.New("nil trie syncers")
ErrNilTrieSyncers signals that trie syncers container is nil
var ErrNilTxCoordinator = errors.New("nil tx coordinator")
ErrNilTxCoordinator signals that nil tx coordinator has been provided
var ErrNilTxProcessor = errors.New("nil transaction processor")
ErrNilTxProcessor signals that nil transaction processor has been provided
var ErrNilUint64Converter = errors.New("unit64converter is nil")
ErrNilUint64Converter signals that uint64converter is nil
var ErrNilUnFinishedMetaBlocksMap = errors.New("nil unFinished metaBlocks map was provided")
ErrNilUnFinishedMetaBlocksMap signals that a nil unFinished metaBlocks map was provided
var ErrNilValidityAttester = errors.New("nil validity attester")
ErrNilValidityAttester signals that nil validity was provided
var ErrNilWhiteListHandler = errors.New("nil white list handler")
ErrNilWhiteListHandler signals that white list handler is nil
var ErrNotEpochStartBlock = errors.New("not epoch start block")
ErrNotEpochStartBlock signals that block is not of type epoch start
var ErrNotSynced = errors.New("not synced")
ErrNotSynced signals that syncing has not been finished yet
var ErrPostProcessTransactionNotFound = errors.New("transaction was not found in post process map")
ErrPostProcessTransactionNotFound signals that the given transaction was not found in post process map
var ErrTimeIsOut = errors.New("time is out")
ErrTimeIsOut signals that time is out
var ErrTransactionNotFoundInImportedMap = errors.New("transaction was not found in imported map")
ErrTransactionNotFoundInImportedMap signals that the given transaction was not found in imported map
var ErrTriggerAlreadyInAction = errors.New("trigger already in action")
ErrTriggerAlreadyInAction signals that the trigger is already in action, can not re-enter
var ErrTriggerNotEnabled = errors.New("trigger is not enabled")
ErrTriggerNotEnabled signals that the trigger is not enabled
var ErrTriggerPubKeyMismatch = errors.New("trigger public key mismatch")
ErrTriggerPubKeyMismatch signals that there is a mismatch between the public key received and the one read from the config
var ErrUnknownType = errors.New("unknown type")
ErrUnknownType signals that type is unknown
var ErrWrongImportedMiniBlocksMap = errors.New("wrong imported miniBlocks map was provided")
ErrWrongImportedMiniBlocksMap signals that wrong imported miniBlocks map was provided
var ErrWrongImportedTransactionsMap = errors.New("wrong imported transactions map was provided")
ErrWrongImportedTransactionsMap signals that wrong imported transactions map was provided
var ErrWrongTypeAssertion = errors.New("wrong type assertion")
ErrWrongTypeAssertion signals wrong type assertion
var ErrWrongTypeInContainer = errors.New("wrong type of object inside container")
ErrWrongTypeInContainer signals that a wrong type of object was found in container
var ErrWrongUnFinishedMetaHdrsMap = errors.New("wrong unFinished meta headers map")
ErrWrongUnFinishedMetaHdrsMap signals that wrong unFinished meta headers map was provided
Functions ¶
func CreatePostMiniBlocks ¶ added in v1.1.12
func CreatePostMiniBlocks(args ArgsHardForkProcessor) error
CreatePostMiniBlocks will create all the post miniBlocks after hardfork import
func GetPendingMiniBlocks ¶ added in v1.1.12
func GetPendingMiniBlocks( epochStartMetaBlock *block.MetaBlock, unFinishedMetaBlocksMap map[string]*block.MetaBlock, ) ([]block.MiniBlockHeader, error)
GetPendingMiniBlocks get all the pending miniBlocks from epoch start metaBlock and unFinished metaBlocks
Types ¶
type AccountsDBSyncContainer ¶
type AccountsDBSyncContainer interface { Get(key string) (AccountsDBSyncer, error) Add(key string, val AccountsDBSyncer) error AddMultiple(keys []string, values []AccountsDBSyncer) error Replace(key string, val AccountsDBSyncer) error Remove(key string) Len() int IsInterfaceNil() bool }
AccountsDBSyncContainer keep a list of TrieSyncer
type AccountsDBSyncer ¶
type AccountsDBSyncer interface { GetSyncedTries() map[string]data.Trie SyncAccounts(rootHash []byte) error IsInterfaceNil() bool }
AccountsDBSyncer defines the methods for the accounts db syncer
type ArgsHardForkProcessor ¶ added in v1.1.12
type ArgsHardForkProcessor struct { Hasher hashing.Hasher Marshalizer marshal.Marshalizer ShardIDs []uint32 MapBodies map[uint32]*block.Body MapHardForkBlockProcessor map[uint32]HardForkBlockProcessor PostMbs []*MbInfo }
ArgsHardForkProcessor defines the arguments structure needed by hardfork processor methods
type DataWriter ¶
DataWriter defines the methods to write data
type EpochChangeConfirmedNotifier ¶ added in v1.0.120
type EpochChangeConfirmedNotifier interface { RegisterForEpochChangeConfirmed(handler func(epoch uint32)) IsInterfaceNil() bool }
EpochChangeConfirmedNotifier defines the functionality needed to register for the epoch change confirmed event
type EpochHandler ¶ added in v1.0.120
type EpochHandler interface { MetaEpoch() uint32 ForceEpochStart(round uint64) IsInterfaceNil() bool }
EpochHandler defines the functionality to get the current epoch
type EpochStartPendingMiniBlocksSyncHandler ¶
type EpochStartPendingMiniBlocksSyncHandler interface { SyncPendingMiniBlocksFromMeta(epochStart *block.MetaBlock, unFinished map[string]*block.MetaBlock, ctx context.Context) error GetMiniBlocks() (map[string]*block.MiniBlock, error) IsInterfaceNil() bool }
EpochStartPendingMiniBlocksSyncHandler defines the methods to sync all pending miniblocks
type EpochStartTriesSyncHandler ¶
type EpochStartTriesSyncHandler interface { SyncTriesFrom(meta *block.MetaBlock) error GetTries() (map[string]data.Trie, error) IsInterfaceNil() bool }
EpochStartTriesSyncHandler defines the methods to sync all tries from a given epoch start metablock
type EpochStartVerifier ¶
type EpochStartVerifier interface { IsEpochStart() bool Epoch() uint32 EpochStartMetaHdrHash() []byte IsInterfaceNil() bool }
EpochStartVerifier defines the functionality needed by sync all state from epochTrigger
type ExportFactoryHandler ¶ added in v1.0.120
type ExportFactoryHandler interface { Create() (ExportHandler, error) IsInterfaceNil() bool }
ExportFactoryHandler defines the functionality to create and export handler
type ExportHandler ¶
ExportHandler defines the methods to export the current state of the blockchain
type GenesisNodesSetupHandler ¶ added in v1.0.149
type GenesisNodesSetupHandler interface { InitialNodesInfoForShard(shardId uint32) ([]sharding.GenesisNodeInfoHandler, []sharding.GenesisNodeInfoHandler, error) InitialNodesInfo() (map[uint32][]sharding.GenesisNodeInfoHandler, map[uint32][]sharding.GenesisNodeInfoHandler) GetStartTime() int64 GetRoundDuration() uint64 GetChainId() string GetMinTransactionVersion() uint32 GetShardConsensusGroupSize() uint32 GetMetaConsensusGroupSize() uint32 MinNumberOfShardNodes() uint32 MinNumberOfMetaNodes() uint32 GetHysteresis() float32 GetAdaptivity() bool NumberOfShards() uint32 MinNumberOfNodes() uint32 IsInterfaceNil() bool }
GenesisNodesSetupHandler returns the genesis nodes info
type HardForkBlockProcessor ¶ added in v1.0.115
type HardForkBlockProcessor interface { CreateBlock(body *block.Body, chainID string, round uint64, nonce uint64, epoch uint32) (data.HeaderHandler, error) CreateBody() (*block.Body, []*MbInfo, error) CreatePostMiniBlocks(mbsInfo []*MbInfo) (*block.Body, []*MbInfo, error) IsInterfaceNil() bool }
HardForkBlockProcessor defines the methods to process after hardfork
type HardforkStorer ¶ added in v1.0.138
type HardforkStorer interface { Write(identifier string, key []byte, value []byte) error FinishedIdentifier(identifier string) error RangeKeys(handler func(identifier string, keys [][]byte) bool) Get(identifier string, key []byte) ([]byte, error) Close() error IsInterfaceNil() bool }
HardforkStorer manages the export and import of data
type HeaderSyncHandler ¶
type HeaderSyncHandler interface { SyncUnFinishedMetaHeaders(epoch uint32) error GetEpochStartMetaBlock() (*block.MetaBlock, error) GetUnFinishedMetaBlocks() (map[string]*block.MetaBlock, error) IsInterfaceNil() bool }
HeaderSyncHandler defines the methods to sync and get the epoch start metablock
type HistoryStorer ¶
type HistoryStorer interface { Put(key, data []byte) error Get(key []byte) ([]byte, error) Has(key []byte) error Remove(key []byte) error ClearCache() DestroyUnit() error GetFromEpoch(key []byte, epoch uint32) ([]byte, error) HasInEpoch(key []byte, epoch uint32) error IsInterfaceNil() bool }
HistoryStorer provides storage services in a two layered storage construct, where the first layer is represented by a cache and second layer by a persitent storage (DB-like)
type ImportHandler ¶
type ImportHandler interface { ImportAll() error GetValidatorAccountsDB() state.AccountsAdapter GetMiniBlocks() map[string]*block.MiniBlock GetHardForkMetaBlock() *block.MetaBlock GetUnFinishedMetaBlocks() map[string]*block.MetaBlock GetTransactions() map[string]data.TransactionHandler GetAccountsDBForShard(shardID uint32) state.AccountsAdapter IsInterfaceNil() bool }
ImportHandler defines the methods to import the full state of the blockchain
type ImportStartHandler ¶ added in v1.0.133
type ImportStartHandler interface { IsAfterExportBeforeImport() bool ShouldStartImport() bool ResetStartImport() error SetStartImport() error IsInterfaceNil() bool }
ImportStartHandler can manage the process of starting the import after the hardfork event
type MbInfo ¶ added in v1.1.12
type MbInfo struct { MbHash []byte SenderShardID uint32 ReceiverShardID uint32 Type block.Type TxsInfo []*TxInfo }
MbInfo defines the structure which hold the miniBlock info
func CleanDuplicates ¶ added in v1.1.12
func CleanDuplicates(args ArgsHardForkProcessor) ([]*MbInfo, error)
CleanDuplicates cleans from the post miniBlocks map, the already existing miniBlocks in bodies map
func CreateBody ¶ added in v1.1.12
func CreateBody(args ArgsHardForkProcessor) ([]*MbInfo, error)
CreateBody will create a block body after hardfork import
type MissingHeadersByHashSyncer ¶
type MissingHeadersByHashSyncer interface { SyncMissingHeadersByHash(shardIDs []uint32, headersHashes [][]byte, ctx context.Context) error GetHeaders() (map[string]data.HeaderHandler, error) ClearFields() IsInterfaceNil() bool }
MissingHeadersByHashSyncer defines the methods to sync all missing headers by hash
type PendingTransactionProcessor ¶ added in v1.0.115
type PendingTransactionProcessor interface { ProcessTransactionsDstMe(mbInfo *MbInfo) (*block.MiniBlock, error) RootHash() ([]byte, error) Commit() ([]byte, error) IsInterfaceNil() bool }
PendingTransactionProcessor defines the methods to process a transaction destination me
type PendingTransactionsSyncHandler ¶
type PendingTransactionsSyncHandler interface { SyncPendingTransactionsFor(miniBlocks map[string]*block.MiniBlock, epoch uint32, ctx context.Context) error GetTransactions() (map[string]data.TransactionHandler, error) IsInterfaceNil() bool }
PendingTransactionsSyncHandler defines the methods to sync all transactions from a set of miniblocks
type RequestHandler ¶
type RequestHandler interface { RequestTransaction(shardId uint32, txHashes [][]byte) RequestUnsignedTransactions(destShardID uint32, scrHashes [][]byte) RequestRewardTransactions(destShardID uint32, txHashes [][]byte) RequestMiniBlock(shardId uint32, miniblockHash []byte) RequestStartOfEpochMetaBlock(epoch uint32) RequestShardHeader(shardId uint32, hash []byte) RequestMetaHeader(hash []byte) RequestMetaHeaderByNonce(nonce uint64) RequestShardHeaderByNonce(shardId uint32, nonce uint64) RequestTrieNodes(destShardID uint32, hashes [][]byte, topic string) RequestInterval() time.Duration SetNumPeersToQuery(key string, intra int, cross int) error GetNumPeersToQuery(key string) (int, int, error) IsInterfaceNil() bool }
RequestHandler defines the methods through which request to data can be made
type RoundHandler ¶ added in v1.1.12
RoundHandler defines the actions which should be handled by a round implementation
type SigVerifier ¶
type SigVerifier interface { Verify(message []byte, sig []byte, pk []byte) error IsInterfaceNil() bool }
SigVerifier is used to verify the signature on a provided message
type StateSyncer ¶
type StateSyncer interface { GetEpochStartMetaBlock() (*block.MetaBlock, error) GetUnFinishedMetaBlocks() (map[string]*block.MetaBlock, error) SyncAllState(epoch uint32) error GetAllTries() (map[string]data.Trie, error) GetAllTransactions() (map[string]data.TransactionHandler, error) GetAllMiniBlocks() (map[string]*block.MiniBlock, error) IsInterfaceNil() bool }
StateSyncer interface defines the methods needed to sync and get all states
type TrieSyncContainer ¶
type TrieSyncContainer interface { Get(key string) (TrieSyncer, error) Add(key string, val TrieSyncer) error AddMultiple(keys []string, interceptors []TrieSyncer) error Replace(key string, val TrieSyncer) error Remove(key string) Len() int IsInterfaceNil() bool }
TrieSyncContainer keep a list of TrieSyncer
type TrieSyncer ¶
type TrieSyncer interface { StartSyncing(rootHash []byte, ctx context.Context) error Trie() data.Trie IsInterfaceNil() bool }
TrieSyncer synchronizes the trie, asking on the network for the missing nodes
type TxInfo ¶ added in v1.1.12
type TxInfo struct { TxHash []byte Tx data.TransactionHandler }
TxInfo defines the structure which hold the transaction info
type WhiteListHandler ¶
type WhiteListHandler interface { Remove(keys [][]byte) Add(keys [][]byte) IsWhiteListed(interceptedData process.InterceptedData) bool IsInterfaceNil() bool }
WhiteListHandler is the interface needed to add whitelisted data