timeupgrade

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

README

TimeUpgrade Module

The TimeUpgrade module is an extension for executing governance proposals based on time rather than block height. It enhances the functionality of the original upgrade module by allowing proposers to specify a future date and time for the upgrade to take effect.

Overview

The TimeUpgrade module wraps the original upgrade module's message with a user-defined timestamp. Once a proposal passes, it is stored in the state, waiting for the specified time to arrive. When the BlockTime exceeds the defined timestamp, the original proposal is submitted to be executed in the next block through the original governance module.

Usage

To use the TimeUpgrade module, follow these steps:

  1. Create a proposal JSON file (e.g., proposal.json) with the following structure:

    {
      "title": "Update Dymension to DRS-2",
      "description": "Upgrade Dymension to DRS-2 version with scheduled upgrade time",
      "summary": "This proposal aims to upgrade the Dymension rollapp to DRS 2, implementing new features and improvements, with a scheduled upgrade time.",
      "messages": [
        {
          "@type": "/rollapp.timeupgrade.types.MsgSoftwareUpgrade",
          "authority": "ethm10d07y265gmmuvt4z0w9aw880jnsr700jpva843",
          "drs":2,
          "upgrade_time": "2024-09-06T18:10:00Z"
        }
      ],
      "deposit": "500arax",
      "expedited": true
    }
    

    where drs is the version to upgrade to and upgrade_time the time used to schedule the upgrade.

  2. Submit the proposal using the following command:

    rollapp-evm tx gov submit-proposal proposal.json --from rol-user --keyring-backend test --fees 2000000000000arax
    
  3. Deposit tokens for the proposal:

    rollapp-evm tx gov deposit 1 10000000arax --from rol-user --keyring-backend test --fees 2000000000000arax
    
  4. Vote on the proposal:

    rollapp-evm tx gov vote 1 yes --from rol-user --keyring-backend test --fees 2000000000000arax
    

Key Features

  • Time-based upgrades: Specify a future date and time for upgrades to take effect.
  • Compatibility: Works seamlessly with the existing governance and upgrade modules.
  • Flexibility: Allows for better planning and coordination of network upgrades.

Note

Ensure that the upgrade_time in the proposal JSON is set to a future date and time in the UTC format (e.g., "2024-09-06T18:10:00Z").

For more information on the TimeUpgrade module and its integration with the Dymension network, please refer to the official documentation or contact the development team.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeginBlocker

func BeginBlocker(ctx sdk.Context, k keeper.Keeper, upgradeKeeper upgradekeeper.Keeper)

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

func NewAppModule

func NewAppModule(keeper keeper.Keeper, upgradeKeeper upgradekeeper.Keeper) *AppModule

func (AppModule) BeginBlock

func (a AppModule) BeginBlock(context sdk.Context, block abci.RequestBeginBlock)

func (AppModule) ConsensusVersion

func (a AppModule) ConsensusVersion() uint64

func (AppModule) ExportGenesis

func (a AppModule) ExportGenesis(context sdk.Context, jsonCodec codec.JSONCodec) json.RawMessage

func (AppModule) InitGenesis

func (a AppModule) InitGenesis(context sdk.Context, jsonCodec codec.JSONCodec, message json.RawMessage) []abci.ValidatorUpdate

func (AppModule) LegacyQuerierHandler

func (a AppModule) LegacyQuerierHandler(amino *codec.LegacyAmino) sdk.Querier

func (AppModule) QuerierRoute

func (a AppModule) QuerierRoute() string

func (AppModule) RegisterInvariants

func (a AppModule) RegisterInvariants(registry sdk.InvariantRegistry)

func (AppModule) RegisterServices

func (a AppModule) RegisterServices(configurator module.Configurator)

func (AppModule) Route

func (a AppModule) Route() sdk.Route

type AppModuleBasic

type AppModuleBasic struct {
}

func (AppModuleBasic) DefaultGenesis

func (a AppModuleBasic) DefaultGenesis(codec codec.JSONCodec) json.RawMessage

func (AppModuleBasic) GetQueryCmd

func (a AppModuleBasic) GetQueryCmd() *cobra.Command

func (AppModuleBasic) GetTxCmd

func (a AppModuleBasic) GetTxCmd() *cobra.Command

func (AppModuleBasic) Name

func (a AppModuleBasic) Name() string

func (AppModuleBasic) RegisterGRPCGatewayRoutes

func (a AppModuleBasic) RegisterGRPCGatewayRoutes(context client.Context, mux *runtime.ServeMux)

func (AppModuleBasic) RegisterInterfaces

func (a AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func (AppModuleBasic) RegisterLegacyAminoCodec

func (a AppModuleBasic) RegisterLegacyAminoCodec(amino *codec.LegacyAmino)

func (AppModuleBasic) ValidateGenesis

func (a AppModuleBasic) ValidateGenesis(codec codec.JSONCodec, config client.TxEncodingConfig, message json.RawMessage) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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