staking

package
v1.7.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2024 License: GPL-3.0 Imports: 82 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InitialNodesConfig

type InitialNodesConfig struct {
	Owners                        map[string]*OwnerStats
	MaxNodesChangeConfig          []config.MaxNodesChangeConfig
	NumOfShards                   uint32
	MinNumberOfEligibleShardNodes uint32
	MinNumberOfEligibleMetaNodes  uint32
	ShardConsensusGroupSize       int
	MetaConsensusGroupSize        int
}

InitialNodesConfig -

type NodesRegisterData

type NodesRegisterData struct {
	BLSKeys    [][]byte
	TotalStake *big.Int
}

NodesRegisterData -

type OwnerStats

type OwnerStats struct {
	EligibleBlsKeys  map[uint32][][]byte
	WaitingBlsKeys   map[uint32][][]byte
	StakingQueueKeys [][]byte
	TotalStake       *big.Int
}

OwnerStats -

type TestMetaProcessor

type TestMetaProcessor struct {
	MetaBlockProcessor  process.BlockProcessor
	NodesCoordinator    nodesCoordinator.NodesCoordinator
	ValidatorStatistics process.ValidatorStatisticsProcessor
	EpochStartTrigger   integrationTests.TestEpochStartTrigger
	BlockChainHandler   data.ChainHandler
	NodesConfig         nodesConfig
	AccountsAdapter     state.AccountsAdapter
	Marshaller          marshal.Marshalizer
	TxCacher            dataRetriever.TransactionCacher
	TxCoordinator       process.TransactionCoordinator
	SystemVM            vmcommon.VMExecutionHandler
	BlockChainHook      process.BlockChainHookHandler
	StakingDataProvider epochStart.StakingDataProvider
	// contains filtered or unexported fields
}

TestMetaProcessor -

func NewTestMetaProcessor

func NewTestMetaProcessor(
	numOfMetaNodes uint32,
	numOfShards uint32,
	numOfEligibleNodesPerShard uint32,
	numOfWaitingNodesPerShard uint32,
	numOfNodesToShufflePerShard uint32,
	shardConsensusGroupSize int,
	metaConsensusGroupSize int,
	numOfNodesInStakingQueue uint32,
) *TestMetaProcessor

NewTestMetaProcessor -

func NewTestMetaProcessorWithCustomNodes

func NewTestMetaProcessorWithCustomNodes(config *InitialNodesConfig) *TestMetaProcessor

NewTestMetaProcessorWithCustomNodes -

func (*TestMetaProcessor) ClearStoredMbs added in v1.7.1

func (tmp *TestMetaProcessor) ClearStoredMbs()

ClearStoredMbs clears the stored miniblocks

func (*TestMetaProcessor) Process

func (tmp *TestMetaProcessor) Process(t *testing.T, numOfRounds uint64)

Process -

func (*TestMetaProcessor) ProcessJail

func (tmp *TestMetaProcessor) ProcessJail(t *testing.T, blsKeys [][]byte)

ProcessJail will create a block containing mini blocks with jail txs using provided nodes. Block will be committed + call to validator system sc will be made to jail all nodes

func (*TestMetaProcessor) ProcessReStake added in v1.7.7

func (tmp *TestMetaProcessor) ProcessReStake(t *testing.T, blsKeys [][]byte)

ProcessReStake will create a block containing mini blocks with re-staking txs using provided nodes. Block will be committed + call to validator system sc will be made to stake all nodes

func (*TestMetaProcessor) ProcessStake

func (tmp *TestMetaProcessor) ProcessStake(t *testing.T, nodes map[string]*NodesRegisterData)

ProcessStake will create a block containing mini blocks with staking txs using provided nodes. Block will be committed + call to validator system sc will be made to stake all nodes

func (*TestMetaProcessor) ProcessUnJail

func (tmp *TestMetaProcessor) ProcessUnJail(t *testing.T, blsKeys [][]byte)

ProcessUnJail will create a block containing mini blocks with unJail txs using provided nodes. Block will be committed + call to validator system sc will be made to unJail all nodes

func (*TestMetaProcessor) ProcessUnStake

func (tmp *TestMetaProcessor) ProcessUnStake(t *testing.T, nodes map[string][][]byte)

ProcessUnStake will create a block containing mini blocks with unStaking txs using provided nodes. Block will be committed + call to validator system sc will be made to unStake all nodes

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL