Documentation ¶
Index ¶
- Variables
- type Actor
- func (a Actor) AddVerifiedClient(rt vmr.Runtime, params *AddVerifiedClientParams) *adt.EmptyValue
- func (a Actor) AddVerifier(rt vmr.Runtime, params *AddVerifierParams) *adt.EmptyValue
- func (a Actor) Constructor(rt vmr.Runtime, rootKey *addr.Address) *adt.EmptyValue
- func (a Actor) Exports() []interface{}
- func (a Actor) RemoveVerifier(rt vmr.Runtime, verifierAddr *addr.Address) *adt.EmptyValue
- func (a Actor) RestoreBytes(rt vmr.Runtime, params *RestoreBytesParams) *adt.EmptyValue
- func (a Actor) UseBytes(rt vmr.Runtime, params *UseBytesParams) *adt.EmptyValue
- type AddVerifiedClientParams
- type AddVerifierParams
- type AddrKey
- type DataCap
- type RestoreBytesParams
- type State
- func (st *State) DeleteVerifiedClient(store adt.Store, vcAddress addr.Address) error
- func (st *State) DeleteVerifier(store adt.Store, address addr.Address) error
- func (st *State) GetVerifiedClient(store adt.Store, vcAddress addr.Address) (DataCap, bool, error)
- func (st *State) GetVerifier(store adt.Store, address addr.Address) (*DataCap, bool, error)
- func (t *State) MarshalCBOR(w io.Writer) error
- func (st *State) PutVerifiedClient(store adt.Store, vcAddress addr.Address, vcCap DataCap) error
- func (st *State) PutVerifier(store adt.Store, verifierAddr addr.Address, verifierCap DataCap) error
- func (t *State) UnmarshalCBOR(r io.Reader) error
- type UseBytesParams
Constants ¶
This section is empty.
Variables ¶
View Source
var MinVerifiedDealSize abi.StoragePower = big.NewInt(1 << 20) // PARAM_FINISH
Functions ¶
This section is empty.
Types ¶
type Actor ¶
type Actor struct{}
func (Actor) AddVerifiedClient ¶
func (a Actor) AddVerifiedClient(rt vmr.Runtime, params *AddVerifiedClientParams) *adt.EmptyValue
func (Actor) AddVerifier ¶
func (a Actor) AddVerifier(rt vmr.Runtime, params *AddVerifierParams) *adt.EmptyValue
func (Actor) Constructor ¶
func (Actor) RemoveVerifier ¶
func (Actor) RestoreBytes ¶
func (a Actor) RestoreBytes(rt vmr.Runtime, params *RestoreBytesParams) *adt.EmptyValue
Called by HandleInitTimeoutDeals from StorageMarketActor when a VerifiedDeal fails to init. Restore allowable cap for the client, creating new entry if the client has been deleted.
func (Actor) UseBytes ¶
func (a Actor) UseBytes(rt vmr.Runtime, params *UseBytesParams) *adt.EmptyValue
Called by StorageMarketActor during PublishStorageDeals. Do not allow partially verified deals (DealSize must be greater than equal to allowed cap). Delete VerifiedClient if remaining DataCap is smaller than minimum VerifiedDealSize.
type AddVerifiedClientParams ¶
func (*AddVerifiedClientParams) MarshalCBOR ¶
func (t *AddVerifiedClientParams) MarshalCBOR(w io.Writer) error
func (*AddVerifiedClientParams) UnmarshalCBOR ¶
func (t *AddVerifiedClientParams) UnmarshalCBOR(r io.Reader) error
type AddVerifierParams ¶
func (*AddVerifierParams) MarshalCBOR ¶
func (t *AddVerifierParams) MarshalCBOR(w io.Writer) error
func (*AddVerifierParams) UnmarshalCBOR ¶
func (t *AddVerifierParams) UnmarshalCBOR(r io.Reader) error
type DataCap ¶
type DataCap = abi.StoragePower
DataCap is an integer number of bytes. We can introduce policy changes and replace this in the future.
type RestoreBytesParams ¶
type RestoreBytesParams struct { Address addr.Address DealSize abi.StoragePower }
func (*RestoreBytesParams) MarshalCBOR ¶
func (t *RestoreBytesParams) MarshalCBOR(w io.Writer) error
func (*RestoreBytesParams) UnmarshalCBOR ¶
func (t *RestoreBytesParams) UnmarshalCBOR(r io.Reader) error
type State ¶
type State struct { // Root key holder multisig. // Authorize and remove verifiers. RootKey addr.Address // Verifiers authorize VerifiedClients. // Verifiers delegate their DataCap. Verifiers cid.Cid // HAMT[addr.Address]DataCap // VerifiedClients can add VerifiedClientData, up to DataCap. VerifiedClients cid.Cid // HAMT[addr.Address]DataCap }
func ConstructState ¶
rootKeyAddress comes from genesis.
func (*State) DeleteVerifiedClient ¶
func (*State) DeleteVerifier ¶
func (*State) GetVerifiedClient ¶
func (*State) GetVerifier ¶
func (*State) PutVerifiedClient ¶
func (*State) PutVerifier ¶
type UseBytesParams ¶
type UseBytesParams struct { Address addr.Address // Address of verified client. DealSize abi.StoragePower // Number of bytes to use. }
func (*UseBytesParams) MarshalCBOR ¶
func (t *UseBytesParams) MarshalCBOR(w io.Writer) error
func (*UseBytesParams) UnmarshalCBOR ¶
func (t *UseBytesParams) UnmarshalCBOR(r io.Reader) error
Click to show internal directories.
Click to hide internal directories.