v1_3_types

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthPool        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPool          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPool = fmt.Errorf("proto: unexpected end of group")
)
View Source
var PoolStatus_name = map[int32]string{
	0: "POOL_STATUS_UNSPECIFIED",
	1: "POOL_STATUS_ACTIVE",
	2: "POOL_STATUS_DISABLED",
	3: "POOL_STATUS_NO_FUNDS",
	4: "POOL_STATUS_NOT_ENOUGH_DELEGATION",
	5: "POOL_STATUS_UPGRADING",
}
View Source
var PoolStatus_value = map[string]int32{
	"POOL_STATUS_UNSPECIFIED":           0,
	"POOL_STATUS_ACTIVE":                1,
	"POOL_STATUS_DISABLED":              2,
	"POOL_STATUS_NO_FUNDS":              3,
	"POOL_STATUS_NOT_ENOUGH_DELEGATION": 4,
	"POOL_STATUS_UPGRADING":             5,
}

Functions

This section is empty.

Types

type Funder

type Funder struct {
	// address is the address of the funder
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// amount is the current amount of funds in ukyve the funder has
	// still funded the pool with
	Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
}

Funder is the object which holds info about a single pool funder

func (*Funder) Descriptor

func (*Funder) Descriptor() ([]byte, []int)

func (*Funder) GetAddress

func (m *Funder) GetAddress() string

func (*Funder) GetAmount

func (m *Funder) GetAmount() uint64

func (*Funder) Marshal

func (m *Funder) Marshal() (dAtA []byte, err error)

func (*Funder) MarshalTo

func (m *Funder) MarshalTo(dAtA []byte) (int, error)

func (*Funder) MarshalToSizedBuffer

func (m *Funder) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Funder) ProtoMessage

func (*Funder) ProtoMessage()

func (*Funder) Reset

func (m *Funder) Reset()

func (*Funder) Size

func (m *Funder) Size() (n int)

func (*Funder) String

func (m *Funder) String() string

func (*Funder) Unmarshal

func (m *Funder) Unmarshal(dAtA []byte) error

func (*Funder) XXX_DiscardUnknown

func (m *Funder) XXX_DiscardUnknown()

func (*Funder) XXX_Marshal

func (m *Funder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Funder) XXX_Merge

func (m *Funder) XXX_Merge(src proto.Message)

func (*Funder) XXX_Size

func (m *Funder) XXX_Size() int

func (*Funder) XXX_Unmarshal

func (m *Funder) XXX_Unmarshal(b []byte) error

type Pool

type Pool struct {
	// id - unique identifier of the pool, can not be changed
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// name is a human readable name for the pool
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// runtime specified which protocol and which version needs is required
	Runtime string `protobuf:"bytes,3,opt,name=runtime,proto3" json:"runtime,omitempty"`
	Logo string `protobuf:"bytes,4,opt,name=logo,proto3" json:"logo,omitempty"`
	// config is either a JSON encoded string or a link to an external storage provider.
	// This is up to the implementation of the protocol node.
	Config string `protobuf:"bytes,5,opt,name=config,proto3" json:"config,omitempty"`
	// start_key ...
	StartKey string `protobuf:"bytes,6,opt,name=start_key,json=startKey,proto3" json:"start_key,omitempty"`
	// current_key ...
	CurrentKey string `protobuf:"bytes,7,opt,name=current_key,json=currentKey,proto3" json:"current_key,omitempty"`
	// current_summary ...
	CurrentSummary string `protobuf:"bytes,8,opt,name=current_summary,json=currentSummary,proto3" json:"current_summary,omitempty"`
	// current_index ...
	CurrentIndex uint64 `protobuf:"varint,9,opt,name=current_index,json=currentIndex,proto3" json:"current_index,omitempty"`
	// total_bundles is the number of total finalized bundles
	TotalBundles uint64 `protobuf:"varint,10,opt,name=total_bundles,json=totalBundles,proto3" json:"total_bundles,omitempty"`
	// upload_interval ...
	UploadInterval uint64 `protobuf:"varint,11,opt,name=upload_interval,json=uploadInterval,proto3" json:"upload_interval,omitempty"`
	// operating_cost ...
	OperatingCost uint64 `protobuf:"varint,12,opt,name=operating_cost,json=operatingCost,proto3" json:"operating_cost,omitempty"`
	// min_delegation ...
	MinDelegation uint64 `protobuf:"varint,13,opt,name=min_delegation,json=minDelegation,proto3" json:"min_delegation,omitempty"`
	// max_bundle_size ...
	MaxBundleSize uint64 `protobuf:"varint,14,opt,name=max_bundle_size,json=maxBundleSize,proto3" json:"max_bundle_size,omitempty"`
	// disabled is true when the pool is disabled.
	// Can only be done via governance.
	Disabled bool `protobuf:"varint,15,opt,name=disabled,proto3" json:"disabled,omitempty"`
	// funders ...
	Funders []*Funder `protobuf:"bytes,16,rep,name=funders,proto3" json:"funders,omitempty"`
	// total_funds ...
	TotalFunds uint64 `protobuf:"varint,17,opt,name=total_funds,json=totalFunds,proto3" json:"total_funds,omitempty"`
	// protocol ...
	Protocol *Protocol `protobuf:"bytes,18,opt,name=protocol,proto3" json:"protocol,omitempty"`
	// upgrade_plan ...
	UpgradePlan *UpgradePlan `protobuf:"bytes,19,opt,name=upgrade_plan,json=upgradePlan,proto3" json:"upgrade_plan,omitempty"`
	// storage_provider_id ...
	CurrentStorageProviderId uint32 `` /* 139-byte string literal not displayed */
	// compression_id ...
	CurrentCompressionId uint32 `protobuf:"varint,21,opt,name=current_compression_id,json=currentCompressionId,proto3" json:"current_compression_id,omitempty"`
}

