Documentation ¶
Index ¶
- Constants
- Variables
- type BlockInfo
- type Cache_MinerInfo
- type CessEventRecords
- type Chainer
- type ChallengeInfo
- type Event_AlreadyFrozen
- type Event_Balances_Withdraw
- type Event_BuyFile
- type Event_BuyPackage
- type Event_BuySpace
- type Event_ChallengeProof
- type Event_Claimed
- type Event_ClearInvalidFile
- type Event_DeleteFile
- type Event_Deposit
- type Event_DrawFaucetMoney
- type Event_EndOfBufferPeriod
- type Event_FaucetTopUpMoney
- type Event_FileChangeState
- type Event_FileUpdate
- type Event_FileUpload
- type Event_FillerUpload
- type Event_IncreaseCollateral
- type Event_InsertFileSlice
- type Event_LeaseExpireIn24Hours
- type Event_LeaseExpired
- type Event_LessThan24Hours
- type Event_MinerClaim
- type Event_MinerExit
- type Event_OutstandingChallenges
- type Event_PPBNoOnTimeSubmit
- type Event_PPDNoOnTimeSubmit
- type Event_PackageRenewal
- type Event_PackageUpgrade
- type Event_Purchased
- type Event_ReceiveSpace
- type Event_RecoverFile
- type Event_Redeemed
- type Event_Registered
- type Event_RegistrationScheduler
- type Event_SignedPhaseStarted
- type Event_SolutionStored
- type Event_StartOfBufferPeriod
- type Event_TimedTask
- type Event_TimingStorageSpace
- type Event_UnsignedPhaseStarted
- type Event_UpdataBeneficiary
- type Event_UpdataIp
- type Event_UpdateScheduler
- type Event_UploadDeclaration
- type Event_VerifyProof
- type FileBlockId
- type FileHash
- type FileMetaInfo
- type FillerMetaInfo
- type IpAddress
- type Ipv4Type
- type Ipv4Type_Query
- type Ipv6Type
- type MinerInfo
- type Proof
- type ProofResult
- type RewardInfo
- type SchedulerInfo
- type SpacePackage
- type UserBrief
Constants ¶
View Source
const ( FILE_STATE_ACTIVE = "active" FILE_STATE_PENDING = "pending" )
View Source
const ( MINER_STATE_POSITIVE = "positive" MINER_STATE_FROZEN = "frozen" MINER_STATE_EXIT = "exit" )
View Source
const (
ERR_Failed = "Failed"
)
Variables ¶
View Source
var ( ERR_RPC_CONNECTION = errors.New("rpc connection failed") ERR_RPC_TIMEOUT = errors.New("timeout") ERR_RPC_EMPTY_VALUE = errors.New("empty") )
error type
Functions ¶
This section is empty.
Types ¶
type BlockInfo ¶
type BlockInfo struct { MinerId types.U64 BlockSize types.U64 BlockNum types.U32 BlockId FileBlockId MinerIp Ipv4Type MinerAcc types.AccountID }
file block info
type Cache_MinerInfo ¶
type Cache_MinerInfo struct { Peerid uint64 `json:"peerid"` Ip string `json:"ip"` Free uint64 `json:"free"` }
cache storage miner
type CessEventRecords ¶
type CessEventRecords struct { //system types.EventRecords //SegmentBook SegmentBook_PPBNoOnTimeSubmit []Event_PPBNoOnTimeSubmit SegmentBook_PPDNoOnTimeSubmit []Event_PPDNoOnTimeSubmit SegmentBook_ChallengeProof []Event_ChallengeProof SegmentBook_VerifyProof []Event_VerifyProof SegmentBook_OutstandingChallenges []Event_OutstandingChallenges //Sminer Sminer_Registered []Event_Registered Sminer_TimedTask []Event_TimedTask Sminer_DrawFaucetMoney []Event_DrawFaucetMoney Sminer_FaucetTopUpMoney []Event_FaucetTopUpMoney Sminer_LessThan24Hours []Event_LessThan24Hours Sminer_AlreadyFrozen []Event_AlreadyFrozen Sminer_MinerExit []Event_MinerExit Sminer_MinerClaim []Event_MinerClaim Sminer_IncreaseCollateral []Event_IncreaseCollateral Sminer_Deposit []Event_Deposit Sminer_Redeemed []Event_Redeemed Sminer_Claimed []Event_Claimed Sminer_TimingStorageSpace []Event_TimingStorageSpace Sminer_UpdataBeneficiary []Event_UpdataBeneficiary Sminer_UpdataIp []Event_UpdataIp Sminer_StartOfBufferPeriod []Event_StartOfBufferPeriod Sminer_EndOfBufferPeriod []Event_EndOfBufferPeriod //FileBank FileBank_DeleteFile []Event_DeleteFile FileBank_BuySpace []Event_BuySpace FileBank_FileUpload []Event_FileUpload FileBank_FileUpdate []Event_FileUpdate FileBank_LeaseExpireIn24Hours []Event_LeaseExpireIn24Hours FileBank_FileChangeState []Event_FileChangeState FileBank_BuyFile []Event_BuyFile FileBank_Purchased []Event_Purchased FileBank_InsertFileSlice []Event_InsertFileSlice FileBank_LeaseExpired []Event_LeaseExpired FileBank_FillerUpload []Event_FillerUpload FileBank_ClearInvalidFile []Event_ClearInvalidFile FileBank_RecoverFile []Event_RecoverFile FileBank_ReceiveSpace []Event_ReceiveSpace FileBank_UploadDeclaration []Event_UploadDeclaration FileBank_BuyPackage []Event_BuyPackage FileBank_PackageUpgrade []Event_PackageUpgrade FileBank_PackageRenewal []Event_PackageRenewal //FileMap FileMap_RegistrationScheduler []Event_RegistrationScheduler FileMap_UpdateScheduler []Event_UpdateScheduler //other system ElectionProviderMultiPhase_UnsignedPhaseStarted []Event_UnsignedPhaseStarted ElectionProviderMultiPhase_SignedPhaseStarted []Event_SignedPhaseStarted ElectionProviderMultiPhase_SolutionStored []Event_SolutionStored Balances_Withdraw []Event_Balances_Withdraw }
cess events type
type Chainer ¶
type Chainer interface { // Getpublickey returns its own public key GetPublicKey() []byte // GetStashPublicKey returns its stash account public key GetStashPublicKey() ([]byte, error) // Getpublickey returns its own private key GetMnemonicSeed() string // NewAccountId returns the account id NewAccountId(pubkey []byte) types.AccountID // GetSyncStatus returns whether the block is being synchronized GetSyncStatus() (bool, error) // GetChainStatus returns chain status GetChainStatus() bool // Getstorageminerinfo is used to get the details of the miner GetStorageMinerInfo(pkey []byte) (MinerInfo, error) // Getallstorageminer is used to obtain the AccountID of all miners GetAllStorageMiner() ([]types.AccountID, error) // GetFileMetaInfo is used to get the meta information of the file GetFileMetaInfo(fid string) (FileMetaInfo, error) // GetAllSchedulerInfo is used to get information about all schedules GetAllSchedulerInfo() ([]SchedulerInfo, error) // GetProofs is used to get all the proofs to be verified GetProofs() ([]Proof, error) // GetCessAccount is used to get the account in cess chain format GetCessAccount() (string, error) // GetAccountInfo is used to get account information GetAccountInfo(pkey []byte) (types.AccountInfo, error) // GetSpacePackageInfo is used to get the space package information of the account GetSpacePackageInfo(pkey []byte) (SpacePackage, error) // Register is used by the scheduling service to register Register(stash, ip, port string) (string, error) // SubmitProofResults is used to submit proof verification results SubmitProofResults(data []ProofResult) (string, error) // SubmitFillerMeta is used to submit the meta information of the filler SubmitFillerMeta(miner_acc types.AccountID, info []FillerMetaInfo) (string, error) // SubmitFileMeta is used to submit the meta information of the file SubmitFileMeta(fid string, fsize uint64, block []BlockInfo) (string, error) // Update is used to update the communication address of the scheduling service Update(ip, port string) (string, error) }
type ChallengeInfo ¶
type ChallengeInfo struct { File_size types.U64 File_type types.U8 Block_list types.Bytes File_id FileHash Shard_id FileBlockId Random []types.Bytes }
challenge info
type Event_AlreadyFrozen ¶
type Event_Balances_Withdraw ¶
type Event_BuyFile ¶
type Event_BuyPackage ¶
type Event_BuySpace ¶
type Event_ChallengeProof ¶
type Event_Claimed ¶
type Event_ClearInvalidFile ¶
type Event_DeleteFile ¶
type Event_DeleteFile struct { Phase types.Phase Acc types.AccountID Fileid FileHash Topics []types.Hash }
------------------------FileBank-------------------------------
type Event_Deposit ¶
type Event_DrawFaucetMoney ¶
type Event_EndOfBufferPeriod ¶
type Event_FaucetTopUpMoney ¶
type Event_FileChangeState ¶
type Event_FileUpdate ¶
type Event_FileUpload ¶
type Event_FillerUpload ¶
type Event_InsertFileSlice ¶
type Event_LeaseExpired ¶
type Event_LessThan24Hours ¶
type Event_MinerClaim ¶
type Event_MinerExit ¶
type Event_PPBNoOnTimeSubmit ¶
type Event_PPBNoOnTimeSubmit struct { Phase types.Phase Acc types.AccountID SegmentId types.U64 Topics []types.Hash }
------------------------SegmentBook----------------------------
type Event_PPDNoOnTimeSubmit ¶
type Event_PackageRenewal ¶
type Event_PackageUpgrade ¶
type Event_Purchased ¶
type Event_ReceiveSpace ¶
type Event_RecoverFile ¶
type Event_Redeemed ¶
type Event_Registered ¶
type Event_Registered struct { Phase types.Phase Acc types.AccountID StakingVal types.U128 Topics []types.Hash }
------------------------Sminer---------------------------------
type Event_RegistrationScheduler ¶
type Event_RegistrationScheduler struct { Phase types.Phase Acc types.AccountID Ip Ipv4Type_Query Topics []types.Hash }
------------------------FileMap--------------------------------
type Event_SolutionStored ¶
type Event_UnsignedPhaseStarted ¶
------------------------other system---------------------------
type Event_UpdataBeneficiary ¶
type Event_UpdataIp ¶
type Event_UpdateScheduler ¶
type Event_UploadDeclaration ¶
type Event_VerifyProof ¶
type FileBlockId ¶
type FileMetaInfo ¶
type FileMetaInfo struct { Size types.U64 Index types.U32 State types.Bytes // Users []types.AccountID // Names []types.Bytes UserBriefs []UserBrief BlockInfo []BlockInfo }
file meta info
type FillerMetaInfo ¶
type FillerMetaInfo struct { Size types.U64 Index types.U32 BlockNum types.U32 BlockSize types.U32 ScanSize types.U32 Acc types.AccountID Hash FileHash }
filler meta info
type Ipv4Type_Query ¶
type MinerInfo ¶
type MinerInfo struct { PeerId types.U64 IncomeAcc types.AccountID Ip Ipv4Type Collaterals types.U128 State types.Bytes Power types.U128 Space types.U128 RewardInfo RewardInfo }
storage miner info
type Proof ¶
type Proof struct { FileId FileHash Miner_pubkey types.AccountID Challenge_info ChallengeInfo Mu []types.Bytes Sigma types.Bytes Name types.Bytes U []types.Bytes }
proof type
type ProofResult ¶
type ProofResult struct { PublicKey types.AccountID FileId FileHash Shard_id FileBlockId Result types.Bool }
proof result
type RewardInfo ¶
type SchedulerInfo ¶
scheduler info
Click to show internal directories.
Click to hide internal directories.