Storage Power Actor
Strorage power actor is responsible for keeping track of the storage power allocated at each storage miner.
The ActorCode for storage power built-in actor is hex"0004" which will be used to call methods in storage power actor. You also need to specify method number of which method you want to invoke. Please refer the each method for its method number.
CreateMiner
function createMiner(PowerTypes.CreateMinerParams memory params, uint256 value) internal returns (PowerTypes.CreateMinerReturn memory) {}
Create a new miner for the owner address and worker address.
uint CreateMinerMethodNum = 1173380165.
Params:
structCreateMinerParamsFilAddressOwner - the address of the owner.FilAddressWorker - the address of the worker.RegisteredPoStProofWindowPoStProofType - the type of RegisteredPoStProof.FilAddressPeer - peerID.FilAddress[]Multiaddrs - the multi-address which is used to control new created miner.
uint256value - the amount of token the new miner will receive
Results:
-
CreateMinerReturn
FilAddressIDAddress - The canonical ID-based address for the actor.FilAddress: RobustAddress -A more expensive but re-org-safe address for the newly created actor.
NetworkRawPower
function networkRawPower() internal returns (CommonTypes.BigInt memory) {}
Return the total raw power of the network.
uint NetworkRawPowerMethodNum = 931722534.
Params:
- null
Results:
BigIntNetworkRawPowerReturn - the raw storage power of the whole network.
MinerRawPower
function minerRawPower(uint64 minerID) internal returns (PowerTypes.MinerRawPowerReturn memory) {}
Return the raw power claimed by the specified miner, and whether the miner has more than the consensus minimum amount of storage active.
uint MinerRawPowerMethodNum = 3753401894.
Params:
- MinerRawPowerParams
uint64Miner - Miner ID
Results:
structMinerRawPowerReturnBigIntRawBytePower - the row power of the miner.boolMeetsConsensusMinimum - if the miner power meets the minimum for consensus.
MinerCount
function minerCount() internal returns (uint64) {}
Returns the total number of miners created, regardless of whether they have any pledged storage.
uint MinerRawPowerMethodNum = 3753401894.
Params:
- null
Results:
uint64MinerCountReturn - the count of the miners that the caller address has.
MinerConsensusCount
function minerConsensusCount() internal returns (int64) {}
Returns the total number of miners that have more than the consensus minimum amount of storage active.
uint MinerConsensusCountMethodNum = 196739875.
Params:
- null
Results:
int64MinerConsensusCountReturn - the count of the miners meet the consensus minimum that the caller address has.