strgpwr

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const SlashablePowerDelay = 200

Variables

View Source
var (
	SectorSizes = []uint64{
		16 << 20,
		256 << 20,
		1 << 30,
	}
)

Functions

func NewMinerSet added in v0.0.4

func NewMinerSet(tb testing.TB) *minerSet

used to calculate storage power state Miner and ProvingBucket Cid's.

Types

type CreateStorageMinerParams

type CreateStorageMinerParams struct {
	Owner      address.Address
	Worker     address.Address
	SectorSize uint64
	PeerID     peer.ID
}

func (*CreateStorageMinerParams) MarshalCBOR

func (t *CreateStorageMinerParams) MarshalCBOR(w io.Writer) error

func (*CreateStorageMinerParams) UnmarshalCBOR

func (t *CreateStorageMinerParams) UnmarshalCBOR(r io.Reader) error

type PledgeCollateralParams added in v0.0.4

type PledgeCollateralParams struct {
	Size types.BigInt
}

func (*PledgeCollateralParams) MarshalCBOR added in v0.0.4

func (t *PledgeCollateralParams) MarshalCBOR(w io.Writer) error

func (*PledgeCollateralParams) UnmarshalCBOR added in v0.0.4

func (t *PledgeCollateralParams) UnmarshalCBOR(r io.Reader) error

type PowerLookupParams added in v0.0.4

type PowerLookupParams struct {
	Miner address.Address
}

func (*PowerLookupParams) MarshalCBOR added in v0.0.4

func (t *PowerLookupParams) MarshalCBOR(w io.Writer) error

func (*PowerLookupParams) UnmarshalCBOR added in v0.0.4

func (t *PowerLookupParams) UnmarshalCBOR(r io.Reader) error

type StoragePowerState

type StoragePowerState struct {
	Miners         cid.Cid
	ProvingBuckets cid.Cid // amt[ProvingPeriodBucket]hamt[minerAddress]struct{}
	MinerCount     uint64
	LastMinerCheck uint64

	TotalStorage types.BigInt
}

func (*StoragePowerState) MarshalCBOR added in v0.0.4

func (t *StoragePowerState) MarshalCBOR(w io.Writer) error

func (*StoragePowerState) UnmarshalCBOR added in v0.0.4

func (t *StoragePowerState) UnmarshalCBOR(r io.Reader) error

type UpdateStorageParams

type UpdateStorageParams struct {
	Delta                    types.BigInt
	NextProvingPeriodEnd     uint64
	PreviousProvingPeriodEnd uint64
}

func (*UpdateStorageParams) MarshalCBOR

func (t *UpdateStorageParams) MarshalCBOR(w io.Writer) error

func (*UpdateStorageParams) UnmarshalCBOR

func (t *UpdateStorageParams) UnmarshalCBOR(r io.Reader) error

Jump to

Keyboard shortcuts

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