constants

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DSPIMinDeposit is the minimum amount of deposit. This is calculated
	// assuming that no data is stored (datasize == 0) as well as storing
	// the data for 1 epoch.
	DSPIMinDeposit uint32 = BaseDatasizeConst

	// BaseDatasizeConst is the bytes added to the size of data (in bytes)
	// for the minimum cost.
	BaseDatasizeConst = 376

	// MaxDataStoreSize is the largest size of RawData that we store in a
	// DataStore; 2 MiB (2^21)
	//
	MaxDataStoreSize uint32 = 2097152
)
View Source
const (
	DEADBLOCKROUND   uint32 = 5
	DEADBLOCKROUNDNR        = DEADBLOCKROUND - 1
	MaxBytes                = 3000000
	MaxProposalSize         = MaxBytes
	SrvrMsgTimeout          = 3 * time.Second // Do not go lower than 2 seconds!
	MsgTimeout              = 4 * time.Second // Do not go lower than 2 seconds!
	ProposalStepTO          = 4 * time.Second //4 * time.Second
	PreVoteStepTO           = 3 * time.Second //4 * time.Second
	PreCommitStepTO         = 3 * time.Second //4 * time.Second
	DBRNRTO                 = 24 * time.Second
	DownloadTO              = ProposalStepTO + PreVoteStepTO + PreCommitStepTO
)

Consensus params

View Source
const (
	// EpochLength is the number of blocks in an epoch for MadNet
	EpochLength uint32 = 1024

	// HashLen specifies the length of a hash in bytes
	HashLen = 32

	// MaxUint32 is 2^32-1 for use as a indicator value
	MaxUint32 uint32 = 4294967295

	// MaxUint64 is 2^64-1
	MaxUint64 uint64 = 18446744073709551615

	// OneBillion is 1e9 as an integer
	OneBillion = 1000000000
)
View Source
const (
	// CurveSecp256k1SigLen is the length of a Secp256k1 recoverable-ECDSA
	// digital signature
	CurveSecp256k1SigLen int = 65

	// CurveBN256EthSigLen is the length of a BN256 digital signature
	CurveBN256EthSigLen = 192
)
View Source
const (
	StatusLogger    = "status"
	StatusBlkTime   = "BlkTime"
	StatusGRCnt     = "GRCnt"
	StatusBlkRnd    = "Blk/Rnd"
	StatusBlkHsh    = "BlkHsh"
	StatusTxCt      = "TxCt"
	StatusSyncToBlk = "SyncToBlk"
)

Status log keys

View Source
const (
	LoggerConsensus = "consensus"
	LoggerTransport = "transport"
	LoggerApp       = "app"
	LoggerDB        = "db"
	LoggerGossipBus = "gossipbus"
	LoggerBadger    = "badger"
	LoggerPeerMan   = "peerMan"
	LoggerLocalRPC  = "localRPC"
	LoggerDMan      = "dman"
	LoggerPeer      = "peer"
	LoggerYamux     = "yamux"
)

Logger names

View Source
const (
	ConsensusMsgQSize    = 1024
	ConsensusMsgQWorkers = 4
	TxMsgQSize           = 1024
	TxMsgQWorkers        = 4
	LocalRPCMaxWorkers   = 2
	MaxConcurrentStreams = 1
	ReadBufferSize       = 0
	P2PStreamWorkers     = 4
	DiscoStreamWorkers   = 1
)

GRPC Server Configuration Params Setup to provide backpressure

View Source
const (
	BadgerDiscardRatio = 0.5
)

Badger VLog GC ratio

View Source
const (
	// CurveBN256EthPubkeyLen specifies the length of the public key for the
	// curve BN256; this is the uncompressed form
	CurveBN256EthPubkeyLen = 128
)
View Source
const (
	// MaxTxVectorLength is the maximum size of input output vectors.
	// This prevents uint32 overflow.
	MaxTxVectorLength int = 128
)
View Source
const (
	// OwnerLen is the constant which specifies the length of accounts
	// in bytes
	OwnerLen int = 20
)

Variables

This section is empty.

Functions

func AdminHandlerKid

func AdminHandlerKid() []byte

AdminHandlerKid returns a constant byte slice to be used as Key ID

Types

type CurveSpec

type CurveSpec uint8

CurveSpec specifies the particular elliptic curve we are dealing with

const (
	// CurveSecp256k1 is the constant which specifies the curve Secp256k1;
	// this is the curve used by Ethereum
	CurveSecp256k1 CurveSpec = iota + 1

	// CurveBN256Eth is the constant which specifies the curve BN256;
	// this is the curve used in our crypto library for pairing-based crypto
	CurveBN256Eth
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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