v038

package
v0.44.30 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v038 is used for legacy migration scripts. Actual migration scripts for v038 have been removed, but the v039->v042 migration script still references types from this file, so we're keeping it for now.

Index

Constants

View Source
const (
	// ModuleName is the name of this module
	ModuleName = "upgrade"

	// RouterKey is used to route governance proposals
	RouterKey = ModuleName

	// StoreKey is the prefix under which we store this module's data
	StoreKey = ModuleName

	// QuerierKey is used to handle abci_query requests
	QuerierKey = ModuleName
)
View Source
const (
	ProposalTypeSoftwareUpgrade       string = "SoftwareUpgrade"
	ProposalTypeCancelSoftwareUpgrade string = "CancelSoftwareUpgrade"
)

Variables

This section is empty.

Functions

func NewCancelSoftwareUpgradeProposal

func NewCancelSoftwareUpgradeProposal(title, description string) v036gov.Content

func NewSoftwareUpgradeProposal

func NewSoftwareUpgradeProposal(title, description string, plan Plan) v036gov.Content

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

Types

type CancelSoftwareUpgradeProposal

type CancelSoftwareUpgradeProposal struct {
	Title       string `json:"title" yaml:"title"`
	Description string `json:"description" yaml:"description"`
}

Cancel Software Upgrade Proposals

func (CancelSoftwareUpgradeProposal) GetDescription

func (sup CancelSoftwareUpgradeProposal) GetDescription() string

func (CancelSoftwareUpgradeProposal) GetTitle

func (sup CancelSoftwareUpgradeProposal) GetTitle() string

func (CancelSoftwareUpgradeProposal) ProposalRoute

func (sup CancelSoftwareUpgradeProposal) ProposalRoute() string

func (CancelSoftwareUpgradeProposal) ProposalType

func (sup CancelSoftwareUpgradeProposal) ProposalType() string

func (CancelSoftwareUpgradeProposal) String

func (CancelSoftwareUpgradeProposal) ValidateBasic

func (sup CancelSoftwareUpgradeProposal) ValidateBasic() error

type Plan

type Plan struct {
	// Sets the name for the upgrade. This name will be used by the upgraded version of the software to apply any
	// special "on-upgrade" commands during the first BeginBlock method after the upgrade is applied. It is also used
	// to detect whether a software version can handle a given upgrade. If no upgrade handler with this name has been
	// set in the software, it will be assumed that the software is out-of-date when the upgrade Time or Height
	// is reached and the software will exit.
	Name string `json:"name,omitempty"`

	// The time after which the upgrade must be performed.
	// Leave set to its zero value to use a pre-defined Height instead.
	Time time.Time `json:"time,omitempty"`

	// The height at which the upgrade must be performed.
	// Only used if Time is not set.
	Height int64 `json:"height,omitempty"`

	// Any application specific upgrade info to be included on-chain
	// such as a git commit that validators could automatically upgrade to
	Info string `json:"info,omitempty"`
}

Plan specifies information about a planned upgrade and when it should occur

func (Plan) DueAt

func (p Plan) DueAt() string

DueAt is a string representation of when this plan is due to be executed

func (Plan) ShouldExecute

func (p Plan) ShouldExecute(ctx sdk.Context) bool

ShouldExecute returns true if the Plan is ready to execute given the current context

func (Plan) String

func (p Plan) String() string

func (Plan) ValidateBasic

func (p Plan) ValidateBasic() error

ValidateBasic does basic validation of a Plan

type SoftwareUpgradeProposal

type SoftwareUpgradeProposal struct {
	Title       string `json:"title" yaml:"title"`
	Description string `json:"description" yaml:"description"`
	Plan        Plan   `json:"plan" yaml:"plan"`
}

Software Upgrade Proposals

func (SoftwareUpgradeProposal) GetDescription

func (sup SoftwareUpgradeProposal) GetDescription() string

func (SoftwareUpgradeProposal) GetTitle

func (sup SoftwareUpgradeProposal) GetTitle() string

func (SoftwareUpgradeProposal) ProposalRoute

func (sup SoftwareUpgradeProposal) ProposalRoute() string

func (SoftwareUpgradeProposal) ProposalType

func (sup SoftwareUpgradeProposal) ProposalType() string

func (SoftwareUpgradeProposal) String

func (sup SoftwareUpgradeProposal) String() string

func (SoftwareUpgradeProposal) ValidateBasic

func (sup SoftwareUpgradeProposal) ValidateBasic() error

Jump to

Keyboard shortcuts

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