Documentation
¶
Index ¶
Constants ¶
View Source
const SignatureDomainSeparation_RemoveDataCap = "fil_removedatacap:"
Variables ¶
View Source
var MinVerifiedDealSize = abi.NewStoragePower(1 << 20)
Functions ¶
This section is empty.
Types ¶
type AddVerifiedClientParams ¶
func (*AddVerifiedClientParams) MarshalCBOR ¶
func (t *AddVerifiedClientParams) MarshalCBOR(w io.Writer) error
func (*AddVerifiedClientParams) UnmarshalCBOR ¶
func (t *AddVerifiedClientParams) UnmarshalCBOR(r io.Reader) (err error)
type AddVerifierParams ¶
func (*AddVerifierParams) MarshalCBOR ¶
func (t *AddVerifierParams) MarshalCBOR(w io.Writer) error
func (*AddVerifierParams) UnmarshalCBOR ¶
func (t *AddVerifierParams) UnmarshalCBOR(r io.Reader) (err 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 RemoveDataCapParams ¶
type RemoveDataCapParams struct {
VerifiedClientToRemove addr.Address
DataCapAmountToRemove DataCap
VerifierRequest1 RemoveDataCapRequest
VerifierRequest2 RemoveDataCapRequest
}
func (*RemoveDataCapParams) MarshalCBOR ¶
func (t *RemoveDataCapParams) MarshalCBOR(w io.Writer) error
func (*RemoveDataCapParams) UnmarshalCBOR ¶
func (t *RemoveDataCapParams) UnmarshalCBOR(r io.Reader) (err error)
type RemoveDataCapProposal ¶
type RemoveDataCapProposal struct {
// VerifiedClient is the client address to remove the DataCap from
// The address must be an ID address
VerifiedClient addr.Address
// DataCapAmount is the amount of DataCap to be removed from the VerifiedClient address
DataCapAmount DataCap
// RemovalProposalID is the counter of the proposal sent by the Verifier for the VerifiedClient
RemovalProposalID RmDcProposalID
}
A verifier who wants to send/agree to a RemoveDataCapRequest should sign a RemoveDataCapProposal and send the signed proposal to the root key holder.
func (*RemoveDataCapProposal) MarshalCBOR ¶
func (t *RemoveDataCapProposal) MarshalCBOR(w io.Writer) error
func (*RemoveDataCapProposal) UnmarshalCBOR ¶
func (t *RemoveDataCapProposal) UnmarshalCBOR(r io.Reader) (err error)
type RemoveDataCapRequest ¶
type RemoveDataCapRequest struct {
// Verifier is the verifier address used for VerifierSignature.
// The address can be address.SECP256K1 or address.BLS
Verifier addr.Address
// VerifierSignature is the Verifier's signature over a RemoveDataCapProposal
VerifierSignature crypto.Signature
}
A verifier who wants to submit a request should send their RemoveDataCapRequest to the RKH.
func (*RemoveDataCapRequest) MarshalCBOR ¶
func (t *RemoveDataCapRequest) MarshalCBOR(w io.Writer) error
func (*RemoveDataCapRequest) UnmarshalCBOR ¶
func (t *RemoveDataCapRequest) UnmarshalCBOR(r io.Reader) (err error)
type RemoveDataCapReturn ¶
func (*RemoveDataCapReturn) MarshalCBOR ¶
func (t *RemoveDataCapReturn) MarshalCBOR(w io.Writer) error
func (*RemoveDataCapReturn) UnmarshalCBOR ¶
func (t *RemoveDataCapReturn) UnmarshalCBOR(r io.Reader) (err error)
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) (err error)
type RmDcProposalID ¶
type RmDcProposalID struct {
ProposalID uint64
}
func (*RmDcProposalID) MarshalCBOR ¶
func (t *RmDcProposalID) MarshalCBOR(w io.Writer) error
func (*RmDcProposalID) UnmarshalCBOR ¶
func (t *RmDcProposalID) UnmarshalCBOR(r io.Reader) (err 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
// RemoveDataCapProposalIDs keeps the counters of the datacap removal proposal a verifier has submitted for a
//specific client. Unique proposal ids ensure that removal proposals cannot be replayed.√
// AddrPairKey is constructed as <verifier address, client address>, both using ID addresses.
RemoveDataCapProposalIDs cid.Cid // HAMT[AddrPairKey]RmDcProposalID
}
func ConstructState ¶
rootKeyAddress comes from genesis.
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) (err error)
Click to show internal directories.
Click to hide internal directories.