chain

package
v0.0.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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
	TEEWORKERMAP = "TeeWorkerMap"
	TEEPODR2Pk   = "TeePodr2Pk"

	// FILEBANK
	FILE           = "File"
	BUCKET         = "Bucket"
	BUCKETLIST     = "UserBucketList"
	DEALMAP        = "DealMap"
	PENDINGREPLACE = "PendingReplacements"

	// STORAGEHANDLER
	USERSPACEINFO = "UserOwnedSpace"
	UNITPRICE     = "UnitPrice"

	// NETSNAPSHOT
	CHALLENGESNAPSHOT = "ChallengeSnapShot"

	// 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_INCREASESTAKES = SMINER + DOT + "increase_collateral"
	TX_SMINER_UPDATEPEERID   = SMINER + DOT + "update_peer_id"
	TX_SMINER_UPDATEINCOME   = SMINER + DOT + "update_beneficiary"
	TX_SMINER_CLAIMREWARD    = FILEBANK + DOT + "receive_reward"

	// 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"
	TX_FILEBANK_MINEREXITPREP = FILEBANK + DOT + "miner_exit_prep"
	TX_FILEBANK_WITHDRAW      = FILEBANK + DOT + "withdraw"
)

Extrinsics

View Source
const (
	// System
	RPC_SYS_Properties = "system_properties"
	RPC_SYS_SyncState  = "system_syncState"
	RPC_SYS_Version    = "system_version"

	//Net
	RPC_NET_Listening = "net_listening"
)

RPC Call

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"
	MINER_STATE_LOCK     = "lock"
)
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

View Source
var (
	ERR_RPC_CONNECTION  = errors.New("rpc connection failed")
	ERR_RPC_IP_FORMAT   = errors.New("unsupported ip format")
	ERR_RPC_TIMEOUT     = errors.New("timeout")
	ERR_RPC_EMPTY_VALUE = errors.New("empty")
)

Functions

This section is empty.

Types

type BucketInfo

type BucketInfo struct {
	ObjectsList []FileHash
	Authority   []types.AccountID
}

type Chain

