icmodule

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DayBlock     = 24 * 60 * 60 / 2
	DayPerMonth  = 30
	MonthBlock   = DayBlock * DayPerMonth
	MonthPerYear = 12
	YearBlock    = MonthBlock * MonthPerYear
)

From iiss.calculator.go

View Source
const (
	ConfigFile               = "./icon_config.json"
	IScoreICXRatio           = 1_000
	VotedRewardMultiplier    = 100
	InitialTermPeriod        = 43200
	DecentralizedTermPeriod  = 43120
	InitialDepositTerm       = 1_296_000
	DisableDepositTerm       = 0
	InitialUnstakeSlotMax    = 1
	InitialDelegationSlotMax = 10
	IISS2BondRequirement     = 0
	InitialIRep              = 50_000 // in icx, not loop
	MinIRep                  = 10_000
	RewardPoint              = 0.7

	DefaultTermPeriod                            = InitialTermPeriod
	DefaultUnbondingPeriodMultiplier             = 7
	DefaultUnstakeSlotMax                        = 1000
	DefaultMainPRepCount                         = 22
	DefaultSubPRepCount                          = 78
	DefaultIRep                                  = 0
	DefaultRRep                                  = 1200
	DefaultBondRequirement                       = 5
	DefaultLockMinMultiplier                     = 5
	DefaultLockMaxMultiplier                     = 20
	DefaultIglobal                               = YearBlock * IScoreICXRatio
	DefaultIprep                                 = 50
	DefaultIcps                                  = 0
	DefaultIrelay                                = 0
	DefaultIvoter                                = 50
	DefaultUnbondingMax                          = 100
	DefaultValidationPenaltyCondition            = 660
	DefaultConsistentValidationPenaltyCondition  = 5
	DefaultConsistentValidationPenaltyMask       = 30
	DefaultConsistentValidationPenaltySlashRatio = 10
	DefaultDelegationSlotMax                     = 100
	DefaultExtraMainPRepCount                    = 3
)
View Source
const (
	CalculationFailedError = CodeIISS + iota
	CalculationNotFinishedError
)
View Source
const (
	Revision1 = iota + 1
	Revision2
	Revision3
	Revision4
	Revision5
	Revision6
	Revision7
	Revision8
	Revision9
	Revision10
	Revision11
	Revision12
	Revision13
	Revision14
	Revision15
	RevisionReserved
)
View Source
const (
	DefaultRevision = Revision1
	MaxRevision     = RevisionReserved - 1
	LatestRevision  = Revision13
)
View Source
const (
	RevisionIISS = Revision5

	RevisionDecentralize = Revision6

	RevisionFixTotalDelegated = Revision7

	RevisionFixBugDisabledPRep = Revision8

	RevisionFixBurnEventSignature  = Revision9
	RevisionMultipleUnstakes       = Revision9
	RevisionFixEmailValidation     = Revision9
	RevisionDelegationSlotMaxTo100 = Revision9
	RevisionSystemSCORE            = Revision9

	RevisionFixInvalidUnstake = Revision11

	RevisionBurnV2 = Revision12

	RevisionICON2     = Revision13
	RevisionICON1Last = RevisionICON2 - 1

	RevisionExtraMainPReps = Revision14
)
View Source
const (
	CodeIISS = errors.CodeCritical + errors.CodeSegment*(iota+1)
)
View Source
const (
	IllegalArgumentError = scoreresult.RevertedError + iota
)

Variables

View Source
var (
	BigIntZero           = new(big.Int)
	BigIntICX            = big.NewInt(1_000_000_000_000_000_000)
	BigIntInitialIRep    = new(big.Int).Mul(big.NewInt(InitialIRep), BigIntICX)
	BigIntMinIRep        = new(big.Int).Mul(big.NewInt(MinIRep), BigIntICX)
	BigIntIScoreICXRatio = big.NewInt(int64(IScoreICXRatio))
)

The following variables are read-only

Functions

func ValueToRevision

func ValueToRevision(v int) module.Revision

Types

This section is empty.

Jump to

Keyboard shortcuts

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