Documentation
¶
Index ¶
- Constants
- Variables
- type BucketInfo
- type CacherInfo
- type Chain
- type EventRecords
- type Event_AlreadyFrozen
- type Event_Balances_Withdraw
- type Event_BuyFile
- type Event_BuySpace
- type Event_CalculateEnd
- type Event_ChallengeProof
- type Event_Claimed
- type Event_ClearInvalidFile
- type Event_CreateBucket
- type Event_DeleteBucket
- type Event_DeleteFile
- type Event_Deposit
- type Event_DrawFaucetMoney
- type Event_EndOfBufferPeriod
- type Event_ExpansionSpace
- 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_OssDestroy
- type Event_OssRegister
- type Event_OssUpdate
- type Event_OutstandingChallenges
- type Event_PPBNoOnTimeSubmit
- type Event_PPDNoOnTimeSubmit
- type Event_Purchased
- type Event_ReceiveSpace
- type Event_RecoverFile
- type Event_Redeemed
- type Event_Registered
- type Event_RegistrationScheduler
- type Event_RenewalSpace
- type Event_ReplaceFiller
- type Event_SignedPhaseStarted
- type Event_SolutionStored
- type Event_StartOfBufferPeriod
- type Event_TimedTask
- type Event_TimingStorageSpace
- type Event_TransferReport
- type Event_UnsignedPhaseStarted
- type Event_UpdataBeneficiary
- type Event_UpdataIp
- type Event_UpdateScheduler
- type Event_UploadDeclaration
- type Event_VerifyProof
- type FileHash
- type FileMetaInfo
- type FragmentList
- type IdleMetaInfo
- type MinerInfo
- type MinerSnapShot
- type MinerTaskList
- type NetSnapShot
- type NetSnapShotStorage
- type Random
- type RewardInfo
- type SegmentInfo
- type SegmentList
- type StorageOrder
- type UserBrief
- type UserSpaceInfo
Constants ¶
View Source
const ( // OSS is a module about DeOSS OSS = "Oss" // FILEBANK is a module about data metadata, bucket info, etc. FILEBANK = "FileBank" // TEEWOEKER is a module about TEE TEEWORKER = "TeeWorker" // SMINER is a module about storage miners SMINER = "Sminer" // SMINER is a module about storage miners STORAGEHANDLER = "StorageHandler" // NETSNAPSHOT = "NetSnapShotStorage" // SYSTEM is a module about the system SYSTEM = "System" )
Pallets
View Source
const ( // OSS // OSS AUTHORITYLIST = "AuthorityList" // SMINER ALLMINER = "AllMiner" MINERITEMS = "MinerItems" // TEEWORKER SCHEDULERMAP = "SchedulerMap" // FILEBANK FILE = "File" BUCKET = "Bucket" BUCKETLIST = "UserBucketList" DEALMAP = "DealMap" PENDINGREPLACE = "PendingReplacements" // STORAGEHANDLER USERSPACEINFO = "UserOwnedSpace" UNITPRICE = "UnitPrice" // NetSnapShotStorage NETSNAPSHOTSTORAGE = "NetSnapShotStorage" // SYSTEM ACCOUNT = "Account" EVENTS = "Events" )
Chain state
View Source
const ( // OSS TX_OSS_REGISTER = OSS + DOT + "register" TX_OSS_UPDATE = OSS + DOT + "update" TX_OSS_DESTORY = OSS + DOT + "destroy" // SMINER TX_SMINER_REGISTER = SMINER + DOT + "regnstk" TX_SMINER_EXIT = SMINER + DOT + "exit_miner" TX_SMINER_INCREASESTAKES = SMINER + DOT + "increase_collateral" TX_SMINER_UPDATEADDR = SMINER + DOT + "update_ip" TX_SMINER_UPDATEINCOME = SMINER + DOT + "update_beneficiary" // FILEBANK TX_FILEBANK_PUTBUCKET = FILEBANK + DOT + "create_bucket" TX_FILEBANK_DELBUCKET = FILEBANK + DOT + "delete_bucket" TX_FILEBANK_DELFILE = FILEBANK + DOT + "delete_file" TX_FILEBANK_UPLOADDEC = FILEBANK + DOT + "upload_declaration" TX_FILEBANK_ADDIDLESPACE = FILEBANK + DOT + "test_add_idle_space" TX_FILEBANK_FILEREPORT = FILEBANK + DOT + "transfer_report" TX_FILEBANK_REPLACEFILE = FILEBANK + DOT + "replace_file_report" )
Extrinsics
View Source
const ( Role_OSS = "OSS" Role_DEOSS = "DEOSS" Role_BUCKET = "BUCKET" )
View Source
const ( Active = iota Calculate Missing Recovery )
View Source
const ( MINER_STATE_POSITIVE = "positive" MINER_STATE_FROZEN = "frozen" MINER_STATE_EXIT = "exit" )
View Source
const ( ERR_Failed = "failed" ERR_Timeout = "timeout" ERR_Empty = "empty" )
View Source
const DOT = "."
DOT is "." character
View Source
const TokenPrecision_CESS = "000000000000"
Unit precision of CESS token
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BucketInfo ¶
type CacherInfo ¶
type Chain ¶
type Chain interface {
// Getpublickey returns its own public key
GetPublicKey() []byte
// 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
QueryStorageMiner(pkey []byte) (MinerInfo, error)
//
QueryDeoss(pubkey []byte) (string, 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)
// 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)
//
IsGrantor(pubkey []byte) (bool, error)
// GetBucketList is used to obtain all buckets of the user
GetBucketList(owner_pkey []byte) ([]types.Bytes, error)
// GetBucketInfo is used to query bucket details
GetBucketInfo(owner_pkey []byte, name string) (BucketInfo, error)
// GetGrantor is used to query the user's space grantor
GetGrantor(pkey []byte) (types.AccountID, error)
// GetState is used to obtain OSS status information
GetState(pubkey []byte) (string, error)
// Register is used to register OSS or BUCKET roles
Register(name, multiaddr string, income string, pledge uint64) (string, error)
// Update is used to update the communication address of the scheduling service
UpdateAddress(name, multiaddr string) (string, error)
//
UpdateIncomeAccount(pubkey []byte) (string, error)
// CreateBucket is used to create a bucket for users
CreateBucket(owner_pkey []byte, name string) (string, error)
// DeleteBucket is used to delete buckets created by users
DeleteBucket(owner_pkey []byte, name string) (string, error)
//
DeleteFile(owner_pkey []byte, filehash string) (string, FileHash, error)
//
UploadDeclaration(filehash string, dealinfo []SegmentList, user UserBrief) (string, error)
//
GetStorageOrder(roothash string) (StorageOrder, error)
//
SubmitIdleFile(idlefiles []IdleMetaInfo) (string, error)
//
SubmitFileReport(roothash []FileHash) (string, []FileHash, error)
//
ReplaceFile(roothash []FileHash) (string, []FileHash, error)
//
QueryPendingReplacements(owner_pkey []byte) (types.U32, error)
//
QueryUserSpaceInfo(pubkey []byte) (UserSpaceInfo, error)
//
IncreaseStakes(tokens *big.Int) (string, error)
//
Exit(role string) (string, error)
//
QuerySpacePricePerGib() (string, error)
//
QueryNetSnapShot() (NetSnapShot, error)
}
type EventRecords ¶
type EventRecords struct {
// AUDIT
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_FileUpload []Event_FileUpload
FileBank_FileUpdate []Event_FileUpdate
FileBank_FileChangeState []Event_FileChangeState
FileBank_BuyFile []Event_BuyFile
FileBank_Purchased []Event_Purchased
FileBank_InsertFileSlice []Event_InsertFileSlice
FileBank_FillerUpload []Event_FillerUpload
FileBank_ClearInvalidFile []Event_ClearInvalidFile
FileBank_RecoverFile []Event_RecoverFile
FileBank_ReceiveSpace []Event_ReceiveSpace
FileBank_UploadDeclaration []Event_UploadDeclaration
FileBank_CreateBucket []Event_CreateBucket
FileBank_DeleteBucket []Event_DeleteBucket
FileBank_TransferReport []Event_TransferReport
FileBank_ReplaceFiller []Event_ReplaceFiller
FileBank_CalculateEnd []Event_CalculateEnd
// StorageHandler
StorageHandler_BuySpace []Event_BuySpace
StorageHandler_ExpansionSpace []Event_ExpansionSpace
StorageHandler_RenewalSpace []Event_RenewalSpace
StorageHandler_LeaseExpired []Event_LeaseExpired
StorageHandler_LeaseExpireIn24Hours []Event_LeaseExpireIn24Hours
// TeeWorker
TeeWorker_RegistrationScheduler []Event_RegistrationScheduler
TeeWorker_UpdateScheduler []Event_UpdateScheduler
// OSS
Oss_OssRegister []Event_OssRegister
Oss_OssUpdate []Event_OssUpdate
Oss_OssDestroy []Event_OssDestroy
// System
types.EventRecords
}
Events
type Event_AlreadyFrozen ¶
type Event_Balances_Withdraw ¶
type Event_BuyFile ¶
type Event_BuySpace ¶
type Event_BuySpace struct {
Phase types.Phase
Acc types.AccountID
Storage_capacity types.U128
Spend types.U128
Topics []types.Hash
}
------------------------StorageHandler--------------------------------
type Event_CalculateEnd ¶ added in v0.0.11
type Event_ChallengeProof ¶
type Event_Claimed ¶
type Event_ClearInvalidFile ¶
type Event_CreateBucket ¶
type Event_DeleteBucket ¶
type Event_DeleteFile ¶
type Event_DeleteFile struct {
Phase types.Phase
Operator types.AccountID
Owner types.AccountID
Filehash FileHash
Topics []types.Hash
}
------------------------FileBank----------------------
type Event_Deposit ¶
type Event_DrawFaucetMoney ¶
type Event_EndOfBufferPeriod ¶
type Event_ExpansionSpace ¶
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_OssDestroy ¶ added in v0.0.24
type Event_OssRegister ¶
type Event_OssRegister struct {
Phase types.Phase
Acc types.AccountID
Endpoint types.Bytes
Topics []types.Hash
}
------------------------Oss---------------------------
type Event_OssUpdate ¶
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_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 types.Bytes
Topics []types.Hash
}
------------------------TEE Worker--------------------
type Event_RenewalSpace ¶
type Event_ReplaceFiller ¶ added in v0.0.11
type Event_SolutionStored ¶
type Event_TransferReport ¶ added in v0.0.11
type Event_UnsignedPhaseStarted ¶
------------------------System------------------------
type Event_UpdataBeneficiary ¶
type Event_UpdataIp ¶
type Event_UpdateScheduler ¶
type Event_UploadDeclaration ¶
type Event_VerifyProof ¶
type FileMetaInfo ¶
type FragmentList ¶
type IdleMetaInfo ¶ added in v0.0.6
type MinerSnapShot ¶ added in v0.0.26
type MinerTaskList ¶
type NetSnapShot ¶ added in v0.0.26
type NetSnapShot struct {
NetSnapShot NetSnapShotStorage
MinerSnapShot []MinerSnapShot
}
type NetSnapShotStorage ¶ added in v0.0.26
type RewardInfo ¶
type SegmentInfo ¶
type SegmentInfo struct {
Hash FileHash
FragmentList []FragmentList
}
type SegmentList ¶
type StorageOrder ¶
type StorageOrder struct {
Stage types.U8
Count types.U8
SegmentList []SegmentList
NeededList []SegmentList
User UserBrief
AssignedMiner []MinerTaskList
CompleteList []types.AccountID
}
Click to show internal directories.
Click to hide internal directories.