/
power_types.go
63 lines (50 loc) · 1.73 KB
/
power_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
51
52
53
54
55
56
57
58
59
60
61
62
63
package power
import (
cbg "github.com/whyrusleeping/cbor-gen"
addr "github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v13/util/smoothing"
)
// Storage miner actor constructor params are defined here so the power actor can send them to the init actor
// to instantiate miners.
type MinerConstructorParams struct {
OwnerAddr addr.Address
WorkerAddr addr.Address
ControlAddrs []addr.Address
WindowPoStProofType abi.RegisteredPoStProof
PeerId abi.PeerID
Multiaddrs []abi.Multiaddrs
}
type CreateMinerParams struct {
Owner addr.Address
Worker addr.Address
WindowPoStProofType abi.RegisteredPoStProof
Peer abi.PeerID
Multiaddrs []abi.Multiaddrs
}
type CreateMinerReturn struct {
IDAddress addr.Address // The canonical ID-based address for the actor.
RobustAddress addr.Address // A more expensive but re-org-safe address for the newly created actor.
}
type UpdateClaimedPowerParams struct {
RawByteDelta abi.StoragePower
QualityAdjustedDelta abi.StoragePower
}
type EnrollCronEventParams struct {
EventEpoch abi.ChainEpoch
Payload []byte
}
type CurrentTotalPowerReturn struct {
RawBytePower abi.StoragePower
QualityAdjPower abi.StoragePower
PledgeCollateral abi.TokenAmount
QualityAdjPowerSmoothed smoothing.FilterEstimate
}
type NetworkRawPowerReturn = abi.StoragePower
type MinerRawPowerParams = cbg.CborInt // abi.ActorID
type MinerRawPowerReturn struct {
RawBytePower abi.StoragePower
MeetsConsensusMinimum bool
}
type MinerCountReturn = cbg.CborInt
type MinerConsensusCountReturn = cbg.CborInt