Pool ...

func GetAllPools

func GetAllPools(ctx sdk.Context, poolKeeper poolKeeper.Keeper, cdc codec.BinaryCodec) (list []Pool, err error)

GetAllPools returns all pools

func (*Pool) Descriptor

func (*Pool) Descriptor() ([]byte, []int)

func (*Pool) GetConfig

func (m *Pool) GetConfig() string

func (*Pool) GetCurrentCompressionId

func (m *Pool) GetCurrentCompressionId() uint32

func (*Pool) GetCurrentIndex

func (m *Pool) GetCurrentIndex() uint64

func (*Pool) GetCurrentKey

func (m *Pool) GetCurrentKey() string

func (*Pool) GetCurrentStorageProviderId

func (m *Pool) GetCurrentStorageProviderId() uint32

func (*Pool) GetCurrentSummary

func (m *Pool) GetCurrentSummary() string

func (*Pool) GetDisabled

func (m *Pool) GetDisabled() bool

func (*Pool) GetFunders

func (m *Pool) GetFunders() []*Funder

func (*Pool) GetId

func (m *Pool) GetId() uint64
func (m *Pool) GetLogo() string

func (*Pool) GetMaxBundleSize

func (m *Pool) GetMaxBundleSize() uint64

func (*Pool) GetMinDelegation

func (m *Pool) GetMinDelegation() uint64

func (*Pool) GetName

func (m *Pool) GetName() string

func (*Pool) GetOperatingCost

func (m *Pool) GetOperatingCost() uint64

func (*Pool) GetProtocol

func (m *Pool) GetProtocol() *Protocol

func (*Pool) GetRuntime

func (m *Pool) GetRuntime() string

func (*Pool) GetStartKey

func (m *Pool) GetStartKey() string

func (*Pool) GetTotalBundles

func (m *Pool) GetTotalBundles() uint64

func (*Pool) GetTotalFunds

func (m *Pool) GetTotalFunds() uint64

func (*Pool) GetUpgradePlan

func (m *Pool) GetUpgradePlan() *UpgradePlan

func (*Pool) GetUploadInterval

func (m *Pool) GetUploadInterval() uint64

func (*Pool) Marshal

func (m *Pool) Marshal() (dAtA []byte, err error)

func (*Pool) MarshalTo

func (m *Pool) MarshalTo(dAtA []byte) (int, error)

func (*Pool) MarshalToSizedBuffer

func (m *Pool) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Pool) ProtoMessage

func (*Pool) ProtoMessage()

func (*Pool) Reset

func (m *Pool) Reset()

func (*Pool) Size

func (m *Pool) Size() (n int)

func (*Pool) String

func (m *Pool) String() string

func (*Pool) Unmarshal

func (m *Pool) Unmarshal(dAtA []byte) error

func (*Pool) XXX_DiscardUnknown

func (m *Pool) XXX_DiscardUnknown()

func (*Pool) XXX_Marshal

func (m *Pool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Pool) XXX_Merge

func (m *Pool) XXX_Merge(src proto.Message)

func (*Pool) XXX_Size

func (m *Pool) XXX_Size() int

func (*Pool) XXX_Unmarshal

func (m *Pool) XXX_Unmarshal(b []byte) error

type PoolStatus

type PoolStatus int32

PoolStatus ...

const (
	// POOL_STATUS_UNSPECIFIED ...
	POOL_STATUS_UNSPECIFIED PoolStatus = 0
	// POOL_STATUS_ACTIVE ...
	POOL_STATUS_ACTIVE PoolStatus = 1
	// POOL_STATUS_DISABLED ...
	POOL_STATUS_DISABLED PoolStatus = 2
	// POOL_STATUS_NO_FUNDS ...
	POOL_STATUS_NO_FUNDS PoolStatus = 3
	// POOL_STATUS_NOT_ENOUGH_DELEGATION ...
	POOL_STATUS_NOT_ENOUGH_DELEGATION PoolStatus = 4
	// POOL_STATUS_UPGRADING ...
	POOL_STATUS_UPGRADING PoolStatus = 5
)