type Chain interface {
	// QueryBlockHeight queries the block height corresponding to the block hash,
	// If the blockhash is empty, query the latest block height.
	QueryBlockHeight(blockhash string) (uint32, error)

	// QueryNodeSynchronizationSt returns the synchronization status of the current node.
	QueryNodeSynchronizationSt() (bool, error)

	// QueryNodeConnectionSt queries the connection status of the node.
	QueryNodeConnectionSt() bool

	// QueryDeoss queries deoss information.
	QueryDeoss(puk []byte) (string, error)

	// QuaryAuthorizedAcc queries the account authorized by puk.
	QuaryAuthorizedAcc(puk []byte) (types.AccountID, error)

	// QueryBucketInfo queries the information of the "bucketname" bucket of the puk.
	QueryBucketInfo(puk []byte, bucketname string) (BucketInfo, error)

	// QueryBucketList queries all buckets of the puk.
	QueryBucketList(puk []byte) ([]types.Bytes, error)

	// QueryFileMetaInfo queries the metadata of the roothash file.
	QueryFileMetadata(roothash string) (FileMetadata, error)

	// QueryStorageMiner queries storage node information.
	QueryStorageMiner(puk []byte) (MinerInfo, error)

	// QuerySminerList queries the accounts of all storage miners.
	QuerySminerList() ([]types.AccountID, error)

	// QueryAccountInfo query account information.
	QueryAccountInfo(puk []byte) (types.AccountInfo, error)

	// QueryStorageOrder query storage order information.
	QueryStorageOrder(roothash string) (StorageOrder, error)

	// QueryPendingReplacements queries the amount of idle data that can be replaced.
	QueryPendingReplacements(puk []byte) (uint32, error)

	// QueryUserSpaceInfo queries the space information purchased by the user.
	QueryUserSpaceInfo(puk []byte) (UserSpaceInfo, error)

	// QuerySpacePricePerGib query space price per GiB.
	QuerySpacePricePerGib() (string, error)

	// QueryChallengeSnapshot query challenge information snapshot.
	QueryChallengeSnapshot() (ChallengeSnapShot, error)

	// QueryTeePodr2Puk queries the public key of the TEE.
	QueryTeePodr2Puk() ([]byte, error)

	// QueryTeePeerID queries the peerid of the Tee worker.
	QueryTeePeerID(puk []byte) (PeerID, error)

	// QueryTeeInfoList queries the information of all tee workers.
	QueryTeeInfoList() ([]TeeWorkerInfo, error)

	// Register is used to register OSS or BUCKET roles.
	Register(role, multiaddr string, income string, pledge uint64) (string, error)

	// UpdateAddress updates the address of oss or sminer.
	UpdateAddress(role, multiaddr string) (string, error)

	// UpdateIncomeAcc update income account.
	UpdateIncomeAcc(puk []byte) (string, error)

	// CreateBucket creates a bucket for puk.
	CreateBucket(puk []byte, bucketname string) (string, error)

	// DeleteBucket deletes buckets for puk.
	DeleteBucket(puk []byte, bucketname string) (string, error)

	// DeleteFile deletes files for puk.
	DeleteFile(puk []byte, roothash []string) (string, []FileHash, error)

	// UploadDeclaration creates a storage order.
	UploadDeclaration(roothash string, dealinfo []SegmentList, user UserBrief) (string, error)

	// SubmitIdleMetadata Submit idle file metadata.
	SubmitIdleMetadata(idlefiles []IdleMetadata) (string, error)

	// SubmitFileReport submits a stored file report.
	SubmitFileReport(roothash []FileHash) (string, []FileHash, error)

	// ReplaceIdleFiles replaces idle files.
	ReplaceIdleFiles(roothash []FileHash) (string, []FileHash, error)

	// IncreaseStakes increase stakes.
	IncreaseStakes(tokens *big.Int) (string, error)

	// Exit exit the cess network.
	Exit(role string) (string, error)

	// ClaimRewards is used to claim rewards
	ClaimRewards() (string, error)

	// Withdraw is used to withdraw staking
	Withdraw() (string, error)

	// ExtractAccountPuk extracts the public key of the account,
	// and returns its own public key if the account is empty.
	ExtractAccountPuk(account string) ([]byte, error)

	// GetSignatureAcc returns the signature account.
	GetSignatureAcc() string

	// GetSignatureURI to get the private key of the signing account
	GetSignatureURI() string

	// GetSubstrateAPI returns Substrate API
	GetSubstrateAPI() *gsrpc.SubstrateAPI

	// GetChainState returns chain node state
	GetChainState() bool

	//
	GetMetadata() *types.Metadata

	//
	GetKeyEvents() types.StorageKey

	//
	SysProperties() (SysProperties, error)

	//
	SyncState() (SysSyncState, error)

	//
	SysVersion() (string, error)

	//
	NetListening() (bool, error)
}

func NewChainClient

func NewChainClient(rpcAddr []string, secret string, t time.Duration) (Chain, error)

type ChallengeSnapShot added in v0.0.29

type ChallengeSnapShot struct {
	NetSnapshot   NetSnapShot
	MinerSnapShot []MinerSnapShot
}

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
	Sminer_Receive             []Event_Receive
	Sminer_Withdraw            []Event_Withdraw
	// 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_AlreadyFrozen struct {
	Phase  types.Phase
	Acc    types.AccountID
	Topics []types.Hash
}

type Event_Balances_Withdraw

type Event_Balances_Withdraw struct {
	Phase  types.Phase
	Who    types.AccountID
	Amount types.U128
	Topics []types.Hash
}

type Event_BuyFile

type Event_BuyFile struct {
	Phase  types.Phase
	Acc    types.AccountID
	Money  types.U128
	Fileid types.Bytes
	Topics []types.Hash
}

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_CalculateEnd struct {
	Phase     types.Phase
	File_hash FileHash
	Topics    []types.Hash
}

