forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
1,571 additions
and
298 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ dist | |
tools-stamp | ||
buf-stamp | ||
artifacts | ||
tools/ | ||
|
||
# Data - ideally these don't exist | ||
baseapp/data/* | ||
|
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 |
---|---|---|
@@ -1,14 +1,21 @@ | ||
# Cosmos SDK v0.46.12 Release Notes | ||
# Cosmos SDK v0.46.13 Release Notes | ||
|
||
This release introduces a number of improvements and bug fixes, notably a new query for the `x/group` module, for querying all groups on a chain. | ||
This release includes few improvements and bug fixes. | ||
Notably, the [barberry security fix](https://forum.cosmos.network/t/cosmos-sdk-security-advisory-barberry/10825). All chains using Cosmos SDK v0.46.0 and above must upgrade to `v0.46.13` **immediately**. A chain is safe as soon as **33%+1** of the voting power has upgraded. Coordinate with your validators to upgrade as soon as possible. | ||
|
||
Note, from `v0.46.11`+, the following replace is *mandatory* in the `go.mod` of your application: | ||
Additionally, it includes new commands for snapshots management and bootstrapping from a local snapshot (add `snapshot.Cmd(appCreator)` to the chain root command for using it). | ||
|
||
Did you know Cosmos SDK Twilight (a.k.a v0.47) has been released? Upgrade easily by reading the [upgrading guide](https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/UPGRADING.md#v047x). | ||
|
||
Ensure you have the following replaces in the `go.mod` of your application: | ||
|
||
```go | ||
// use cometbft | ||
replace github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.27 | ||
replace github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.28 | ||
// replace broken goleveldb | ||
replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 | ||
``` | ||
|
||
Please see the [CHANGELOG](https://github.com/cosmos/cosmos-sdk/blob/release/v0.46.x/CHANGELOG.md) for an exhaustive list of changes. | ||
|
||
**Full Commit History**: https://github.com/cosmos/cosmos-sdk/compare/v0.46.11...v0.46.12 | ||
**Full Commit History**: https://github.com/cosmos/cosmos-sdk/compare/v0.46.12...v0.46.13 |
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,8 @@ | ||
package baseapp | ||
|
||
import "context" | ||
|
||
// CircuitBreaker is an interface that defines the methods for a circuit breaker. | ||
type CircuitBreaker interface { | ||
IsAllowed(ctx context.Context, typeURL string) (bool, error) | ||
} |
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,38 @@ | ||
package client_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/cosmos/cosmos-sdk/client" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestValidatePromptNotEmpty(t *testing.T) { | ||
require := require.New(t) | ||
|
||
require.NoError(client.ValidatePromptNotEmpty("foo")) | ||
require.ErrorContains(client.ValidatePromptNotEmpty(""), "input cannot be empty") | ||
} | ||
|
||
func TestValidatePromptURL(t *testing.T) { | ||
require := require.New(t) | ||
|
||
require.NoError(client.ValidatePromptURL("https://example.com")) | ||
require.ErrorContains(client.ValidatePromptURL("foo"), "invalid URL") | ||
} | ||
|
||
func TestValidatePromptAddress(t *testing.T) { | ||
require := require.New(t) | ||
|
||
require.NoError(client.ValidatePromptAddress("cosmos1huydeevpz37sd9snkgul6070mstupukw00xkw9")) | ||
require.NoError(client.ValidatePromptAddress("cosmosvaloper1sjllsnramtg3ewxqwwrwjxfgc4n4ef9u2lcnj0")) | ||
require.NoError(client.ValidatePromptAddress("cosmosvalcons1ntk8eualewuprz0gamh8hnvcem2nrcdsgz563h")) | ||
require.ErrorContains(client.ValidatePromptAddress("foo"), "invalid address") | ||
} | ||
|
||
func TestValidatePromptCoins(t *testing.T) { | ||
require := require.New(t) | ||
|
||
require.NoError(client.ValidatePromptCoins("100stake")) | ||
require.ErrorContains(client.ValidatePromptCoins("foo"), "invalid coins") | ||
} |
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 snapshot | ||
|
||
import ( | ||
servertypes "github.com/cosmos/cosmos-sdk/server/types" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// Cmd returns the snapshots group command | ||
func Cmd(appCreator servertypes.AppCreator) *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "snapshots", | ||
Short: "Manage local snapshots", | ||
} | ||
cmd.AddCommand( | ||
ListSnapshotsCmd, | ||
RestoreSnapshotCmd(appCreator), | ||
ExportSnapshotCmd(appCreator), | ||
DumpArchiveCmd(), | ||
LoadArchiveCmd(), | ||
DeleteSnapshotCmd(), | ||
) | ||
return cmd | ||
} |
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,35 @@ | ||
package snapshot | ||
|
||
import ( | ||
"strconv" | ||
|
||
"github.com/cosmos/cosmos-sdk/server" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func DeleteSnapshotCmd() *cobra.Command { | ||
return &cobra.Command{ | ||
Use: "delete <height> <format>", | ||
Short: "Delete a local snapshot", | ||
Args: cobra.ExactArgs(2), | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
ctx := server.GetServerContextFromCmd(cmd) | ||
|
||
height, err := strconv.ParseUint(args[0], 10, 64) | ||
if err != nil { | ||
return err | ||
} | ||
format, err := strconv.ParseUint(args[1], 10, 32) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
snapshotStore, err := server.GetSnapshotStore(ctx.Viper) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
return snapshotStore.Delete(height, uint32(format)) | ||
}, | ||
} | ||
} |
Oops, something went wrong.