-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: remove token voting upgrades (#1629)
## Overview wraps the sdk's standard upgrade module to remove the ability to submit upgrade proposals. The idea being that this maintains compatibility with the IBC module (which requires access to the upgrade module's keeper), while still removing the ability for the upgrade module to work by not registering the upgrade module's msg server or begin block. Also, when we implement #1014 we can progressively flesh this module out with our own logic. closes #1571 ## Checklist - [x] New and updated code has appropriate documentation - [x] New and updated code has new and/or updated testing - [x] Required CI checks are passing - [x] Visual proof for any user facing features like CLI or documentation updates - [x] Linked issues closed with keywords --------- Co-authored-by: Rootul P <[email protected]>
- Loading branch information
1 parent
8ed8b58
commit a69fe55
Showing
8 changed files
with
306 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package testnode | ||
|
||
import ( | ||
"context" | ||
"encoding/hex" | ||
|
||
"github.com/cosmos/cosmos-sdk/client" | ||
rpctypes "github.com/tendermint/tendermint/rpc/core/types" | ||
) | ||
|
||
func QueryTx(clientCtx client.Context, hashHexStr string, prove bool) (*rpctypes.ResultTx, error) { | ||
hash, err := hex.DecodeString(hashHexStr) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
node, err := clientCtx.GetNode() | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
return node.Tx(context.Background(), hash, prove) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# `x/upgrade` | ||
|
||
## Abstract | ||
|
||
The upgrade module removes the entrypoints to the standard upgrade module by not | ||
registering a message server. It registers the standard upgrade module types to | ||
preserve the ability to marshal them. Note that the keeper of the standard | ||
upgrade module is still added to the application. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package upgrade | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/codec" | ||
codectypes "github.com/cosmos/cosmos-sdk/codec/types" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
) | ||
|
||
// TypeRegister is used to register the upgrade modules types in the encoding | ||
// config without defining an entire module. | ||
type TypeRegister struct{} | ||
|
||
// RegisterLegacyAminoCodec registers the upgrade types on the LegacyAmino codec. | ||
func (TypeRegister) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { | ||
upgradetypes.RegisterLegacyAminoCodec(cdc) | ||
} | ||
|
||
// RegisterInterfaces registers the upgrade module types. | ||
func (TypeRegister) RegisterInterfaces(registry codectypes.InterfaceRegistry) { | ||
upgradetypes.RegisterInterfaces(registry) | ||
} |
Oops, something went wrong.