-
Notifications
You must be signed in to change notification settings - Fork 206
/
types.go
50 lines (41 loc) · 1.79 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package types
import math "math"
const (
ProviderStakeEventName = "stake_new_provider"
ProviderStakeUpdateEventName = "stake_update_provider"
ProviderUnstakeEventName = "provider_unstake_commit"
ConsumerInsufficientFundsToStayStakedEventName = "consumer_insufficient_funds_to_stay_staked"
RelayPaymentEventName = "relay_payment"
UnresponsiveProviderUnstakeFailedEventName = "unresponsive_provider"
ProviderJailedEventName = "provider_jailed"
ProviderReportedEventName = "provider_reported"
LatestBlocksReportEventName = "provider_latest_block_report"
)
// unstake description strings
const (
UnstakeDescriptionClientUnstake = "Client unstaked entry"
UnstakeDescriptionProviderUnstake = "Provider unstaked entry"
UnstakeDescriptionInsufficientFunds = "client stake is below the minimum stake required"
)
const (
FlagMoniker = "provider-moniker"
FlagCommission = "delegate-commission"
FlagDelegationLimit = "delegate-limit"
MAX_LEN_MONIKER = 50
)
// unresponsiveness consts
const (
// Consider changing back on mainnet when providers QoS benchmarks are better // EPOCHS_NUM_TO_CHECK_CU_FOR_UNRESPONSIVE_PROVIDER uint64 = 4 // number of epochs to sum CU that the provider serviced
EPOCHS_NUM_TO_CHECK_CU_FOR_UNRESPONSIVE_PROVIDER uint64 = 8 // number of epochs to sum CU that the provider serviced
EPOCHS_NUM_TO_CHECK_FOR_COMPLAINERS uint64 = 2 // number of epochs to sum CU of complainers against the provider
)
// Frozen provider block const
const FROZEN_BLOCK = math.MaxInt64
type ClientUsedCU struct {
TotalUsed uint64
Providers map[string]uint64
}
type ClientProviderOverusedCUPercent struct {
TotalOverusedPercent float64
OverusedPercentProvider float64
}