Documentation ¶
Index ¶
- Constants
- Variables
- func CreateSoftwareVersionChecker(statusHandler core.AppStatusHandler) (*softwareVersion.SoftwareVersionChecker, error)
- func CreateStatusHandlerPresenter() view.Presenter
- func CreateViews(presenter view.Presenter) ([]factoryViews.Viewer, error)
- func GetPkEncoded(pubKey crypto.PublicKey) string
- func GetSigningParams(ctx *cli.Context, skName string, skIndexName string, skPemFileName string, ...) (keyGen crypto.KeyGenerator, privKey crypto.PrivateKey, pubKey crypto.PublicKey, ...)
- func NewCoreComponentsFactoryArgs(config *config.Config, uniqueID string) *coreComponentsFactoryArgs
- func NewCryptoComponentsFactoryArgs(ctx *cli.Context, config *config.Config, nodesConfig *sharding.NodesSetup, ...) *cryptoComponentsFactoryArgs
- func NewDataComponentsFactoryArgs(config *config.Config, shardCoordinator sharding.Coordinator, core *Core, ...) *dataComponentsFactoryArgs
- func NewProcessComponentsFactoryArgs(coreComponents *coreComponentsFactoryArgs, genesisConfig *sharding.Genesis, ...) *processComponentsFactoryArgs
- func NewSeedRandReader(seed []byte) *seedRandReader
- func NewStateComponentsFactoryArgs(config *config.Config, genesisConfig *sharding.Genesis, ...) *stateComponentsFactoryArgs
- type Core
- type Crypto
- type Data
- type Network
- type Process
- type State
Constants ¶
const ( // BlsHashSize specifies the hash size for using bls scheme BlsHashSize = 16 // BlsConsensusType specifies te signature scheme used in the consensus BlsConsensusType = "bls" // BnConsensusType specifies te signature scheme used in the consensus BnConsensusType = "bn" // MaxTxsToRequest specifies the maximum number of txs to request MaxTxsToRequest = 100 )
const MaxTxNonceDeltaAllowed = 15000
MaxTxNonceDeltaAllowed specifies the maximum difference between an account's nonce and a received transaction's nonce in order to mark the transaction as valid.
Variables ¶
var ErrCreateForkDetector = errors.New("could not create fork detector")
ErrCreateForkDetector signals that a fork detector could not be created TODO: Extract all others error messages from this file in some defined errors
Functions ¶
func CreateSoftwareVersionChecker ¶
func CreateSoftwareVersionChecker(statusHandler core.AppStatusHandler) (*softwareVersion.SoftwareVersionChecker, error)
CreateSoftwareVersionChecker will create a new software version checker and will start check if a new software version is available
func CreateStatusHandlerPresenter ¶ added in v1.0.16
CreateStatusHandlerPresenter will return an instance of PresenterStatusHandler
func CreateViews ¶ added in v1.0.16
func CreateViews(presenter view.Presenter) ([]factoryViews.Viewer, error)
CreateViews will start an termui console and will return an object if cannot create and start termuiConsole
func GetPkEncoded ¶
GetPkEncoded returns the encoded public key
func GetSigningParams ¶
func GetSigningParams( ctx *cli.Context, skName string, skIndexName string, skPemFileName string, suite crypto.Suite, ) (keyGen crypto.KeyGenerator, privKey crypto.PrivateKey, pubKey crypto.PublicKey, err error)
GetSigningParams returns a key generator, a private key, and a public key
func NewCoreComponentsFactoryArgs ¶
func NewCoreComponentsFactoryArgs(config *config.Config, uniqueID string) *coreComponentsFactoryArgs
NewCoreComponentsFactoryArgs initializes the arguments necessary for creating the core components
func NewCryptoComponentsFactoryArgs ¶
func NewCryptoComponentsFactoryArgs( ctx *cli.Context, config *config.Config, nodesConfig *sharding.NodesSetup, shardCoordinator sharding.Coordinator, keyGen crypto.KeyGenerator, privKey crypto.PrivateKey, log logger.Logger, initialBalancesSkPemFileName string, txSignSkName string, txSignSkIndexName string, ) *cryptoComponentsFactoryArgs
NewCryptoComponentsFactoryArgs initializes the arguments necessary for creating the crypto components
func NewDataComponentsFactoryArgs ¶
func NewDataComponentsFactoryArgs( config *config.Config, shardCoordinator sharding.Coordinator, core *Core, uniqueID string, ) *dataComponentsFactoryArgs
NewDataComponentsFactoryArgs initializes the arguments necessary for creating the data components
func NewProcessComponentsFactoryArgs ¶
func NewProcessComponentsFactoryArgs( coreComponents *coreComponentsFactoryArgs, genesisConfig *sharding.Genesis, economicsData *economics.EconomicsData, nodesConfig *sharding.NodesSetup, gasSchedule map[string]map[string]uint64, syncer ntp.SyncTimer, shardCoordinator sharding.Coordinator, nodesCoordinator sharding.NodesCoordinator, data *Data, core *Core, crypto *Crypto, state *State, network *Network, coreServiceContainer serviceContainer.Core, requestedItemsHandler dataRetriever.RequestedItemsHandler, ) *processComponentsFactoryArgs
NewProcessComponentsFactoryArgs initializes the arguments necessary for creating the process components
func NewSeedRandReader ¶ added in v1.0.3
func NewSeedRandReader(seed []byte) *seedRandReader
NewSeedRandReader will return a new instance of a seed-based reader
func NewStateComponentsFactoryArgs ¶
func NewStateComponentsFactoryArgs( config *config.Config, genesisConfig *sharding.Genesis, shardCoordinator sharding.Coordinator, core *Core, uniqueID string, ) *stateComponentsFactoryArgs
NewStateComponentsFactoryArgs initializes the arguments necessary for creating the state components
Types ¶
type Core ¶
type Core struct { Hasher hashing.Hasher Marshalizer marshal.Marshalizer Trie data.Trie Uint64ByteSliceConverter typeConverters.Uint64ByteSliceConverter StatusHandler core.AppStatusHandler }
Core struct holds the core components of the Elrond protocol
func CoreComponentsFactory ¶
CoreComponentsFactory creates the core components
type Crypto ¶
type Crypto struct { TxSingleSigner crypto.SingleSigner SingleSigner crypto.SingleSigner MultiSigner crypto.MultiSigner BlockSignKeyGen crypto.KeyGenerator TxSignKeyGen crypto.KeyGenerator TxSignPrivKey crypto.PrivateKey TxSignPubKey crypto.PublicKey InitialPubKeys map[uint32][]string }
Crypto struct holds the crypto components of the Elrond protocol
func CryptoComponentsFactory ¶
CryptoComponentsFactory creates the crypto components
type Data ¶
type Data struct { Blkc data.ChainHandler Store dataRetriever.StorageService Datapool dataRetriever.PoolsHolder MetaDatapool dataRetriever.MetaPoolsHolder }
Data struct holds the data components of the Elrond protocol
func DataComponentsFactory ¶
DataComponentsFactory creates the data components
type Process ¶
type Process struct { InterceptorsContainer process.InterceptorsContainer ResolversFinder dataRetriever.ResolversFinder Rounder consensus.Rounder ForkDetector process.ForkDetector BlockProcessor process.BlockProcessor BlackListHandler process.BlackListHandler BootStorer process.BootStorer }
Process struct holds the process components of the Elrond protocol
func ProcessComponentsFactory ¶
ProcessComponentsFactory creates the process components
type State ¶
type State struct { AddressConverter state.AddressConverter PeerAccounts state.AccountsAdapter AccountsAdapter state.AccountsAdapter InBalanceForShard map[string]*big.Int }
State struct holds the state components of the Elrond protocol
func StateComponentsFactory ¶
StateComponentsFactory creates the state components