type Event_ChallengeProof

type Event_ChallengeProof struct {
	Phase  types.Phase
	Miner  types.AccountID
	Fileid types.Bytes
	Topics []types.Hash
}

type Event_Claimed

type Event_Claimed struct {
	Phase   types.Phase
	Acc     types.AccountID
	Deposit types.U128
	Topics  []types.Hash
}

type Event_ClearInvalidFile

type Event_ClearInvalidFile struct {
	Phase     types.Phase
	Acc       types.AccountID
	File_hash [64]types.U8
	Topics    []types.Hash
}

type Event_CreateBucket

type Event_CreateBucket struct {
	Phase       types.Phase
	Acc         types.AccountID
	Owner       types.AccountID
	Bucket_name types.Bytes
	Topics      []types.Hash
}

type Event_DeleteBucket

type Event_DeleteBucket struct {
	Phase       types.Phase
	Acc         types.AccountID
	Owner       types.AccountID
	Bucket_name types.Bytes
	Topics      []types.Hash
}

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_Deposit struct {
	Phase   types.Phase
	Balance types.U128
	Topics  []types.Hash
}

type Event_DrawFaucetMoney

type Event_DrawFaucetMoney struct {
	Phase  types.Phase
	Topics []types.Hash
}

type Event_EndOfBufferPeriod

type Event_EndOfBufferPeriod struct {
	Phase  types.Phase
	When   types.U32
	Topics []types.Hash
}

type Event_ExpansionSpace

type Event_ExpansionSpace struct {
	Phase           types.Phase
	Acc             types.AccountID
	Expansion_space types.U128
	Fee             types.U128
	Topics          []types.Hash
}

type Event_FaucetTopUpMoney

type Event_FaucetTopUpMoney struct {
	Phase  types.Phase
	Acc    types.AccountID
	Topics []types.Hash
}

type Event_FileChangeState

type Event_FileChangeState struct {
	Phase  types.Phase
	Acc    types.AccountID
	Fileid types.Bytes
	Topics []types.Hash
}

type Event_FileUpdate

type Event_FileUpdate struct {
	Phase  types.Phase
	Acc    types.AccountID
	Fileid types.Bytes
	Topics []types.Hash
}

type Event_FileUpload

type Event_FileUpload struct {
	Phase  types.Phase
	Acc    types.AccountID
	Topics []types.Hash
}

type Event_FillerUpload

type Event_FillerUpload struct {
	Phase    types.Phase
	Acc      types.AccountID
	Filesize types.U64
	Topics   []types.Hash
}

type Event_IncreaseCollateral

type Event_IncreaseCollateral struct {
	Phase   types.Phase
	Acc     types.AccountID
	Balance types.U128
	Topics  []types.Hash
}

type Event_InsertFileSlice

type Event_InsertFileSlice struct {
	Phase  types.Phase
	Fileid types.Bytes
	Topics []types.Hash
}

type Event_LeaseExpireIn24Hours

type Event_LeaseExpireIn24Hours struct {
	Phase  types.Phase
	Acc    types.AccountID
	Size   types.U128
	Topics []types.Hash
}

type Event_LeaseExpired

type Event_LeaseExpired struct {
	Phase  types.Phase
	Acc    types.AccountID
	Size   types.U128
	Topics []types.Hash
}

type Event_LessThan24Hours

type Event_LessThan24Hours struct {
	Phase  types.Phase
	Last   types.U32
	Now    types.U32
	Topics []types.Hash
}

type Event_MinerClaim

type Event_MinerClaim struct {
	Phase  types.Phase
	Acc    types.AccountID
	Topics []types.Hash
}

type Event_MinerExit

type Event_MinerExit struct {
	Phase  types.Phase
	Acc    types.AccountID
	Topics []types.Hash
}

type Event_OssDestroy added in v0.0.24