func (PoolStatus) EnumDescriptor

func (PoolStatus) EnumDescriptor() ([]byte, []int)

func (PoolStatus) String

func (x PoolStatus) String() string

type Protocol

type Protocol struct {
	// version holds the current software version tag of the pool binaries
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// binaries is a stringified json object which holds binaries in the
	// current version for multiple platforms and architectures
	Binaries string `protobuf:"bytes,2,opt,name=binaries,proto3" json:"binaries,omitempty"`
	// last_upgrade is the unix time the pool was upgraded the last time
	LastUpgrade uint64 `protobuf:"varint,3,opt,name=last_upgrade,json=lastUpgrade,proto3" json:"last_upgrade,omitempty"`
}

Protocol holds all info about the current pool version and the available binaries for participating as a validator in a pool

func (*Protocol) Descriptor

func (*Protocol) Descriptor() ([]byte, []int)

func (*Protocol) GetBinaries

func (m *Protocol) GetBinaries() string

func (*Protocol) GetLastUpgrade

func (m *Protocol) GetLastUpgrade() uint64

func (*Protocol) GetVersion

func (m *Protocol) GetVersion() string

func (*Protocol) Marshal

func (m *Protocol) Marshal() (dAtA []byte, err error)

func (*Protocol) MarshalTo

func (m *Protocol) MarshalTo(dAtA []byte) (int, error)

func (*Protocol) MarshalToSizedBuffer

func (m *Protocol) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Protocol) ProtoMessage

func (*Protocol) ProtoMessage()

func (*Protocol) Reset

func (m *Protocol) Reset()

func (*Protocol) Size

func (m *Protocol) Size() (n int)

func (*Protocol) String

func (m *Protocol) String() string

func (*Protocol) Unmarshal

func (m *Protocol) Unmarshal(dAtA []byte) error

func (*Protocol) XXX_DiscardUnknown

func (m *Protocol) XXX_DiscardUnknown()

func (*Protocol) XXX_Marshal

func (m *Protocol) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Protocol) XXX_Merge

func (m *Protocol) XXX_Merge(src proto.Message)

func (*Protocol) XXX_Size

func (m *Protocol) XXX_Size() int

func (*Protocol) XXX_Unmarshal

func (m *Protocol) XXX_Unmarshal(b []byte) error

type UpgradePlan

type UpgradePlan struct {
	// version is the new software version tag of the upgrade
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// binaries is the new stringified json object which holds binaries in the
	// upgrade version for multiple platforms and architectures
	Binaries string `protobuf:"bytes,2,opt,name=binaries,proto3" json:"binaries,omitempty"`
	// scheduled_at is the unix time the upgrade is supposed to be done
	ScheduledAt uint64 `protobuf:"varint,3,opt,name=scheduled_at,json=scheduledAt,proto3" json:"scheduled_at,omitempty"`
	// duration is the time in seconds how long the pool should halt
	// during the upgrade to give all validators a chance of switching
	// to the new binaries
	Duration uint64 `protobuf:"varint,4,opt,name=duration,proto3" json:"duration,omitempty"`
}

Upgrade holds all info when a pool has a scheduled upgrade

func (*UpgradePlan) Descriptor

func (*UpgradePlan) Descriptor() ([]byte, []int)

func (*UpgradePlan) GetBinaries

func (m *UpgradePlan) GetBinaries() string

func (*UpgradePlan) GetDuration

func (m *UpgradePlan) GetDuration() uint64

func (*UpgradePlan) GetScheduledAt

func (m *UpgradePlan) GetScheduledAt() uint64

func (*UpgradePlan) GetVersion

func (m *UpgradePlan) GetVersion() string

func (*UpgradePlan) Marshal

func (m *UpgradePlan) Marshal() (dAtA []byte, err error)

func (*UpgradePlan) MarshalTo

func (m *UpgradePlan) MarshalTo(dAtA []byte) (int, error)

func (*UpgradePlan) MarshalToSizedBuffer

func (m *UpgradePlan) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*UpgradePlan) ProtoMessage

func (*UpgradePlan) ProtoMessage()

func (*UpgradePlan) Reset

func (m *UpgradePlan) Reset()

func (*UpgradePlan) Size

func (m *UpgradePlan) Size() (n int)

func (*UpgradePlan) String

func (m *UpgradePlan) String() string

func (*UpgradePlan) Unmarshal

func (m *UpgradePlan) Unmarshal(dAtA []byte) error

func (*UpgradePlan) XXX_DiscardUnknown

func (m *UpgradePlan) XXX_DiscardUnknown()

func (*UpgradePlan) XXX_Marshal

func (m *UpgradePlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UpgradePlan) XXX_Merge

func (m *UpgradePlan) XXX_Merge(src proto.Message)

func (*UpgradePlan) XXX_Size

func (m *UpgradePlan) XXX_Size() int

func (*UpgradePlan) XXX_Unmarshal

func (m *UpgradePlan) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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