testdata

package
v0.1.1-devnet Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Node1Folder = "./data_node1"

Node1Folder is the folder where node 1 stores its data

View Source
var Node2Folder = "./data_node2"

Node2Folder is the folder where node 2 stores its data

View Source
var Node3Folder = "./data_node3"

Node3Folder is the folder where node 3 stores its data

View Source
var PremineAddr, _ = bls.RandKey()
View Source
var TestParams = params.ChainParams{
	Name:           "testnet",
	DefaultP2PPort: "25126",
	NetMagic:       111999,
	AccountPrefixes: params.AccountPrefixes{
		Public:   "itpub",
		Private:  "itprv",
		Multisig: "itmul",
		Contract: "itctr",
	},
	GovernanceBudgetQuotient:     5,
	BaseRewardPerBlock:           26 * 1e7,
	IncluderRewardQuotient:       8,
	EpochLength:                  5,
	EjectionBalance:              95,
	MaxBalanceChurnQuotient:      32,
	LatestBlockRootsLength:       64,
	MinAttestationInclusionDelay: 1,
	DepositAmount:                100,
	UnitsPerCoin:                 100000000,
	InactivityPenaltyQuotient:    17179869184,
	SlotDuration:                 6,
	MaxVotesPerBlock:             32,
	MaxTxsPerBlock:               5000,
	MaxDepositsPerBlock:          128,
	MaxExitsPerBlock:             128,
	MaxRANDAOSlashingsPerBlock:   20,
	MaxProposerSlashingsPerBlock: 2,
	MaxVoteSlashingsPerBlock:     10,
	WhistleblowerRewardQuotient:  2,
	GovernancePercentages: []uint8{
		30,
		10,
		20,
		20,
		20,
	},
	MinVotingBalance:          100,
	CommunityOverrideQuotient: 3,
	VotingPeriodSlots:         20160,
	InitialManagers: [][20]byte{
		{252, 94, 117, 132, 63, 93, 202, 26, 36, 23, 195, 26, 169, 95, 74, 147, 72, 184, 66, 20},
		{192, 13, 158, 167, 115, 190, 56, 51, 43, 11, 156, 43, 27, 145, 143, 61, 40, 209, 114, 238},
		{88, 192, 115, 125, 142, 126, 244, 13, 253, 225, 139, 36, 184, 34, 71, 31, 69, 205, 216, 125},
		{143, 17, 152, 250, 184, 122, 141, 208, 109, 72, 148, 187, 248, 89, 83, 127, 113, 217, 23, 144},
		{162, 207, 33, 52, 96, 81, 17, 131, 72, 175, 180, 222, 125, 41, 3, 108, 43, 47, 231, 7},
	},
}

TestParams network parameters for test chains.

Functions

func FuzzAcceptedVoteInfo

func FuzzAcceptedVoteInfo(n int, correct bool, complete bool) []*primitives.AcceptedVoteInfo

FuzzAcceptedVoteInfo return a slice with n AcceptedVoteInfo structs. If correct is true will return correctly serializable structs If complete is true will return information with no nil pointers.

func FuzzBlock

func FuzzBlock(n int, correct bool, complete bool) []*primitives.Block

FuzzBlock returns a Block slice If correct is true will return correctly serializable structs If complete is true will return information with no nil pointers.

func FuzzBlockHeader

func FuzzBlockHeader(n int) []*primitives.BlockHeader

FuzzBlockHeader return a slice with n BlockHeader structs.

func FuzzCoinState

func FuzzCoinState(n int) *primitives.CoinsState

FuzzCoinState returns a CoinState with n balances and nonces

func FuzzCoinStateSerializable

func FuzzCoinStateSerializable(n int) *primitives.CoinsStateSerializable

FuzzCoinStateSerializable returns a CoinState with n balances and nonces

func FuzzCommunityVoteData

func FuzzCommunityVoteData(n int) []*primitives.CommunityVoteData

FuzzCommunityVoteData returns a slice of n CommunityVoteData

func FuzzDeposit

func FuzzDeposit(n int, complete bool) []*primitives.Deposit

FuzzDeposit creates a slice of Deposits. If complete is true it will create deposits with not nil pointers

func FuzzDepositData

func FuzzDepositData() *primitives.DepositData

FuzzDepositData returns a DepositData struct

func FuzzExits

func FuzzExits(n int) []*primitives.Exit

FuzzExits return an slice of Exits If correct is true will return correctly serializable structs If complete is true will return information with no nil pointers.

func FuzzGovernanceState

func FuzzGovernanceState() *primitives.Governance

FuzzGovernanceState returns a Governance state struct

func FuzzGovernanceStateSerializable

func FuzzGovernanceStateSerializable() *primitives.GovernanceSerializable

FuzzGovernanceStateSerializable returns a GovernanceSerializable state struct

func FuzzGovernanceVote

func FuzzGovernanceVote(n int) []*primitives.GovernanceVote

FuzzGovernanceVote returns a slice of GovernanceVotes If valid is true object on slice have valid signatures. If ms is true objects include multisignatures instead of combined signatures.

func FuzzMultiValidatorVote

func FuzzMultiValidatorVote(n int, correct bool, complete bool) []*primitives.MultiValidatorVote

FuzzMultiValidatorVote creates a slice of MultiValidatorVote If correct is true will return correctly serializable structs If complete is true will return information with no nil pointers.

func FuzzProposerSlashing

func FuzzProposerSlashing(n int, complete bool) []*primitives.ProposerSlashing

FuzzProposerSlashing creates a slice of ProposerSlashing If complete is true will return information with no nil pointers.

func FuzzRANDAOSlashing

func FuzzRANDAOSlashing(n int) []*primitives.RANDAOSlashing

FuzzRANDAOSlashing creates a slice of RANDAOSlashing

func FuzzReplacementVote

func FuzzReplacementVote(n int) []*primitives.ReplacementVotes

FuzzReplacementVote returns a slice of n ReplacementVotes

func FuzzTx

func FuzzTx(n int) []*primitives.Tx

FuzzTx returns a slice of n Tx

func FuzzTxMulti

func FuzzTxMulti(n int) []*primitives.TxMulti

FuzzTx returns a slice of n Tx

func FuzzValidator

func FuzzValidator(n int) []*primitives.Validator

FuzzValidator creates a slice of Validator

func FuzzValidatorHello

func FuzzValidatorHello(n int) []*primitives.ValidatorHelloMessage

FuzzValidatorHello returns a slice of ValidatorHelloMessage

func FuzzVoteData

func FuzzVoteData(n int) []*primitives.VoteData

FuzzVoteData simply creates a slice with VoteData

func FuzzVoteSlashing

func FuzzVoteSlashing(n int, correct bool, complete bool) []*primitives.VoteSlashing

FuzzVoteSlashing creates a slice of VoteSlashing If correct is true will return correctly serializable structs If complete is true will return information with no nil pointers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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