github.com/lino-network/lino@v0.6.11/types/const.go (about)

     1  package types
     2  
     3  const (
     4  	// Decimals - Total decimals in Lino Blockchain
     5  	// Used by both LNO and IDA.
     6  	Decimals = 100000
     7  
     8  	// KVStoreKey presents store which used by app
     9  	MainKVStoreKey         = "main"
    10  	AccountKVStoreKey      = "account"
    11  	PostKVStoreKey         = "post"
    12  	ValidatorKVStoreKey    = "validator"
    13  	GlobalKVStoreKey       = "global"
    14  	VoteKVStoreKey         = "vote"
    15  	DeveloperKVStoreKey    = "developer"
    16  	ParamKVStoreKey        = "param"
    17  	ProposalKVStoreKey     = "proposal"
    18  	ReputationV2KVStoreKey = "repv2"
    19  	BandwidthKVStoreKey    = "bandwidth"
    20  	PriceKVStoreKey        = "price"
    21  	LinoCoinDenom          = "linocoin"
    22  
    23  	// legacy, permissions are no longer used.
    24  	// Different permission level for msg
    25  	UnknownPermission     = Permission(0)
    26  	TransactionPermission = Permission(2)
    27  
    28  	// since upgrade2
    29  	// signed by the app or its affiliated accounts.
    30  	AppOrAffiliatedPermission = Permission(7)
    31  
    32  	// Different proposal result
    33  	ProposalNotPass = ProposalResult(0)
    34  	ProposalPass    = ProposalResult(1)
    35  	ProposalRevoked = ProposalResult(2)
    36  
    37  	// Different proposal types
    38  	ChangeParam       = ProposalType(0)
    39  	ContentCensorship = ProposalType(1)
    40  	ProtocolUpgrade   = ProposalType(2)
    41  
    42  	// Different donation types
    43  	DirectDeposit = DonationType(0)
    44  	Inflation     = DonationType(1)
    45  
    46  	// Different possible incomes
    47  	TransferIn           = TransferDetailType(0)
    48  	DonationIn           = TransferDetailType(1)
    49  	ClaimReward          = TransferDetailType(2)
    50  	ValidatorInflation   = TransferDetailType(3)
    51  	DeveloperInflation   = TransferDetailType(4)
    52  	VoteReturnCoin       = TransferDetailType(6)
    53  	DelegationReturnCoin = TransferDetailType(7)
    54  	ValidatorReturnCoin  = TransferDetailType(8)
    55  	DeveloperReturnCoin  = TransferDetailType(9)
    56  	ProposalReturnCoin   = TransferDetailType(11)
    57  	GenesisCoin          = TransferDetailType(12)
    58  	ClaimInterest        = TransferDetailType(13)
    59  
    60  	// Different possible outcomes
    61  	TransferOut      = TransferDetailType(20)
    62  	DonationOut      = TransferDetailType(21)
    63  	Delegate         = TransferDetailType(22)
    64  	VoterDeposit     = TransferDetailType(23)
    65  	ValidatorDeposit = TransferDetailType(24)
    66  	DeveloperDeposit = TransferDetailType(25)
    67  	ProposalDeposit  = TransferDetailType(27)
    68  
    69  	// punishment type
    70  	UnknownPunish      = PunishType(0)
    71  	PunishByzantine    = PunishType(1)
    72  	PunishAbsentCommit = PunishType(2)
    73  	PunishDidntVote    = PunishType(3)
    74  	PunishNoPriceFed   = PunishType(4)
    75  
    76  	// UsernameReCheck - UsernameReCheck is used to check user registration
    77  	UsernameReCheck        = "^[a-z]([a-z0-9-\\.]){1,19}[a-z0-9]$"
    78  	IllegalUsernameReCheck = "^[a-z0-9\\.-]*([-\\.]){2,}[a-z0-9\\.-]*$"
    79  
    80  	// MinimumUsernameLength - minimum username length
    81  	MinimumUsernameLength = 3
    82  
    83  	// MaximumUsernameLength - maximum username length
    84  	MaximumUsernameLength = 20
    85  
    86  	// MaximumMemoLength - maximum length of memo
    87  	MaximumMemoLength = 100
    88  
    89  	// MaximumJSONMetaLength - maximum length of account JSON meta
    90  	MaximumJSONMetaLength = 500
    91  
    92  	// MaxPostTitleLength - maximum length of post title
    93  	MaxPostTitleLength = 100
    94  
    95  	// MaxPostContentLength - maximum length of post content
    96  	MaxPostContentLength = 1000
    97  
    98  	// MaxGranPermValiditySec - maximum validity period, 10 years
    99  	MaxGranPermValiditySec = 10 * 3600 * 24 * 365
   100  
   101  	// KeySeparator - separate different key component
   102  	KeySeparator = "/"
   103  
   104  	// HoursPerYear - as defined by a julian year of 365.25 days
   105  	HoursPerYear = 8766
   106  
   107  	// MinutesPerYear - as defined by a julian year of 365.25 days
   108  	MinutesPerYear = HoursPerYear * 60
   109  
   110  	// MinutesPerMonth - as defined by a julian year of 365.25 days
   111  	MinutesPerMonth = MinutesPerYear / 12
   112  
   113  	// MinutesPerDay - as defined by a julian year of 365.25 days
   114  	MinutesPerDay = 60 * 24
   115  
   116  	// MaximumSdkRatLength - maximum length of sdk.Dec can pass into blockchain
   117  	MaximumSdkRatLength = 10
   118  
   119  	// MaximumLinkIdentifier - maximum length of Links identifier
   120  	MaximumLinkIdentifier = 20
   121  
   122  	// MaximumLinkURL - maximum length of Links URL
   123  	MaximumLinkURL = 300
   124  
   125  	// MaximumLengthOfPostID - maximum length of post ID
   126  	MaximumLengthOfPostID = 50
   127  
   128  	// MaximumNumOfLinks - maximum number of links per post
   129  	MaximumNumOfLinks = 10
   130  
   131  	// MaximumLengthOfDeveloperWebsite - maximum length of developer website
   132  	MaximumLengthOfDeveloperWebsite = 100
   133  
   134  	// MaximumLengthOfDeveloperDesctiption - maximum length of developer description
   135  	MaximumLengthOfDeveloperDesctiption = 1000
   136  
   137  	// MaximumLengthOfAppMetadata - maximum length of developer App meta data
   138  	MaximumLengthOfAppMetadata = 1000
   139  
   140  	// MaximumLengthOfProposalReason - maximum length of proposal reason
   141  	MaximumLengthOfProposalReason = 1000
   142  
   143  	// InitAccountWithFullCoinDayMemo - init account with full coin day memo
   144  	InitAccountWithFullCoinDayMemo = "open account deposit"
   145  
   146  	// InitAccountRegisterDepositMemo - init account deposit fee memo
   147  	InitAccountRegisterDepositMemo = "init deposit"
   148  
   149  	// PermlinkSeparator - permlink separator
   150  	PermlinkSeparator = "#"
   151  
   152  	// ParamChangeTimeout - time in secs for ParamChange to happen.
   153  	ParamChangeTimeout = 3600
   154  
   155  	// BalanceHistoryBundleSize - bundle size for balance history
   156  	BalanceHistoryBundleSize = 100
   157  
   158  	// RewardHistoryBundleSize - bundle size for reward history
   159  	RewardHistoryBundleSize = 100
   160  
   161  	// CoinDayRecordIntervalSec - coin day record in the same interval bucket will be merged
   162  	CoinDayRecordIntervalSec = 1200
   163  
   164  	// TendermintValidatorPower - every validator has const power in tendermint engine.
   165  	TendermintValidatorPower = 1000
   166  
   167  	// MaxVotedValidator - the max validators a voter can vote
   168  	MaxVotedValidators = 50
   169  
   170  	// ConsumptionFreezingPeriodSec - content bonus release period.
   171  	ConsumptionFreezingPeriodSec = 604800
   172  
   173  	// ConsumptionFrictionRate - the friction rate of a donation.
   174  	ConsumptionFrictionRate = "0.099"
   175  
   176  	// ValidatorMaxPower - the max power of validator can have
   177  	ValidatorMaxPower = int64(100000000000)
   178  
   179  	// Fast Stake-out period
   180  	Upgrade5Update1 = 110000
   181  
   182  	// Migration
   183  	Upgrade5Update2 = 1670000
   184  
   185  	// Execute future unstake events once.
   186  	Upgrade5Update3 = 2280000
   187  
   188  	// TxSigLimit - max number of sigs in one transaction
   189  	// XXX(yumin): This will actually limit the number of msg per tx to at most 2.
   190  	TxSigLimit = 2
   191  )