type Event_OssDestroy struct {
	Phase  types.Phase
	Acc    types.AccountID
	Topics []types.Hash
}

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_OssUpdate struct {
	Phase        types.Phase
	Acc          types.AccountID
	New_endpoint types.Bytes
	Topics       []types.Hash
}

type Event_OutstandingChallenges

type Event_OutstandingChallenges struct {
	Phase  types.Phase
	Miner  types.AccountID
	Fileid types.Bytes
	Topics []types.Hash
}

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_PPDNoOnTimeSubmit struct {
	Phase     types.Phase
	Acc       types.AccountID
	SegmentId types.U64
	Topics    []types.Hash
}

type Event_Purchased

type Event_Purchased struct {
	Phase  types.Phase
	Acc    types.AccountID
	Fileid types.Bytes
	Topics []types.Hash
}

type Event_Receive added in v0.0.34

type Event_Receive struct {
	Phase  types.Phase
	Acc    types.AccountID
	Reward types.U128
	Topics []types.Hash
}

type Event_ReceiveSpace

type Event_ReceiveSpace struct {
	Phase  types.Phase
	Acc    types.AccountID
	Topics []types.Hash
}

type Event_RecoverFile

type Event_RecoverFile struct {
	Phase     types.Phase
	Acc       types.AccountID
	File_hash [68]types.U8
	Topics    []types.Hash
}

type Event_Redeemed

type Event_Redeemed struct {
	Phase   types.Phase
	Acc     types.AccountID
	Deposit types.U128
	Topics  []types.Hash
}

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_RenewalSpace struct {
	Phase        types.Phase
	Acc          types.AccountID
	Renewal_days types.U32
	Fee          types.U128
	Topics       []types.Hash
}

type Event_ReplaceFiller added in v0.0.11

type Event_ReplaceFiller struct {
	Phase       types.Phase
	Acc         types.AccountID
	Filler_list []FileHash
	Topics      []types.Hash
}

type Event_SignedPhaseStarted

type Event_SignedPhaseStarted struct {
	Phase  types.Phase
	Round  types.U32
	Topics []types.Hash
}

type Event_SolutionStored

type Event_SolutionStored struct {
	Phase            types.Phase
	Election_compute types.ElectionCompute
	Prev_ejected     types.Bool
	Topics           []types.Hash
}

type Event_StartOfBufferPeriod

type Event_StartOfBufferPeriod struct {
	Phase  types.Phase
	When   types.U32
	Topics []types.Hash
}

type Event_TimedTask

type Event_TimedTask struct {
	Phase  types.Phase
	Topics []types.Hash
}

type Event_TimingStorageSpace

type Event_TimingStorageSpace struct {
	Phase  types.Phase
	Topics []types.Hash
}

type Event_TransferReport added in v0.0.11

type Event_TransferReport struct {
	Phase       types.Phase
	Acc         types.AccountID
	Failed_list []FileHash
	Topics      []types.Hash
}

type Event_UnsignedPhaseStarted

type Event_UnsignedPhaseStarted struct {
	Phase  types.Phase
	Round  types.U32
	Topics []types.Hash
}

------------------------System------------------------

type Event_UpdataBeneficiary

type Event_UpdataBeneficiary struct {
	Phase  types.Phase
	Acc    types.AccountID
	New    types.AccountID
	Topics []types.Hash
}

type Event_UpdataIp

type Event_UpdataIp struct {
	Phase  types.Phase
	Acc    types.AccountID
	Old    types.Bytes
	New    types.Bytes
	Topics []types.Hash
}

type Event_UpdateScheduler

type Event_UpdateScheduler struct {
	Phase    types.Phase
	Acc      types.AccountID
	Endpoint types.Bytes
	Topics   []types.Hash
}

type Event_UploadDeclaration

type Event_UploadDeclaration struct {
	Phase     types.Phase
	Operator  types.AccountID
	Owner     types.AccountID
	Deal_hash FileHash
	Topics    []types.Hash
}

type Event_VerifyProof

type Event_VerifyProof struct {
	Phase  types.Phase
	Miner  types.AccountID
	Fileid types.Bytes
	Topics []types.Hash
}

type Event_Withdraw added in v0.0.37

type Event_Withdraw struct {
	Phase  types.Phase
	Acc    types.AccountID
	Topics []types.Hash
}

type FileHash

type FileHash [64]types.U8

type FileMetadata added in v0.0.29

type FileMetadata struct {
	Completion  types.U32
	State       types.U8
	SegmentList []SegmentInfo
	Owner       []UserBrief
}

type FragmentList

type FragmentList struct {
	Hash  FileHash
	Avail types.Bool
	Miner types.AccountID
}

type IdleMetadata added in v0.0.29

type IdleMetadata struct {
	Size      types.U64
	BlockNum  types.U32
	BlockSize types.U32
	ScanSize  types.U32
	Acc       types.AccountID
	Hash      FileHash
}

type MinerInfo

type MinerInfo struct {
	BeneficiaryAcc types.AccountID
	PeerId         PeerID
	Collaterals    types.U128
	Debt           types.U128
	State          types.Bytes
	IdleSpace      types.U128
	ServiceSpace   types.U128
	LockSpace      types.U128
}

type MinerSnapShot added in v0.0.26

type MinerSnapShot struct {
	Miner        types.AccountID
	IdleSpace    types.U128
	ServiceSpace types.U128
}

type MinerTaskList

type MinerTaskList struct {
	Account types.AccountID
	Hash    []FileHash
}

type NetSnapShot added in v0.0.26

type NetSnapShot struct {
	Start             types.U32
	TotalReward       types.U128
	TotalIdleSpace    types.U128
	TotalServiceSpace types.U128
	Random            Random
}

type NodePublickey added in v0.0.28

type NodePublickey struct {
	NodePublickey [32]types.U8
}

type PeerID added in v0.0.27

type PeerID [52]types.U8

type Random added in v0.0.26

type Random [20]types.U8

type RewardInfo

type RewardInfo struct {
	TotalReward              types.U128
	RewardIssued             types.U128
	CurrentlyAvailableReward types.U128
	OrderList                []RewardOrder
}

type RewardOrder added in v0.0.34

type RewardOrder struct {
	OrderReward types.U128
	EachShare   types.U128
	AwardCount  types.U128
	HasIssued   types.U128
}

type SegmentInfo

type SegmentInfo struct {
	Hash         FileHash
	FragmentList []FragmentList
}

type SegmentList

type SegmentList struct {
	SegmentHash  FileHash
	FragmentHash []FileHash
}

type StorageOrder

type StorageOrder struct {
	Stage         types.U8
	Count         types.U8
	SegmentList   []SegmentList
	NeededList    []SegmentList
	User          UserBrief
	AssignedMiner []MinerTaskList
	ShareInfo     []SegmentInfo
	CompleteList  []types.AccountID
}

type SysProperties added in v0.0.39

type SysProperties struct {
	Ss58Format    types.U8
	TokenDecimals types.U8
	TokenSymbol   types.Text
	SS58Prefix    types.U32
}

type SysSyncState added in v0.0.39

type SysSyncState struct {
	StartingBlock types.U32
	CurrentBlock  types.U32
	HighestBlock  types.U32
}

type TeePodr2Pk added in v0.0.27

type TeePodr2Pk [294]types.U8

type TeeWorkerInfo added in v0.0.27

type TeeWorkerInfo struct {
	ControllerAccount types.AccountID
	PeerId            PeerID
	NodeKey           NodePublickey
	StashAccount      types.AccountID
}

type UserBrief

type UserBrief struct {
	User       types.AccountID
	FileName   types.Bytes
	BucketName types.Bytes
}

type UserSpaceInfo added in v0.0.24

type UserSpaceInfo struct {
	TotalSpace     types.U128
	UsedSpace      types.U128
	LockedSpace    types.U128
	RemainingSpace types.U128
	Start          types.U32
	Deadline       types.U32
	State          types.Bytes
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL