diff --git a/CHANGELOG.md b/CHANGELOG.md
index e5e7b852c3d7..2796274b94f2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -61,9 +61,9 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
* (client) [#19870](https://github.com/cosmos/cosmos-sdk/pull/19870) Add new query command `wait-tx`. Alias `event-query-tx-for` to `wait-tx` for backward compatibility.
* (crypto/keyring) [#20212](https://github.com/cosmos/cosmos-sdk/pull/20212) Expose the db keyring used in the keystore.
* (genutil) [#19971](https://github.com/cosmos/cosmos-sdk/pull/19971) Allow manually setting the consensus key type in genesis
-* (debug) [#20328](https://github.com/cosmos/cosmos-sdk/pull/20328) Add consensus address for debug cmd.
### Improvements
+
* (bank) [#20354](https://github.com/cosmos/cosmos-sdk/pull/20354) Reduce the number of `ValidateDenom` calls in `bank.SendCoins`.
* (types) [#19869](https://github.com/cosmos/cosmos-sdk/pull/19869) Removed `Any` type from `codec/types` and replaced it with an alias for `cosmos/gogoproto/types/any`.
* (server) [#19854](https://github.com/cosmos/cosmos-sdk/pull/19854) Add customizability to start command.
@@ -114,8 +114,6 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
* (server) [#18994](https://github.com/cosmos/cosmos-sdk/pull/18994) Update server context directly rather than a reference to a sub-object
* [#19833](https://github.com/cosmos/cosmos-sdk/pull/19833) Fix some places in which we call Remove inside a Walk.
* [#19851](https://github.com/cosmos/cosmos-sdk/pull/19851) Fix some places in which we call Remove inside a Walk (x/staking and x/gov).
-* (cli) [#20020](https://github.com/cosmos/cosmos-sdk/pull/20020) Make bootstrap-state command support both new and legacy genesis format.
-* (baseapp) [#20107](https://github.com/cosmos/cosmos-sdk/pull/20107) Allow height overwrite BlockHeight in header.
### API Breaking Changes
@@ -188,6 +186,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
* (server) [#20140](https://github.com/cosmos/cosmos-sdk/pull/20140) Remove embedded grpc-web proxy in favor of standalone grpc-web proxy. [Envoy Proxy](https://www.envoyproxy.io/docs/envoy/latest/start/start)
* (client) [#20255](https://github.com/cosmos/cosmos-sdk/pull/20255) Use comet proofOp proto type instead of sdk version to avoid needing to translate to later be proven in the merkle proof runtime.
* (all) [#19726](https://github.com/cosmos/cosmos-sdk/pull/19726) Integrate comet v1
+* (client) [#20616](https://github.com/cosmos/cosmos-sdk/pull/20616) gentx subcommand output goes to `cmd.ErrOrStderr()` instead of being hardcoded to `os.Stderr`
### Client Breaking Changes
@@ -202,6 +201,24 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
* (simapp) [#19146](https://github.com/cosmos/cosmos-sdk/pull/19146) Replace `--v` CLI option with `--validator-count`/`-n`.
* (module) [#19370](https://github.com/cosmos/cosmos-sdk/pull/19370) Deprecate `module.Configurator`, use `appmodule.HasMigrations` and `appmodule.HasServices` instead from Core API.
+* (x/auth) [#20531](https://github.com/cosmos/cosmos-sdk/pull/20531) Deprecate auth keeper `NextAccountNumber`, use `keeper.AccountsModKeeper.NextAccountNumber` instead.
+
+## [v0.50.7](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.7) - 2024-06-04
+
+### Improvements
+
+* (debug) [#20328](https://github.com/cosmos/cosmos-sdk/pull/20328) Add consensus address for debug cmd.
+* (runtime) [#20264](https://github.com/cosmos/cosmos-sdk/pull/20264) Expose grpc query router via depinject.
+* (x/consensus) [#20381](https://github.com/cosmos/cosmos-sdk/pull/20381) Use Comet utility for consensus module consensus param updates.
+* (client) [#20356](https://github.com/cosmos/cosmos-sdk/pull/20356) Overwrite client context when available in `SetCmdClientContext`.
+
+### Bug Fixes
+
+* (baseapp) [#20346](https://github.com/cosmos/cosmos-sdk/pull/20346) Correctly assign `execModeSimulate` to context for `simulateTx`.
+* (baseapp) [#20144](https://github.com/cosmos/cosmos-sdk/pull/20144) Remove txs from mempool when AnteHandler fails in recheck.
+* (baseapp) [#20107](https://github.com/cosmos/cosmos-sdk/pull/20107) Avoid header height overwrite block height.
+* (cli) [#20020](https://github.com/cosmos/cosmos-sdk/pull/20020) Make bootstrap-state command support both new and legacy genesis format.
+* (testutil/sims) [#20151](https://github.com/cosmos/cosmos-sdk/pull/20151) Set all signatures and don't overwrite the previous one in `GenSignedMockTx`.
## [v0.50.6](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.6) - 2024-04-22
@@ -667,6 +684,17 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
* (x/staking) [#14567](https://github.com/cosmos/cosmos-sdk/pull/14567) The `delegator_address` field of `MsgCreateValidator` has been deprecated.
The validator address bytes and delegator address bytes refer to the same account while creating validator (defer only in bech32 notation).
+## [v0.47.12](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.12) - 2024-06-10
+
+## Improvements
+
+* (x/authz,x/feegrant) [#20590](https://github.com/cosmos/cosmos-sdk/pull/20590) Provide updated keeper in depinject for authz and feegrant modules.
+
+### Bug Fixes
+
+* (baseapp) [#20144](https://github.com/cosmos/cosmos-sdk/pull/20144) Remove txs from mempool when AnteHandler fails in recheck.
+* (testutil/sims) [#20151](https://github.com/cosmos/cosmos-sdk/pull/20151) Set all signatures and don't overwrite the previous one in `GenSignedMockTx`.
+
## [v0.47.11](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.11) - 2024-04-22
### Bug Fixes
diff --git a/Makefile b/Makefile
index 425b012be7f4..ba0693c2af29 100644
--- a/Makefile
+++ b/Makefile
@@ -67,6 +67,12 @@ ifeq (boltdb,$(findstring boltdb,$(COSMOS_BUILD_OPTIONS)))
build_tags += boltdb
endif
+# handle blst
+ifeq (blst,$(findstring blst,$(COSMOS_BUILD_OPTIONS)))
+ CGO_ENABLED=1
+ build_tags += blst
+endif
+
whitespace :=
whitespace += $(whitespace)
comma := ,
diff --git a/UPGRADING.md b/UPGRADING.md
index 48e2db4164c4..e99c120b0519 100644
--- a/UPGRADING.md
+++ b/UPGRADING.md
@@ -252,6 +252,19 @@ Most of Cosmos SDK modules have migrated to [collections](https://docs.cosmos.ne
Many functions have been removed due to this changes as the API can be smaller thanks to collections.
For modules that have migrated, verify you are checking against `collections.ErrNotFound` when applicable.
+#### `x/accounts`
+
+Accounts's AccountNumber will be used as a global account number tracking replacing Auth legacy AccountNumber. Must set accounts's AccountNumber with auth's AccountNumber value in upgrade handler. This is done through auth keeper MigrateAccountNumber function.
+
+```go
+import authkeeper "cosmossdk.io/x/auth/keeper"
+...
+err := authkeeper.MigrateAccountNumberUnsafe(ctx, &app.AuthKeeper)
+if err != nil {
+ return nil, err
+}
+```
+
#### `x/auth`
Auth was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/auth`
diff --git a/api/cosmos/authz/v1beta1/tx.pulsar.go b/api/cosmos/authz/v1beta1/tx.pulsar.go
index ca5ae0bf2f91..b8abc789777e 100644
--- a/api/cosmos/authz/v1beta1/tx.pulsar.go
+++ b/api/cosmos/authz/v1beta1/tx.pulsar.go
@@ -4890,11 +4890,11 @@ var file_cosmos_authz_v1beta1_tx_proto_rawDesc = []byte{
0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x70, 0x72, 0x75, 0x6e,
0x65, 0x72, 0x3a, 0x1d, 0xd2, 0xb4, 0x2d, 0x0e, 0x78, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x20,
- 0x76, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65,
+ 0x76, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x70, 0x72, 0x75, 0x6e, 0x65,
0x72, 0x22, 0x33, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x45, 0x78, 0x70,
0x69, 0x72, 0x65, 0x64, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x3a, 0x12, 0xd2, 0xb4, 0x2d, 0x0e, 0x78, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x20,
- 0x76, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x32, 0xff, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4f,
+ 0x76, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x32, 0xff, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4f,
0x0a, 0x05, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
0x2e, 0x61, 0x75, 0x74, 0x68, 0x7a, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d,
0x73, 0x67, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
diff --git a/api/cosmos/circuit/v1/tx_grpc.pb.go b/api/cosmos/circuit/v1/tx_grpc.pb.go
index 0103451c0245..a3b22335e577 100644
--- a/api/cosmos/circuit/v1/tx_grpc.pb.go
+++ b/api/cosmos/circuit/v1/tx_grpc.pb.go
@@ -34,7 +34,7 @@ type MsgClient interface {
// TripCircuitBreaker pauses processing of Msg's in the state machine.
TripCircuitBreaker(ctx context.Context, in *MsgTripCircuitBreaker, opts ...grpc.CallOption) (*MsgTripCircuitBreakerResponse, error)
// ResetCircuitBreaker resumes processing of Msg's in the state machine that
- // have been been paused using TripCircuitBreaker.
+ // have been paused using TripCircuitBreaker.
ResetCircuitBreaker(ctx context.Context, in *MsgResetCircuitBreaker, opts ...grpc.CallOption) (*MsgResetCircuitBreakerResponse, error)
}
diff --git a/api/cosmos/gov/v1/gov.pulsar.go b/api/cosmos/gov/v1/gov.pulsar.go
index 3539071c3e73..d4322dfe9e08 100644
--- a/api/cosmos/gov/v1/gov.pulsar.go
+++ b/api/cosmos/gov/v1/gov.pulsar.go
@@ -10423,7 +10423,7 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{
0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x10, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76,
0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65,
- 0x42, 0x10, 0xda, 0xb4, 0x2d, 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x31, 0x2e, 0x30,
+ 0x42, 0x10, 0xda, 0xb4, 0x2d, 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x30, 0x2e, 0x32,
0x2e, 0x30, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65,
0x22, 0xca, 0x01, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x56, 0x6f, 0x74,
0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x70, 0x74, 0x69,
@@ -10437,7 +10437,7 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{
0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x75, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x70, 0x61, 0x6d, 0x3a, 0x10, 0xd2, 0xb4, 0x2d,
- 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x22, 0xfc, 0x03,
+ 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x22, 0xfc, 0x03,
0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2d, 0x0a,
0x09, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x42, 0x10, 0x18, 0x01, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49,
@@ -10589,30 +10589,30 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{
0x12, 0x5b, 0x0a, 0x1a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x6e,
0x63, 0x65, 0x6c, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x11,
0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
- 0x2e, 0x44, 0x65, 0x63, 0xda, 0xb4, 0x2d, 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x31,
- 0x2e, 0x30, 0x2e, 0x30, 0x52, 0x17, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x43, 0x61,
+ 0x2e, 0x44, 0x65, 0x63, 0xda, 0xb4, 0x2d, 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x30,
+ 0x2e, 0x32, 0x2e, 0x30, 0x52, 0x17, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x43, 0x61,
0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x61, 0x78, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x70, 0x0a,
0x1f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x61, 0x75, 0x74, 0x68,
0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73,
0x18, 0x12, 0x20, 0x03, 0x28, 0x09, 0x42, 0x28, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d,
0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67,
- 0xda, 0xb4, 0x2d, 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x31, 0x2e, 0x30, 0x2e, 0x30,
+ 0xda, 0xb4, 0x2d, 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x30, 0x2e, 0x32, 0x2e, 0x30,
0x52, 0x1d, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68,
0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12,
0x62, 0x0a, 0x1d, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x72, 0x65,
0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64,
0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d,
0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xda, 0xb4, 0x2d, 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20,
- 0x76, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x52, 0x1b, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74,
+ 0x76, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x52, 0x1b, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x73, 0x74,
0x69, 0x63, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68,
0x6f, 0x6c, 0x64, 0x12, 0x3d, 0x0a, 0x0a, 0x79, 0x65, 0x73, 0x5f, 0x71, 0x75, 0x6f, 0x72, 0x75,
0x6d, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73,
0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xda, 0xb4, 0x2d, 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76,
- 0x20, 0x76, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x52, 0x09, 0x79, 0x65, 0x73, 0x51, 0x75, 0x6f, 0x72,
+ 0x20, 0x76, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x52, 0x09, 0x79, 0x65, 0x73, 0x51, 0x75, 0x6f, 0x72,
0x75, 0x6d, 0x12, 0x49, 0x0a, 0x10, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x5f,
0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0xd2, 0xb4,
0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xda, 0xb4, 0x2d, 0x0c,
- 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x52, 0x0f, 0x65, 0x78,
+ 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x52, 0x0f, 0x65, 0x78,
0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x3a, 0x13, 0xd2,
0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e,
0x34, 0x37, 0x22, 0xa8, 0x02, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x61,
@@ -10633,7 +10633,7 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{
0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4,
0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65,
0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x3a, 0x10, 0xd2, 0xb4, 0x2d,
- 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2a, 0xa7, 0x01,
+ 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x2a, 0xa7, 0x01,
0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d,
0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,
0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a,
diff --git a/api/cosmos/gov/v1/query.pulsar.go b/api/cosmos/gov/v1/query.pulsar.go
index 4be0e4800c79..6d0cd8b0d0a6 100644
--- a/api/cosmos/gov/v1/query.pulsar.go
+++ b/api/cosmos/gov/v1/query.pulsar.go
@@ -11558,7 +11558,7 @@ var file_cosmos_gov_v1_query_proto_rawDesc = []byte{
0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x70, 0x6f,
0x73, 0x61, 0x6c, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4b, 0xca, 0xb4, 0x2d, 0x0c, 0x78, 0x2f, 0x67, 0x6f,
- 0x76, 0x20, 0x76, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33,
+ 0x76, 0x20, 0x76, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33,
0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x70,
0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73,
0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x6f, 0x74, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69,
@@ -11570,7 +11570,7 @@ var file_cosmos_gov_v1_query_proto_rawDesc = []byte{
0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0xca, 0xb4, 0x2d, 0x0c, 0x78,
- 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x21, 0x12, 0x1f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76,
0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x7b, 0x6d, 0x73, 0x67, 0x5f, 0x75, 0x72,
0x6c, 0x7d, 0x42, 0x9b, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
diff --git a/api/cosmos/gov/v1/tx.pulsar.go b/api/cosmos/gov/v1/tx.pulsar.go
index fdb9f151bbc7..2fec8633ea3e 100644
--- a/api/cosmos/gov/v1/tx.pulsar.go
+++ b/api/cosmos/gov/v1/tx.pulsar.go
@@ -11129,7 +11129,7 @@ var file_cosmos_gov_v1_tx_proto_rawDesc = []byte{
0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54,
0x79, 0x70, 0x65, 0x42, 0x10, 0xda, 0xb4, 0x2d, 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76,
- 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54,
+ 0x30, 0x2e, 0x32, 0x2e, 0x30, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54,
0x79, 0x70, 0x65, 0x3a, 0x31, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73,
0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64,
0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72,
diff --git a/api/cosmos/mint/v1beta1/mint.pulsar.go b/api/cosmos/mint/v1beta1/mint.pulsar.go
index 2ad70c1ed755..99895b25532d 100644
--- a/api/cosmos/mint/v1beta1/mint.pulsar.go
+++ b/api/cosmos/mint/v1beta1/mint.pulsar.go
@@ -10,6 +10,7 @@ import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoiface "google.golang.org/protobuf/runtime/protoiface"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ _ "google.golang.org/protobuf/types/known/anypb"
io "io"
reflect "reflect"
sync "sync"
@@ -19,6 +20,7 @@ var (
md_Minter protoreflect.MessageDescriptor
fd_Minter_inflation protoreflect.FieldDescriptor
fd_Minter_annual_provisions protoreflect.FieldDescriptor
+ fd_Minter_data protoreflect.FieldDescriptor
)
func init() {
@@ -26,6 +28,7 @@ func init() {
md_Minter = File_cosmos_mint_v1beta1_mint_proto.Messages().ByName("Minter")
fd_Minter_inflation = md_Minter.Fields().ByName("inflation")
fd_Minter_annual_provisions = md_Minter.Fields().ByName("annual_provisions")
+ fd_Minter_data = md_Minter.Fields().ByName("data")
}
var _ protoreflect.Message = (*fastReflection_Minter)(nil)
@@ -105,6 +108,12 @@ func (x *fastReflection_Minter) Range(f func(protoreflect.FieldDescriptor, proto
return
}
}
+ if len(x.Data) != 0 {
+ value := protoreflect.ValueOfBytes(x.Data)
+ if !f(fd_Minter_data, value) {
+ return
+ }
+ }
}
// Has reports whether a field is populated.
@@ -124,6 +133,8 @@ func (x *fastReflection_Minter) Has(fd protoreflect.FieldDescriptor) bool {
return x.Inflation != ""
case "cosmos.mint.v1beta1.Minter.annual_provisions":
return x.AnnualProvisions != ""
+ case "cosmos.mint.v1beta1.Minter.data":
+ return len(x.Data) != 0
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Minter"))
@@ -144,6 +155,8 @@ func (x *fastReflection_Minter) Clear(fd protoreflect.FieldDescriptor) {
x.Inflation = ""
case "cosmos.mint.v1beta1.Minter.annual_provisions":
x.AnnualProvisions = ""
+ case "cosmos.mint.v1beta1.Minter.data":
+ x.Data = nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Minter"))
@@ -166,6 +179,9 @@ func (x *fastReflection_Minter) Get(descriptor protoreflect.FieldDescriptor) pro
case "cosmos.mint.v1beta1.Minter.annual_provisions":
value := x.AnnualProvisions
return protoreflect.ValueOfString(value)
+ case "cosmos.mint.v1beta1.Minter.data":
+ value := x.Data
+ return protoreflect.ValueOfBytes(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Minter"))
@@ -190,6 +206,8 @@ func (x *fastReflection_Minter) Set(fd protoreflect.FieldDescriptor, value proto
x.Inflation = value.Interface().(string)
case "cosmos.mint.v1beta1.Minter.annual_provisions":
x.AnnualProvisions = value.Interface().(string)
+ case "cosmos.mint.v1beta1.Minter.data":
+ x.Data = value.Bytes()
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Minter"))
@@ -214,6 +232,8 @@ func (x *fastReflection_Minter) Mutable(fd protoreflect.FieldDescriptor) protore
panic(fmt.Errorf("field inflation of message cosmos.mint.v1beta1.Minter is not mutable"))
case "cosmos.mint.v1beta1.Minter.annual_provisions":
panic(fmt.Errorf("field annual_provisions of message cosmos.mint.v1beta1.Minter is not mutable"))
+ case "cosmos.mint.v1beta1.Minter.data":
+ panic(fmt.Errorf("field data of message cosmos.mint.v1beta1.Minter is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Minter"))
@@ -231,6 +251,8 @@ func (x *fastReflection_Minter) NewField(fd protoreflect.FieldDescriptor) protor
return protoreflect.ValueOfString("")
case "cosmos.mint.v1beta1.Minter.annual_provisions":
return protoreflect.ValueOfString("")
+ case "cosmos.mint.v1beta1.Minter.data":
+ return protoreflect.ValueOfBytes(nil)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.mint.v1beta1.Minter"))
@@ -308,6 +330,10 @@ func (x *fastReflection_Minter) ProtoMethods() *protoiface.Methods {
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
+ l = len(x.Data)
+ if l > 0 {
+ n += 1 + l + runtime.Sov(uint64(l))
+ }
if x.unknownFields != nil {
n += len(x.unknownFields)
}
@@ -337,6 +363,13 @@ func (x *fastReflection_Minter) ProtoMethods() *protoiface.Methods {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
+ if len(x.Data) > 0 {
+ i -= len(x.Data)
+ copy(dAtA[i:], x.Data)
+ i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data)))
+ i--
+ dAtA[i] = 0x1a
+ }
if len(x.AnnualProvisions) > 0 {
i -= len(x.AnnualProvisions)
copy(dAtA[i:], x.AnnualProvisions)
@@ -464,6 +497,40 @@ func (x *fastReflection_Minter) ProtoMethods() *protoiface.Methods {
}
x.AnnualProvisions = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
+ }
+ if iNdEx >= l {
+ return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex < 0 {
+ return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
+ }
+ if postIndex > l {
+ return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
+ }
+ x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...)
+ if x.Data == nil {
+ x.Data = []byte{}
+ }
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
@@ -1310,6 +1377,9 @@ type Minter struct {
Inflation string `protobuf:"bytes,1,opt,name=inflation,proto3" json:"inflation,omitempty"`
// current annual expected provisions
AnnualProvisions string `protobuf:"bytes,2,opt,name=annual_provisions,json=annualProvisions,proto3" json:"annual_provisions,omitempty"`
+ // data is any custom data that the user might want to put in the minter, to
+ // be used in the minting process.
+ Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}
func (x *Minter) Reset() {
@@ -1346,6 +1416,13 @@ func (x *Minter) GetAnnualProvisions() string {
return ""
}
+func (x *Minter) GetData() []byte {
+ if x != nil {
+ return x.Data
+ }
+ return nil
+}
+
// Params defines the parameters for the x/mint module.
type Params struct {
state protoimpl.MessageState
@@ -1447,67 +1524,70 @@ var file_cosmos_mint_v1beta1_mint_proto_rawDesc = []byte{
0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73,
0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d,
- 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x01, 0x0a, 0x06, 0x4d, 0x69,
- 0x6e, 0x74, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x09, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f,
- 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61,
- 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a,
- 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x69, 0x6e, 0x66, 0x6c,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5e, 0x0a, 0x11, 0x61, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x5f,
- 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
- 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61,
- 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
- 0x44, 0x65, 0x63, 0x52, 0x10, 0x61, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69,
- 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb9, 0x04, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
- 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12,
- 0x6a, 0x0a, 0x15, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74,
- 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36,
+ 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x01, 0x0a, 0x06, 0x4d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x12,
+ 0x4f, 0x0a, 0x09, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d,
+ 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65,
+ 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
+ 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x12, 0x5e, 0x0a, 0x11, 0x61, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69,
+ 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f,
+ 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69,
+ 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63,
+ 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x10,
+ 0x61, 0x6e, 0x6e, 0x75, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73,
+ 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04,
+ 0x64, 0x61, 0x74, 0x61, 0x22, 0xb9, 0x04, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12,
+ 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x74, 0x44, 0x65, 0x6e, 0x6f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 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x69, 0x6e, 0x66, 0x6c, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x12, 0x5b, 0x0a, 0x0d, 0x69, 0x6e, 0x66, 0x6c, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36,
0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64,
0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79,
0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65,
- 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x13, 0x69, 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x52, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x5b, 0x0a, 0x0d, 0x69,
- 0x6e, 0x66, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x09, 0x42, 0x36, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d,
- 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65,
- 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0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 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0,
- 0x2a, 0x01, 0x52, 0x0a, 0x67, 0x6f, 0x61, 0x6c, 0x42, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x26,
- 0x0a, 0x0f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x79, 0x65, 0x61,
- 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x50,
- 0x65, 0x72, 0x59, 0x65, 0x61, 0x72, 0x12, 0x4a, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x75,
- 0x70, 0x70, 0x6c, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00,
- 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f,
- 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73,
- 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x53, 0x75, 0x70, 0x70,
- 0x6c, 0x79, 0x3a, 0x1d, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d,
- 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d,
- 0x73, 0x42, 0xc4, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
- 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x09, 0x4d,
- 0x69, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d,
- 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73,
- 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
- 0x3b, 0x6d, 0x69, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43,
- 0x4d, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4d, 0x69, 0x6e, 0x74,
- 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f,
- 0x73, 0x5c, 0x4d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02,
- 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62,
- 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
- 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4d, 0x69, 0x6e, 0x74, 0x3a,
- 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62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, 0x6d, 0x6f, 0x73, 0x2e, 0x4d, 0x69, 0x6e, 0x74, 0x2e,
+ 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
+ 0x5c, 0x4d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x1f,
+ 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4d, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65,
+ 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
+ 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4d, 0x69, 0x6e, 0x74, 0x3a, 0x3a,
+ 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/baseapp/abci.go b/baseapp/abci.go
index dea6a59814c0..30e47214b3dc 100644
--- a/baseapp/abci.go
+++ b/baseapp/abci.go
@@ -8,7 +8,8 @@ import (
"strings"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abcitypes "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
"github.com/cosmos/gogoproto/proto"
"google.golang.org/grpc/codes"
@@ -116,8 +117,7 @@ func (app *BaseApp) InitChain(req *abci.InitChainRequest) (*abci.InitChainRespon
)
}
- sort.Sort(abci.ValidatorUpdates(req.Validators))
- sort.Sort(abci.ValidatorUpdates(res.Validators))
+ sort.Sort(abcitypes.ValidatorUpdates(req.Validators))
for i := range res.Validators {
if !proto.Equal(&res.Validators[i], &req.Validators[i]) {
diff --git a/baseapp/abci_test.go b/baseapp/abci_test.go
index 321a9037a71e..7e08aabfba05 100644
--- a/baseapp/abci_test.go
+++ b/baseapp/abci_test.go
@@ -14,7 +14,7 @@ import (
"testing"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtprotocrypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
"github.com/cometbft/cometbft/crypto/secp256k1"
diff --git a/baseapp/abci_utils.go b/baseapp/abci_utils.go
index 7c9aac3202a1..3372bf9e39d8 100644
--- a/baseapp/abci_utils.go
+++ b/baseapp/abci_utils.go
@@ -7,7 +7,7 @@ import (
"fmt"
"slices"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
cryptoenc "github.com/cometbft/cometbft/crypto/encoding"
cmttypes "github.com/cometbft/cometbft/types"
diff --git a/baseapp/abci_utils_test.go b/baseapp/abci_utils_test.go
index 7f23e924a32b..25d4c4073c89 100644
--- a/baseapp/abci_utils_test.go
+++ b/baseapp/abci_utils_test.go
@@ -5,7 +5,7 @@ import (
"sort"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtprotocrypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
cmtsecp256k1 "github.com/cometbft/cometbft/crypto/secp256k1"
diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go
index 36121b7f221d..4f1aedf1ed08 100644
--- a/baseapp/baseapp.go
+++ b/baseapp/baseapp.go
@@ -9,7 +9,7 @@ import (
"strconv"
"sync"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
"github.com/cometbft/cometbft/crypto/tmhash"
dbm "github.com/cosmos/cosmos-db"
diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go
index 7afefa4d8456..95e4df2b2538 100644
--- a/baseapp/baseapp_test.go
+++ b/baseapp/baseapp_test.go
@@ -9,7 +9,7 @@ import (
"testing"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
dbm "github.com/cosmos/cosmos-db"
"github.com/stretchr/testify/require"
diff --git a/baseapp/grpcrouter.go b/baseapp/grpcrouter.go
index fa766462f2ef..d555560955b4 100644
--- a/baseapp/grpcrouter.go
+++ b/baseapp/grpcrouter.go
@@ -4,7 +4,7 @@ import (
"context"
"fmt"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
gogogrpc "github.com/cosmos/gogoproto/grpc"
"google.golang.org/grpc"
"google.golang.org/grpc/encoding"
diff --git a/baseapp/grpcrouter_helpers.go b/baseapp/grpcrouter_helpers.go
index 74f5eff9122a..e629be06cb63 100644
--- a/baseapp/grpcrouter_helpers.go
+++ b/baseapp/grpcrouter_helpers.go
@@ -4,7 +4,7 @@ import (
gocontext "context"
"fmt"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
gogogrpc "github.com/cosmos/gogoproto/grpc"
"google.golang.org/grpc"
diff --git a/baseapp/msg_service_router.go b/baseapp/msg_service_router.go
index f4f8d86f22f0..867809152f57 100644
--- a/baseapp/msg_service_router.go
+++ b/baseapp/msg_service_router.go
@@ -5,7 +5,7 @@ import (
"fmt"
"reflect"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
gogogrpc "github.com/cosmos/gogoproto/grpc"
"github.com/cosmos/gogoproto/proto"
"google.golang.org/grpc"
diff --git a/baseapp/msg_service_router_test.go b/baseapp/msg_service_router_test.go
index 2074eb72af3f..85b233c71d97 100644
--- a/baseapp/msg_service_router_test.go
+++ b/baseapp/msg_service_router_test.go
@@ -4,7 +4,7 @@ import (
"context"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
dbm "github.com/cosmos/cosmos-db"
"github.com/stretchr/testify/require"
diff --git a/baseapp/oe/optimistic_execution.go b/baseapp/oe/optimistic_execution.go
index 3fe6f9dbf949..e5820aa0022e 100644
--- a/baseapp/oe/optimistic_execution.go
+++ b/baseapp/oe/optimistic_execution.go
@@ -8,7 +8,7 @@ import (
"sync"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"cosmossdk.io/core/log"
)
diff --git a/baseapp/oe/optimistic_execution_test.go b/baseapp/oe/optimistic_execution_test.go
index e24041b61ea2..726e971e4d84 100644
--- a/baseapp/oe/optimistic_execution_test.go
+++ b/baseapp/oe/optimistic_execution_test.go
@@ -5,7 +5,7 @@ import (
"errors"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/stretchr/testify/assert"
"cosmossdk.io/core/log"
diff --git a/baseapp/snapshot_test.go b/baseapp/snapshot_test.go
index 7c7792e85559..e6e6f1e5bd7d 100644
--- a/baseapp/snapshot_test.go
+++ b/baseapp/snapshot_test.go
@@ -5,7 +5,7 @@ import (
"fmt"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/stretchr/testify/require"
pruningtypes "cosmossdk.io/store/pruning/types"
diff --git a/baseapp/streaming_test.go b/baseapp/streaming_test.go
index 9c8a41a38135..6276b9988c9d 100644
--- a/baseapp/streaming_test.go
+++ b/baseapp/streaming_test.go
@@ -5,7 +5,7 @@ import (
"fmt"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
tmproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
"github.com/stretchr/testify/require"
diff --git a/client/grpc/cmtservice/service.go b/client/grpc/cmtservice/service.go
index 55a89b4b30d7..ad307984c0e5 100644
--- a/client/grpc/cmtservice/service.go
+++ b/client/grpc/cmtservice/service.go
@@ -3,7 +3,7 @@ package cmtservice
import (
"context"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
gogogrpc "github.com/cosmos/gogoproto/grpc"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"google.golang.org/grpc/codes"
diff --git a/client/grpc/cmtservice/types.go b/client/grpc/cmtservice/types.go
index b49a1e62b1bb..a4aef0287848 100644
--- a/client/grpc/cmtservice/types.go
+++ b/client/grpc/cmtservice/types.go
@@ -1,7 +1,7 @@
package cmtservice
import (
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
)
// ToABCIRequestQuery converts a gRPC ABCIQueryRequest type to an ABCI
diff --git a/client/grpc_query.go b/client/grpc_query.go
index fc3a5325c6f2..45f60e48d2de 100644
--- a/client/grpc_query.go
+++ b/client/grpc_query.go
@@ -6,7 +6,7 @@ import (
"reflect"
"strconv"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
gogogrpc "github.com/cosmos/gogoproto/grpc"
"google.golang.org/grpc"
"google.golang.org/grpc/encoding"
diff --git a/client/query.go b/client/query.go
index a90f80e79fa4..35cb3f0f7e78 100644
--- a/client/query.go
+++ b/client/query.go
@@ -6,7 +6,7 @@ import (
"fmt"
"strings"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
rpcclient "github.com/cometbft/cometbft/rpc/client"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
diff --git a/client/rpc/rpc_test.go b/client/rpc/rpc_test.go
index 47da209af499..0c360b837a9a 100644
--- a/client/rpc/rpc_test.go
+++ b/client/rpc/rpc_test.go
@@ -5,7 +5,7 @@ import (
"strconv"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/stretchr/testify/suite"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
diff --git a/core/context/context._test.go b/core/context/context._test.go
deleted file mode 100644
index df7d9dcd93c6..000000000000
--- a/core/context/context._test.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package context
-
-import (
- "testing"
-
- "github.com/stretchr/testify/require"
-)
-
-func Test_Sanity(t *testing.T) {
- require.NotEqual(t, CometInfoKey, ExecModeKey)
-}
diff --git a/core/context/context.go b/core/context/context.go
index b330cb48b22f..6803bd7eb44b 100644
--- a/core/context/context.go
+++ b/core/context/context.go
@@ -1,7 +1,5 @@
package context
-type contextKey uint8
-
type (
execModeKey struct{}
cometInfoKey struct{}
diff --git a/crypto/codec/amino.go b/crypto/codec/amino.go
index 2c83723a6d48..373ef14621f8 100644
--- a/crypto/codec/amino.go
+++ b/crypto/codec/amino.go
@@ -5,6 +5,7 @@ import (
"cosmossdk.io/core/legacy"
+ bls12_381 "github.com/cosmos/cosmos-sdk/crypto/keys/bls12_381"
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
kmultisig "github.com/cosmos/cosmos-sdk/crypto/keys/multisig"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
@@ -21,6 +22,7 @@ func RegisterCrypto(cdc legacy.Amino) {
ed25519.PubKeyName)
cdc.RegisterConcrete(&secp256k1.PubKey{},
secp256k1.PubKeyName)
+ cdc.RegisterConcrete(&bls12_381.PubKey{}, bls12_381.PubKeyName)
cdc.RegisterConcrete(&kmultisig.LegacyAminoPubKey{},
kmultisig.PubKeyAminoRoute)
@@ -31,4 +33,5 @@ func RegisterCrypto(cdc legacy.Amino) {
ed25519.PrivKeyName)
cdc.RegisterConcrete(&secp256k1.PrivKey{},
secp256k1.PrivKeyName)
+ cdc.RegisterConcrete(&bls12_381.PrivKey{}, bls12_381.PrivKeyName)
}
diff --git a/crypto/codec/cmt.go b/crypto/codec/cmt.go
index 3e62182870f3..9617f94bf1a3 100644
--- a/crypto/codec/cmt.go
+++ b/crypto/codec/cmt.go
@@ -7,6 +7,7 @@ import (
"cosmossdk.io/errors"
+ bls12_381 "github.com/cosmos/cosmos-sdk/crypto/keys/bls12_381"
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
@@ -24,6 +25,10 @@ func FromCmtProtoPublicKey(protoPk cmtprotocrypto.PublicKey) (cryptotypes.PubKey
return &secp256k1.PubKey{
Key: protoPk.Secp256K1,
}, nil
+ case *cmtprotocrypto.PublicKey_Bls12381:
+ return &bls12_381.PubKey{
+ Key: protoPk.Bls12381,
+ }, nil
default:
return nil, errors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v from Tendermint public key", protoPk)
}
@@ -44,6 +49,12 @@ func ToCmtProtoPublicKey(pk cryptotypes.PubKey) (cmtprotocrypto.PublicKey, error
Secp256K1: pk.Key,
},
}, nil
+ case *bls12_381.PubKey:
+ return cmtprotocrypto.PublicKey{
+ Sum: &cmtprotocrypto.PublicKey_Bls12381{
+ Bls12381: pk.Key,
+ },
+ }, nil
default:
return cmtprotocrypto.PublicKey{}, errors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v to Tendermint public key", pk)
}
diff --git a/crypto/codec/proto.go b/crypto/codec/proto.go
index 89f4b508ed81..ffe6af31ec02 100644
--- a/crypto/codec/proto.go
+++ b/crypto/codec/proto.go
@@ -3,6 +3,7 @@ package codec
import (
"cosmossdk.io/core/registry"
+ bls12_381 "github.com/cosmos/cosmos-sdk/crypto/keys/bls12_381"
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
"github.com/cosmos/cosmos-sdk/crypto/keys/multisig"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
@@ -16,11 +17,13 @@ func RegisterInterfaces(registry registry.InterfaceRegistrar) {
registry.RegisterInterface("cosmos.crypto.PubKey", pk)
registry.RegisterImplementations(pk, &ed25519.PubKey{})
registry.RegisterImplementations(pk, &secp256k1.PubKey{})
+ registry.RegisterImplementations(pk, &bls12_381.PubKey{})
registry.RegisterImplementations(pk, &multisig.LegacyAminoPubKey{})
var priv *cryptotypes.PrivKey
registry.RegisterInterface("cosmos.crypto.PrivKey", priv)
registry.RegisterImplementations(priv, &secp256k1.PrivKey{})
registry.RegisterImplementations(priv, &ed25519.PrivKey{})
+ registry.RegisterImplementations(priv, &bls12_381.PrivKey{})
secp256r1.RegisterInterfaces(registry)
}
diff --git a/crypto/hd/algo.go b/crypto/hd/algo.go
index d34bc6882390..32fb3af738fd 100644
--- a/crypto/hd/algo.go
+++ b/crypto/hd/algo.go
@@ -19,6 +19,9 @@ const (
// Ed25519Type represents the Ed25519Type signature system.
// It is currently not supported for end-user keys (wallets/ledgers).
Ed25519Type = PubKeyType("ed25519")
+ // Ed25519Type represents the Ed25519Type signature system.
+ // It is currently not supported for end-user keys (wallets/ledgers).
+ Bls12_381Type = PubKeyType("bls12_381")
// Sr25519Type represents the Sr25519Type signature system.
Sr25519Type = PubKeyType("sr25519")
)
diff --git a/crypto/keys/bls12_381/const.go b/crypto/keys/bls12_381/const.go
new file mode 100644
index 000000000000..bfabbdcc56dc
--- /dev/null
+++ b/crypto/keys/bls12_381/const.go
@@ -0,0 +1,20 @@
+package bls12_381
+
+const (
+ PrivKeyName = "cometbft/PrivKeyBls12_381"
+ PubKeyName = "cometbft/PubKeyBls12_381"
+ // PubKeySize is the size, in bytes, of public keys as used in this package.
+ PubKeySize = 32
+ // PrivKeySize is the size, in bytes, of private keys as used in this package.
+ PrivKeySize = 64
+ // SignatureLength defines the byte length of a BLS signature.
+ SignatureLength = 96
+ // SeedSize is the size, in bytes, of private key seeds. These are the
+ // private key representations used by RFC 8032.
+ SeedSize = 32
+
+ // MaxMsgLen defines the maximum length of the message bytes as passed to Sign.
+ MaxMsgLen = 32
+
+ KeyType = "bls12381"
+)
diff --git a/crypto/keys/bls12_381/key.go b/crypto/keys/bls12_381/key.go
new file mode 100644
index 000000000000..70370ceb87b0
--- /dev/null
+++ b/crypto/keys/bls12_381/key.go
@@ -0,0 +1,131 @@
+package bls12_381
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+
+ "github.com/cometbft/cometbft/crypto"
+
+ "github.com/cosmos/cosmos-sdk/codec"
+ cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
+)
+
+// ===============================================================================================
+// Private Key
+// ===============================================================================================
+
+// PrivKey is a wrapper around the Ethereum BLS12-381 private key type. This
+// wrapper conforms to crypto.Pubkey to allow for the use of the Ethereum
+// BLS12-381 private key type.
+
+var (
+ _ cryptotypes.PrivKey = &PrivKey{}
+ _ codec.AminoMarshaler = &PrivKey{}
+)
+
+// NewPrivateKeyFromBytes build a new key from the given bytes.
+func NewPrivateKeyFromBytes(bz []byte) (PrivKey, error) {
+ panic("not implemented, build flags are required to use bls12_381 keys")
+}
+
+// GenPrivKey generates a new key.
+func GenPrivKey() (PrivKey, error) {
+ panic("not implemented, build flags are required to use bls12_381 keys")
+}
+
+// Bytes returns the byte representation of the Key.
+func (privKey PrivKey) Bytes() []byte {
+ panic("not implemented, build flags are required to use bls12_381 keys")
+}
+
+// PubKey returns the private key's public key. If the privkey is not valid
+// it returns a nil value.
+func (privKey PrivKey) PubKey() cryptotypes.PubKey {
+ panic("not implemented, build flags are required to use bls12_381 keys")
+}
+
+// Equals returns true if two keys are equal and false otherwise.
+func (privKey PrivKey) Equals(other cryptotypes.LedgerPrivKey) bool {
+ panic("not implemented, build flags are required to use bls12_381 keys")
+}
+
+// Type returns the type.
+func (PrivKey) Type() string {
+ return KeyType
+}
+
+// Sign signs the given byte array. If msg is larger than
+// MaxMsgLen, SHA256 sum will be signed instead of the raw bytes.
+func (privKey PrivKey) Sign(msg []byte) ([]byte, error) {
+ panic("not implemented, build flags are required to use bls12_381 keys")
+}
+
+// MarshalAmino overrides Amino binary marshaling.
+func (privKey PrivKey) MarshalAmino() ([]byte, error) {
+ return privKey.Key, nil
+}
+
+// UnmarshalAmino overrides Amino binary marshaling.
+func (privKey *PrivKey) UnmarshalAmino(bz []byte) error {
+ if len(bz) != PrivKeySize {
+ return errors.New("invalid privkey size")
+ }
+ privKey.Key = bz
+
+ return nil
+}
+
+// MarshalAminoJSON overrides Amino JSON marshaling.
+func (privKey PrivKey) MarshalAminoJSON() ([]byte, error) {
+ // When we marshal to Amino JSON, we don't marshal the "key" field itself,
+ // just its contents (i.e. the key bytes).
+ return privKey.MarshalAmino()
+}
+
+// UnmarshalAminoJSON overrides Amino JSON marshaling.
+func (privKey *PrivKey) UnmarshalAminoJSON(bz []byte) error {
+ return privKey.UnmarshalAmino(bz)
+}
+
+// ===============================================================================================
+// Public Key
+// ===============================================================================================
+
+// Pubkey is a wrapper around the Ethereum BLS12-381 public key type. This
+// wrapper conforms to crypto.Pubkey to allow for the use of the Ethereum
+// BLS12-381 public key type.
+
+var _ cryptotypes.PubKey = &PubKey{}
+
+// Address returns the address of the key.
+//
+// The function will panic if the public key is invalid.
+func (pubKey PubKey) Address() crypto.Address {
+ panic("not implemented, build flags are required to use bls12_381 keys")
+}
+
+// VerifySignature verifies the given signature.
+func (pubKey PubKey) VerifySignature(msg, sig []byte) bool {
+ panic("not implemented, build flags are required to use bls12_381 keys")
+}
+
+// Bytes returns the byte format.
+func (pubKey PubKey) Bytes() []byte {
+ return pubKey.Key
+}
+
+// Type returns the key's type.
+func (PubKey) Type() string {
+ return KeyType
+}
+
+// Equals returns true if the other's type is the same and their bytes are deeply equal.
+func (pubKey PubKey) Equals(other cryptotypes.PubKey) bool {
+ return pubKey.Type() == other.Type() && bytes.Equal(pubKey.Bytes(), other.Bytes())
+}
+
+// String returns Hex representation of a pubkey with it's type
+func (pubKey PubKey) String() string {
+ return fmt.Sprintf("PubKeyBLS12_381{%X}", pubKey.Key)
+}
diff --git a/crypto/keys/bls12_381/key_cgo.go b/crypto/keys/bls12_381/key_cgo.go
new file mode 100644
index 000000000000..9ad681179dce
--- /dev/null
+++ b/crypto/keys/bls12_381/key_cgo.go
@@ -0,0 +1,181 @@
+//go:build ((linux && amd64) || (linux && arm64) || (darwin && amd64) || (darwin && arm64) || (windows && amd64)) && bls12381
+
+package bls12_381
+
+import (
+ "bytes"
+ "crypto/sha256"
+ "errors"
+ "fmt"
+
+ "github.com/cometbft/cometbft/crypto"
+ "github.com/cometbft/cometbft/crypto/tmhash"
+
+ bls12381 "github.com/cosmos/crypto/curves/bls12381"
+
+ "github.com/cosmos/cosmos-sdk/codec"
+ cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
+)
+
+// ===============================================================================================
+// Private Key
+// ===============================================================================================
+
+// PrivKey is a wrapper around the Ethereum BLS12-381 private key type. This
+// wrapper conforms to crypto.Pubkey to allow for the use of the Ethereum
+// BLS12-381 private key type.
+
+var (
+ _ cryptotypes.PrivKey = &PrivKey{}
+ _ codec.AminoMarshaler = &PrivKey{}
+)
+
+// NewPrivateKeyFromBytes build a new key from the given bytes.
+func NewPrivateKeyFromBytes(bz []byte) (PrivKey, error) {
+ secretKey, err := bls12381.SecretKeyFromBytes(bz)
+ if err != nil {
+ return PrivKey{}, err
+ }
+ return secretKey.Marshal(), nil
+}
+
+// GenPrivKey generates a new key.
+func GenPrivKey() (PrivKey, error) {
+ secretKey, err := bls12381.RandKey()
+ return PrivKey(secretKey.Marshal()), err
+}
+
+// Bytes returns the byte representation of the Key.
+func (privKey PrivKey) Bytes() []byte {
+ return privKey.Key
+}
+
+// PubKey returns the private key's public key. If the privkey is not valid
+// it returns a nil value.
+func (privKey PrivKey) PubKey() cryptotypes.PubKey {
+ secretKey, err := bls12381.SecretKeyFromBytes(privKey.Key)
+ if err != nil {
+ return nil
+ }
+
+ return PubKey(secretKey.PublicKey().Marshal())
+}
+
+// Equals returns true if two keys are equal and false otherwise.
+func (privKey PrivKey) Equals(other cryptotypes.LedgerPrivKey) bool {
+ return privKey.Type() == other.Type() && bytes.Equal(privKey.Bytes(), other.Bytes())
+}
+
+// Type returns the type.
+func (PrivKey) Type() string {
+ return keyType
+}
+
+// Sign signs the given byte array. If msg is larger than
+// MaxMsgLen, SHA256 sum will be signed instead of the raw bytes.
+func (privKey PrivKey) Sign(msg []byte) ([]byte, error) {
+ secretKey, err := bls12381.SecretKeyFromBytes(privKey.Key)
+ if err != nil {
+ return nil, err
+ }
+
+ if len(msg) > MaxMsgLen {
+ hash := sha256.Sum256(msg)
+ sig := secretKey.Sign(hash[:])
+ return sig.Marshal(), nil
+ }
+ sig := secretKey.Sign(msg)
+ return sig.Marshal(), nil
+}
+
+// MarshalAmino overrides Amino binary marshaling.
+func (privKey PrivKey) MarshalAmino() ([]byte, error) {
+ return privKey.Key, nil
+}
+
+// UnmarshalAmino overrides Amino binary marshaling.
+func (privKey *PrivKey) UnmarshalAmino(bz []byte) error {
+ if len(bz) != PrivKeySize {
+ return errors.New("invalid privkey size")
+ }
+ privKey.Key = bz
+
+ return nil
+}
+
+// MarshalAminoJSON overrides Amino JSON marshaling.
+func (privKey PrivKey) MarshalAminoJSON() ([]byte, error) {
+ // When we marshal to Amino JSON, we don't marshal the "key" field itself,
+ // just its contents (i.e. the key bytes).
+ return privKey.MarshalAmino()
+}
+
+// UnmarshalAminoJSON overrides Amino JSON marshaling.
+func (privKey *PrivKey) UnmarshalAminoJSON(bz []byte) error {
+ return privKey.UnmarshalAmino(bz)
+}
+
+// ===============================================================================================
+// Public Key
+// ===============================================================================================
+
+// Pubkey is a wrapper around the Ethereum BLS12-381 public key type. This
+// wrapper conforms to crypto.Pubkey to allow for the use of the Ethereum
+// BLS12-381 public key type.
+
+var _ cryptotypes.PubKey = &PubKey{}
+
+// Address returns the address of the key.
+//
+// The function will panic if the public key is invalid.
+func (pubKey PubKey) Address() crypto.Address {
+ pk, _ := bls12381.PublicKeyFromBytes(pubKey.Key)
+ if len(pk.Marshal()) != PubKeySize {
+ panic("pubkey is incorrect size")
+ }
+ return crypto.Address(tmhash.SumTruncated(pubKey.Key))
+}
+
+// VerifySignature verifies the given signature.
+func (pubKey PubKey) VerifySignature(msg, sig []byte) bool {
+ if len(sig) != SignatureLength {
+ return false
+ }
+
+ pubK, err := bls12381.PublicKeyFromBytes(pubKey.Key)
+ if err != nil { // invalid pubkey
+ return false
+ }
+
+ if len(msg) > MaxMsgLen {
+ hash := sha256.Sum256(msg)
+ msg = hash[:]
+ }
+
+ ok, err := bls12381.VerifySignature(sig, [MaxMsgLen]byte(msg[:MaxMsgLen]), pubK)
+ if err != nil { // bad signature
+ return false
+ }
+
+ return ok
+}
+
+// Bytes returns the byte format.
+func (pubKey PubKey) Bytes() []byte {
+ return pubKey.Key
+}
+
+// Type returns the key's type.
+func (PubKey) Type() string {
+ return keyType
+}
+
+// Equals returns true if the other's type is the same and their bytes are deeply equal.
+func (pubKey PubKey) Equals(other cryptotypes.PubKey) bool {
+ return pubKey.Type() == other.Type() && bytes.Equal(pubKey.Bytes(), other.Bytes())
+}
+
+// String returns Hex representation of a pubkey with it's type
+func (pubKey PubKey) String() string {
+ return fmt.Sprintf("PubKeyBLS12_381{%X}", pubKey.Key)
+}
diff --git a/crypto/keys/bls12_381/keys.pb.go b/crypto/keys/bls12_381/keys.pb.go
new file mode 100644
index 000000000000..4524d9e5dd35
--- /dev/null
+++ b/crypto/keys/bls12_381/keys.pb.go
@@ -0,0 +1,504 @@
+// Code generated by protoc-gen-gogo. DO NOT EDIT.
+// source: cosmos/crypto/bls12_381/keys.proto
+
+package bls12_381
+
+import (
+ fmt "fmt"
+ _ "github.com/cosmos/cosmos-sdk/types/tx/amino"
+ _ "github.com/cosmos/gogoproto/gogoproto"
+ proto "github.com/cosmos/gogoproto/proto"
+ io "io"
+ math "math"
+ math_bits "math/bits"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+
+// PubKey is an ed25519 public key for handling Tendermint keys in SDK.
+// It's needed for Any serialization and SDK compatibility.
+// It must not be used in a non Tendermint key context because it doesn't implement
+// ADR-28. Nevertheless, you will like to use ed25519 in app user level
+// then you must create a new proto message and follow ADR-28 for Address construction.
+type PubKey struct {
+ Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+}
+
+func (m *PubKey) Reset() { *m = PubKey{} }
+func (*PubKey) ProtoMessage() {}
+func (*PubKey) Descriptor() ([]byte, []int) {
+ return fileDescriptor_afa2b84d543bb80f, []int{0}
+}
+func (m *PubKey) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_PubKey.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *PubKey) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PubKey.Merge(m, src)
+}
+func (m *PubKey) XXX_Size() int {
+ return m.Size()
+}
+func (m *PubKey) XXX_DiscardUnknown() {
+ xxx_messageInfo_PubKey.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PubKey proto.InternalMessageInfo
+
+func (m *PubKey) GetKey() []byte {
+ if m != nil {
+ return m.Key
+ }
+ return nil
+}
+
+// PrivKey defines a ed25519 private key.
+// NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context.
+type PrivKey struct {
+ Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+}
+
+func (m *PrivKey) Reset() { *m = PrivKey{} }
+func (m *PrivKey) String() string { return proto.CompactTextString(m) }
+func (*PrivKey) ProtoMessage() {}
+func (*PrivKey) Descriptor() ([]byte, []int) {
+ return fileDescriptor_afa2b84d543bb80f, []int{1}
+}
+func (m *PrivKey) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PrivKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_PrivKey.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *PrivKey) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PrivKey.Merge(m, src)
+}
+func (m *PrivKey) XXX_Size() int {
+ return m.Size()
+}
+func (m *PrivKey) XXX_DiscardUnknown() {
+ xxx_messageInfo_PrivKey.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PrivKey proto.InternalMessageInfo
+
+func (m *PrivKey) GetKey() []byte {
+ if m != nil {
+ return m.Key
+ }
+ return nil
+}
+
+func init() {
+ proto.RegisterType((*PubKey)(nil), "cosmos.crypto.bls12_381.PubKey")
+ proto.RegisterType((*PrivKey)(nil), "cosmos.crypto.bls12_381.PrivKey")
+}
+
+func init() {
+ proto.RegisterFile("cosmos/crypto/bls12_381/keys.proto", fileDescriptor_afa2b84d543bb80f)
+}
+
+var fileDescriptor_afa2b84d543bb80f = []byte{
+ // 244 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0xce, 0x2f, 0xce,
+ 0xcd, 0x2f, 0xd6, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0x4f, 0xca, 0x29, 0x36, 0x34, 0x8a,
+ 0x37, 0xb6, 0x30, 0xd4, 0xcf, 0x4e, 0xad, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12,
+ 0x87, 0xa8, 0xd1, 0x83, 0xa8, 0xd1, 0x83, 0xab, 0x91, 0x12, 0x4c, 0xcc, 0xcd, 0xcc, 0xcb, 0xd7,
+ 0x07, 0x93, 0x10, 0xb5, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, 0x05, 0x11,
+ 0x55, 0xf2, 0xe6, 0x62, 0x0b, 0x28, 0x4d, 0xf2, 0x4e, 0xad, 0x14, 0x12, 0xe0, 0x62, 0xce, 0x4e,
+ 0xad, 0x94, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x09, 0x02, 0x31, 0xad, 0xf4, 0x67, 0x2c, 0x90, 0x67,
+ 0xe8, 0x7a, 0xbe, 0x41, 0x4b, 0x22, 0x39, 0x3f, 0x37, 0xb5, 0x24, 0x29, 0xad, 0x44, 0x1f, 0xa2,
+ 0xd6, 0xc9, 0x27, 0x18, 0x62, 0xcf, 0xa4, 0xe7, 0x1b, 0xb4, 0x38, 0xb3, 0x53, 0x2b, 0xe3, 0xd3,
+ 0x32, 0x53, 0x73, 0x52, 0x94, 0x3c, 0xb9, 0xd8, 0x03, 0x8a, 0x32, 0xcb, 0xb0, 0x9b, 0xa6, 0x03,
+ 0x32, 0x49, 0x12, 0x61, 0x12, 0x44, 0x21, 0x0e, 0xa3, 0x9c, 0x7c, 0x4e, 0x3c, 0x92, 0x63, 0xbc,
+ 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63,
+ 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x28, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f,
+ 0x57, 0x1f, 0x16, 0x44, 0x60, 0x4a, 0xb7, 0x38, 0x25, 0x1b, 0x16, 0x5a, 0xa0, 0x30, 0x42, 0x04,
+ 0x59, 0x12, 0x1b, 0xd8, 0xb3, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x05, 0x13, 0x8a,
+ 0x54, 0x01, 0x00, 0x00,
+}
+
+func (m *PubKey) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PubKey) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Key) > 0 {
+ i -= len(m.Key)
+ copy(dAtA[i:], m.Key)
+ i = encodeVarintKeys(dAtA, i, uint64(len(m.Key)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *PrivKey) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PrivKey) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *PrivKey) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.Key) > 0 {
+ i -= len(m.Key)
+ copy(dAtA[i:], m.Key)
+ i = encodeVarintKeys(dAtA, i, uint64(len(m.Key)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func encodeVarintKeys(dAtA []byte, offset int, v uint64) int {
+ offset -= sovKeys(v)
+ base := offset
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return base
+}
+func (m *PubKey) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Key)
+ if l > 0 {
+ n += 1 + l + sovKeys(uint64(l))
+ }
+ return n
+}
+
+func (m *PrivKey) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Key)
+ if l > 0 {
+ n += 1 + l + sovKeys(uint64(l))
+ }
+ return n
+}
+
+func sovKeys(x uint64) (n int) {
+ return (math_bits.Len64(x|1) + 6) / 7
+}
+func sozKeys(x uint64) (n int) {
+ return sovKeys(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (m *PubKey) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowKeys
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PubKey: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowKeys
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthKeys
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex < 0 {
+ return ErrInvalidLengthKeys
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
+ if m.Key == nil {
+ m.Key = []byte{}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipKeys(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthKeys
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *PrivKey) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowKeys
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: PrivKey: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: PrivKey: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowKeys
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthKeys
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex < 0 {
+ return ErrInvalidLengthKeys
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
+ if m.Key == nil {
+ m.Key = []byte{}
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipKeys(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthKeys
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipKeys(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ depth := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowKeys
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowKeys
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ case 1:
+ iNdEx += 8
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowKeys
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if length < 0 {
+ return 0, ErrInvalidLengthKeys
+ }
+ iNdEx += length
+ case 3:
+ depth++
+ case 4:
+ if depth == 0 {
+ return 0, ErrUnexpectedEndOfGroupKeys
+ }
+ depth--
+ case 5:
+ iNdEx += 4
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthKeys
+ }
+ if depth == 0 {
+ return iNdEx, nil
+ }
+ }
+ return 0, io.ErrUnexpectedEOF
+}
+
+var (
+ ErrInvalidLengthKeys = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowKeys = fmt.Errorf("proto: integer overflow")
+ ErrUnexpectedEndOfGroupKeys = fmt.Errorf("proto: unexpected end of group")
+)
diff --git a/crypto/keys/ed25519/ed25519.go b/crypto/keys/ed25519/ed25519.go
index 8ded87ec3f77..792777b17de2 100644
--- a/crypto/keys/ed25519/ed25519.go
+++ b/crypto/keys/ed25519/ed25519.go
@@ -34,7 +34,7 @@ const (
// private key representations used by RFC 8032.
SeedSize = 32
- keyType = "ed25519"
+ KeyType = "ed25519"
)
var (
@@ -92,7 +92,7 @@ func (privKey *PrivKey) Equals(other cryptotypes.LedgerPrivKey) bool {
}
func (privKey *PrivKey) Type() string {
- return keyType
+ return KeyType
}
// MarshalAmino overrides Amino binary marshaling.
@@ -193,7 +193,7 @@ func (pubKey *PubKey) String() string {
}
func (pubKey *PubKey) Type() string {
- return keyType
+ return KeyType
}
func (pubKey *PubKey) Equals(other cryptotypes.PubKey) bool {
diff --git a/crypto/keys/multisig/codec.go b/crypto/keys/multisig/codec.go
index 6572123af540..47aa70060f7f 100644
--- a/crypto/keys/multisig/codec.go
+++ b/crypto/keys/multisig/codec.go
@@ -4,6 +4,7 @@ import (
"github.com/cometbft/cometbft/crypto/sr25519"
"github.com/cosmos/cosmos-sdk/codec"
+ bls12_381 "github.com/cosmos/cosmos-sdk/crypto/keys/bls12_381"
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
@@ -27,6 +28,8 @@ func init() {
sr25519.PubKeyName)
AminoCdc.RegisterConcrete(&secp256k1.PubKey{},
secp256k1.PubKeyName)
+ AminoCdc.RegisterConcrete(&bls12_381.PubKey{},
+ bls12_381.PubKeyName)
AminoCdc.RegisterConcrete(&LegacyAminoPubKey{},
PubKeyAminoRoute)
}
diff --git a/docs/architecture/README.md b/docs/architecture/README.md
index 035184c8764d..4c6d342b628d 100644
--- a/docs/architecture/README.md
+++ b/docs/architecture/README.md
@@ -62,6 +62,7 @@ When writing ADRs, follow the same best practices for writing RFCs. When writing
* [ADR 061: Liquid Staking](./adr-061-liquid-staking.md)
* [ADR 070: Un-Ordered Transaction Inclusion](./adr-070-unordered-transactions.md)
* [ADR 065: Store v2](./adr-065-store-v2.md)
+* [ADR 073: Built-in In-process Indexer](./adr-073-indexer.md)
### Proposed
diff --git a/docs/architecture/adr-034-account-rekeying.md b/docs/architecture/adr-034-account-rekeying.md
index 951c30f6f82b..111a162ad811 100644
--- a/docs/architecture/adr-034-account-rekeying.md
+++ b/docs/architecture/adr-034-account-rekeying.md
@@ -43,7 +43,7 @@ The MsgChangePubKey transaction needs to be signed by the existing pubkey in sta
Once, approved, the handler for this message type, which takes in the AccountKeeper, will update the in-state pubkey for the account and replace it with the pubkey from the Msg.
-An account that has had its pubkey changed cannot be automatically pruned from state. This is because if pruned, the original pubkey of the account would be needed to recreate the same address, but the owner of the address may not have the original pubkey anymore. Currently, we do not automatically prune any accounts anyways, but we would like to keep this option open the road (this is the purpose of account numbers). To resolve this, we charge an additional gas fee for this operation to compensate for this this externality (this bound gas amount is configured as parameter `PubKeyChangeCost`). The bonus gas is charged inside the handler, using the `ConsumeGas` function. Furthermore, in the future, we can allow accounts that have rekeyed manually prune themselves using a new Msg type such as `MsgDeleteAccount`. Manually pruning accounts can give a gas refund as an incentive for performing the action.
+An account that has had its pubkey changed cannot be automatically pruned from state. This is because if pruned, the original pubkey of the account would be needed to recreate the same address, but the owner of the address may not have the original pubkey anymore. Currently, we do not automatically prune any accounts anyways, but we would like to keep this option open the road (this is the purpose of account numbers). To resolve this, we charge an additional gas fee for this operation to compensate for this externality (this bound gas amount is configured as parameter `PubKeyChangeCost`). The bonus gas is charged inside the handler, using the `ConsumeGas` function. Furthermore, in the future, we can allow accounts that have rekeyed manually prune themselves using a new Msg type such as `MsgDeleteAccount`. Manually pruning accounts can give a gas refund as an incentive for performing the action.
```go
amount := ak.GetParams(ctx).PubKeyChangeCost
diff --git a/docs/architecture/adr-064-abci-2.0.md b/docs/architecture/adr-064-abci-2.0.md
index 7d9f270f0205..d73cfcc85f4f 100644
--- a/docs/architecture/adr-064-abci-2.0.md
+++ b/docs/architecture/adr-064-abci-2.0.md
@@ -120,7 +120,7 @@ Recall, an implementation of `ExtendVoteHandler` does NOT need to be determinist
however, given a set of vote extensions, `VerifyVoteExtensionHandler` must be
deterministic, otherwise the chain may suffer from liveness faults. In addition,
recall CometBFT proceeds in rounds for each height, so if a decision cannot be
-made about about a block proposal at a given height, CometBFT will proceed to the
+made about a block proposal at a given height, CometBFT will proceed to the
next round and thus will execute `ExtendVote` and `VerifyVoteExtension` again for
the new round for each validator until 2/3 valid pre-commits can be obtained.
diff --git a/docs/architecture/adr-073-indexer.md b/docs/architecture/adr-073-indexer.md
index 5be91d358c8b..c751c9b24ac4 100644
--- a/docs/architecture/adr-073-indexer.md
+++ b/docs/architecture/adr-073-indexer.md
@@ -6,7 +6,7 @@
## Status
-PROPOSED Not Implemented
+Accepted Not Implemented
## Abstract
diff --git a/docs/build/building-apps/03-app-upgrade.md b/docs/build/building-apps/03-app-upgrade.md
index ebaddb3f75ea..5276b0035762 100644
--- a/docs/build/building-apps/03-app-upgrade.md
+++ b/docs/build/building-apps/03-app-upgrade.md
@@ -63,7 +63,7 @@ keeper's PreBlocker method:
func (app *myApp) PreBlocker(ctx sdk.Context, req req.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) {
// For demonstration sake, the app PreBlocker only returns the upgrade module pre-blocker.
// In a real app, the module manager should call all pre-blockers
- // return return app.ModuleManager.PreBlock(ctx, req)
+ // return app.ModuleManager.PreBlock(ctx, req)
return app.upgradeKeeper.PreBlocker(ctx, req)
}
```
diff --git a/docs/learn/advanced/03-node.md b/docs/learn/advanced/03-node.md
index b4a4236a0e0d..e1330e503644 100644
--- a/docs/learn/advanced/03-node.md
+++ b/docs/learn/advanced/03-node.md
@@ -81,7 +81,7 @@ Then, the instance of `app` is used to instantiate a new CometBFT node:
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/server/start.go#L341-L378
```
-The CometBFT node can be created with `app` because the latter satisfies the [`abci.Application` interface](https://pkg.go.dev/github.com/cometbft/cometbft/abci/types#Application) (given that `app` extends [`baseapp`](./00-baseapp.md)). As part of the `node.New` method, CometBFT makes sure that the height of the application (i.e. number of blocks since genesis) is equal to the height of the CometBFT node. The difference between these two heights should always be negative or null. If it is strictly negative, `node.New` will replay blocks until the height of the application reaches the height of the CometBFT node. Finally, if the height of the application is `0`, the CometBFT node will call [`InitChain`](./00-baseapp.md#initchain) on the application to initialize the state from the genesis file.
+The CometBFT node can be created with `app` because the latter satisfies the [`abci.Application` interface](https://pkg.go.dev/github.com/cometbft/cometbft/api/cometbft/abci/v1#Application) (given that `app` extends [`baseapp`](./00-baseapp.md)). As part of the `node.New` method, CometBFT makes sure that the height of the application (i.e. number of blocks since genesis) is equal to the height of the CometBFT node. The difference between these two heights should always be negative or null. If it is strictly negative, `node.New` will replay blocks until the height of the application reaches the height of the CometBFT node. Finally, if the height of the application is `0`, the CometBFT node will call [`InitChain`](./00-baseapp.md#initchain) on the application to initialize the state from the genesis file.
Once the CometBFT node is instantiated and in sync with the application, the node can be started:
diff --git a/docs/learn/intro/00-overview.md b/docs/learn/intro/00-overview.md
index 6f9d440b6db2..bb32d84a962f 100644
--- a/docs/learn/intro/00-overview.md
+++ b/docs/learn/intro/00-overview.md
@@ -6,9 +6,16 @@ sidebar_position: 1
## What is the Cosmos SDK
-The [Cosmos SDK](https://github.com/cosmos/cosmos-sdk) is an open-source framework for building multi-asset public Proof-of-Stake (PoS) blockchains, like the Cosmos Hub, as well as permissioned Proof-of-Authority (PoA) blockchains. Blockchains built with the Cosmos SDK are generally referred to as **application-specific blockchains**.
+The [Cosmos SDK](https://github.com/cosmos/cosmos-sdk) is an open-source toolkit for building multi-asset public Proof-of-Stake (PoS) blockchains, like the Cosmos Hub, as well as permissioned Proof-of-Authority (PoA) blockchains. Blockchains built with the Cosmos SDK are generally referred to as **application-specific blockchains**.
-The goal of the Cosmos SDK is to allow developers to easily create custom blockchains from scratch that can natively interoperate with other blockchains. We envision the Cosmos SDK as the npm-like framework to build secure blockchain applications on top of [CometBFT](https://github.com/cometbft/cometbft). SDK-based blockchains are built out of composable [modules](../../build/building-modules/00-intro.md), most of which are open-source and readily available for any developers to use. Anyone can create a module for the Cosmos SDK, and integrating already-built modules is as simple as importing them into your blockchain application. What's more, the Cosmos SDK is a capabilities-based system that allows developers to better reason about the security of interactions between modules. For a deeper look at capabilities, jump to [Object-Capability Model](../advanced/10-ocap.md).
+The goal of the Cosmos SDK is to allow developers to easily create custom blockchains from scratch that can natively interoperate with other blockchains.
+We further this modular approach by allowing developers to plug and play with different consensus engines this can range from the [CometBFT](https://github.com/cometbft/cometbft) or [Rollkit](https://rollkit.dev/).
+
+SDK-based blockchains have the choice to use the predefined modules or to build their own modules. What this means is that developers can build a blockchain that is tailored to their specific use case, without having to worry about the low-level details of building a blockchain from scratch. Predefined modules include staking, governance, and token issuance, among others.
+
+What's more, the Cosmos SDK is a capabilities-based system that allows developers to better reason about the security of interactions between modules. For a deeper look at capabilities, jump to [Object-Capability Model](../advanced/10-ocap.md).
+
+How you can look at this is if we imagine that the SDK is like a lego kit. You can choose to build the basic house from the instructions or you can choose to modify your house and add more floors, more doors, more windows. The choice is yours.
## What are Application-Specific Blockchains
@@ -18,11 +25,16 @@ Application-specific blockchains offer a radically different development paradig
Learn more about [application-specific blockchains](./01-why-app-specific.md).
+## What is Modularity
+
+Today there is a lot of talk around modularity and discussions between monolithic and modular. Originally the Cosmos SDK was built with a vision of modularity in mind. Modularity is derived from splitting a blockchain into customizable layers of execution, consensus, settlement and data availability, which is what the Cosmos SDK enables. This means that developers can plug and play, making their blockchain customisable by using different software for different layers. For example you can choose to build a vanilla chain and use the Cosmos SDK with CometBFT. CometBFT will be your consensus layer and the chain itself would be the settlement and execution layer. Another route could be to use the SDK with Rollkit and Celestia as your consensus and data availability layer. The benefit of modularity is that you can customize your chain to your specific use case.
+
## Why the Cosmos SDK
-The Cosmos SDK is the most advanced framework for building custom application-specific blockchains today. Here are a few reasons why you might want to consider building your decentralized application with the Cosmos SDK:
+The Cosmos SDK is the most advanced framework for building custom modular application-specific blockchains today. Here are a few reasons why you might want to consider building your decentralized application with the Cosmos SDK:
-* The default consensus engine available within the Cosmos SDK is [CometBFT](https://github.com/cometbft/cometbft). CometBFT is the most (and only) mature BFT consensus engine in existence. It is widely used across the industry and is considered the gold standard consensus engine for building Proof-of-Stake systems.
+* It allows you to plug and play and customize your consensus layer. As above you can use Rollkit and Celestia as your consensus and data availability layer. This offers a lot of flexibility and customisation.
+* Previously the default consensus engine available within the Cosmos SDK is [CometBFT](https://github.com/cometbft/cometbft). CometBFT is the most (and only) mature BFT consensus engine in existence. It is widely used across the industry and is considered the gold standard consensus engine for building Proof-of-Stake systems.
* The Cosmos SDK is open-source and designed to make it easy to build blockchains out of composable [modules](../../build/modules). As the ecosystem of open-source Cosmos SDK modules grows, it will become increasingly easier to build complex decentralized platforms with it.
* The Cosmos SDK is inspired by capabilities-based security, and informed by years of wrestling with blockchain state-machines. This makes the Cosmos SDK a very secure environment to build blockchains.
* Most importantly, the Cosmos SDK has already been used to build many application-specific blockchains that are already in production. Among others, we can cite [Cosmos Hub](https://hub.cosmos.network), [IRIS Hub](https://irisnet.org), [Binance Chain](https://docs.binance.org/), [Terra](https://terra.money/) or [Kava](https://www.kava.io/). [Many more](https://cosmos.network/ecosystem) are building on the Cosmos SDK.
diff --git a/docs/rfc/rfc-006-handlers.md b/docs/rfc/rfc-006-handlers.md
index b0cb11342b7d..479b2006300f 100644
--- a/docs/rfc/rfc-006-handlers.md
+++ b/docs/rfc/rfc-006-handlers.md
@@ -23,7 +23,7 @@ the use of [gRPC](https://github.com/TinyGo-org/TinyGo/issues/2814) within modul
This has led us to look at a design which would allow the usage of TinyGo and
other technologies.
-We looked at TinyGo for our first target in order to compile down down to a 32 bit environment which could be used with
+We looked at TinyGo for our first target in order to compile down to a 32 bit environment which could be used with
things like [Risc-0](https://www.risczero.com/), [Fluent](https://fluentlabs.xyz/) and other technologies. When speaking with the teams behind these technologies
we found that they were interested in using the Cosmos SDK but were unable to due to being unable to use TinyGo or the
Cosmos SDK go code in a 32 bit environment.
diff --git a/errors/CHANGELOG.md b/errors/CHANGELOG.md
index 0135befe9a73..9678589ad8c2 100644
--- a/errors/CHANGELOG.md
+++ b/errors/CHANGELOG.md
@@ -34,6 +34,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### API Breaking
* [#20402](https://github.com/cosmos/cosmos-sdk/pull/20402) Remove Grpc error codes from the error package. This is done in order to keep the dependency graph of errors minimal
+* [#20539](https://github.com/cosmos/cosmos-sdk/pull/20539) v2 errors removes `IsOf`, `Recover`, `WithType` and wrapped error. The errors package uses the go std library errors. It provides a `Wrap` and `Wrapf` to help in the migration from v1 to v2.
## [v1.0.1](https://github.com/cosmos/cosmos-sdk/releases/tag/errors%2Fv1.0.1)
diff --git a/errors/abci.go b/errors/abci.go
index 603f3b36ff1c..4fa5b959dbee 100644
--- a/errors/abci.go
+++ b/errors/abci.go
@@ -1,6 +1,7 @@
package errors
import (
+ "errors"
"fmt"
"reflect"
)
@@ -34,7 +35,8 @@ func ABCIInfo(err error, debug bool) (codespace string, code uint32, log string)
encode = debugErrEncoder
}
- return abciCodespace(err), abciCode(err), encode(err)
+ code, space := abciInfo(err)
+ return space, code, encode(err)
}
// The debugErrEncoder encodes the error with a stacktrace.
@@ -46,54 +48,25 @@ func defaultErrEncoder(err error) string {
return err.Error()
}
-type coder interface {
- ABCICode() uint32
-}
-
-// abciCode tests if given error contains an ABCI code and returns the value of
+// abciInfo tests if given error contains an ABCI code and returns the value of
// it if available. This function is testing for the causer interface as well
// and unwraps the error.
-func abciCode(err error) uint32 {
+func abciInfo(err error) (code uint32, codespace string) {
if errIsNil(err) {
- return SuccessABCICode
- }
-
- for {
- if c, ok := err.(coder); ok {
- return c.ABCICode()
- }
-
- if c, ok := err.(causer); ok {
- err = c.Cause()
- } else {
- return internalABCICode
- }
+ return SuccessABCICode, ""
}
-}
-type codespacer interface {
- Codespace() string
-}
+ var customErr *Error
-// abciCodespace tests if given error contains a codespace and returns the value of
-// it if available. This function is testing for the causer interface as well
-// and unwraps the error.
-func abciCodespace(err error) string {
- if errIsNil(err) {
- return ""
+ if errors.As(err, &customErr) {
+ code = customErr.ABCICode()
+ codespace = customErr.Codespace()
+ } else {
+ code = internalABCICode
+ codespace = internalABCICodespace
}
- for {
- if c, ok := err.(codespacer); ok {
- return c.Codespace()
- }
-
- if c, ok := err.(causer); ok {
- err = c.Cause()
- } else {
- return internalABCICodespace
- }
- }
+ return
}
// errIsNil returns true if value represented by the given error is nil.
diff --git a/errors/abci_test.go b/errors/abci_test.go
index 333731d01518..ca283997ae91 100644
--- a/errors/abci_test.go
+++ b/errors/abci_test.go
@@ -3,25 +3,10 @@ package errors
import (
"fmt"
"io"
- "strings"
"testing"
-
- "github.com/stretchr/testify/suite"
)
-type abciTestSuite struct {
- suite.Suite
-}
-
-func TestABCITestSuite(t *testing.T) {
- suite.Run(t, new(abciTestSuite))
-}
-
-func (s *abciTestSuite) SetupSuite() {
- s.T().Parallel()
-}
-
-func (s *abciTestSuite) TestABCInfo() {
+func TestABCInfo(t *testing.T) {
cases := map[string]struct {
err error
debug bool
@@ -37,7 +22,7 @@ func (s *abciTestSuite) TestABCInfo() {
wantSpace: testCodespace,
},
"wrapped SDK error": {
- err: Wrap(Wrap(ErrUnauthorized, "foo"), "bar"),
+ err: fmt.Errorf("bar: %w", fmt.Errorf("foo: %w", ErrUnauthorized)),
debug: false,
wantLog: "bar: foo: unauthorized",
wantCode: ErrUnauthorized.code,
@@ -64,93 +49,29 @@ func (s *abciTestSuite) TestABCInfo() {
wantCode: 1,
wantSpace: UndefinedCodespace,
},
- // This is hard to test because of attached stacktrace. This
- // case is tested in an another test.
- // "wrapped stdlib is a full message in debug mode": {
- // err: Wrap(io.EOF, "cannot read file"),
- // debug: true,
- // wantLog: "cannot read file: EOF",
- // wantCode: 1,
- // },
- "custom error": {
- err: customErr{},
- debug: false,
- wantLog: "custom",
- wantCode: 999,
- wantSpace: "extern",
- },
- "custom error in debug mode": {
- err: customErr{},
- debug: true,
- wantLog: "custom",
- wantCode: 999,
- wantSpace: "extern",
- },
}
for testName, tc := range cases {
- s.T().Run(testName, func(t *testing.T) {
+ t.Run(testName, func(t *testing.T) {
space, code, log := ABCIInfo(tc.err, tc.debug)
- s.Require().Equal(tc.wantSpace, space, testName)
- s.Require().Equal(tc.wantCode, code, testName)
- s.Require().Equal(tc.wantLog, log, testName)
- })
- }
-}
-
-func (s *abciTestSuite) TestABCIInfoStacktrace() {
- cases := map[string]struct {
- err error
- debug bool
- wantStacktrace bool
- wantErrMsg string
- }{
- "wrapped SDK error in debug mode provides stacktrace": {
- err: Wrap(ErrUnauthorized, "wrapped"),
- debug: true,
- wantStacktrace: true,
- wantErrMsg: "wrapped: unauthorized",
- },
- "wrapped SDK error in non-debug mode does not have stacktrace": {
- err: Wrap(ErrUnauthorized, "wrapped"),
- debug: false,
- wantStacktrace: false,
- wantErrMsg: "wrapped: unauthorized",
- },
- "wrapped stdlib error in debug mode provides stacktrace": {
- err: Wrap(fmt.Errorf("stdlib"), "wrapped"),
- debug: true,
- wantStacktrace: true,
- wantErrMsg: "wrapped: stdlib",
- },
- }
-
- const thisTestSrc = "cosmossdk.io/errors.(*abciTestSuite).TestABCIInfoStacktrace"
-
- for testName, tc := range cases {
- s.T().Run(testName, func(t *testing.T) {
- _, _, log := ABCIInfo(tc.err, tc.debug)
- if !tc.wantStacktrace {
- s.Require().Equal(tc.wantErrMsg, log, testName)
- } else {
- s.Require().True(strings.Contains(log, thisTestSrc), testName)
- s.Require().True(strings.Contains(log, tc.wantErrMsg), testName)
+ if space != tc.wantSpace {
+ t.Errorf("%s: expected space %s, got %s", testName, tc.wantSpace, space)
+ }
+ if code != tc.wantCode {
+ t.Errorf("%s: expected code %d, got %d", testName, tc.wantCode, code)
+ }
+ if log != tc.wantLog {
+ t.Errorf("%s: expected log %s, got %s", testName, tc.wantLog, log)
}
})
}
}
-func (s *abciTestSuite) TestABCIInfoHidesStacktrace() {
- err := Wrap(ErrUnauthorized, "wrapped")
- _, _, log := ABCIInfo(err, false)
- s.Require().Equal("wrapped: unauthorized", log)
-}
-
-func (s *abciTestSuite) TestABCIInfoSerializeErr() {
+func TestABCIInfoSerializeErr(t *testing.T) {
var (
- // Create errors with stacktrace for equal comparison.
- myErrDecode = Wrap(ErrTxDecode, "test")
- myErrAddr = Wrap(ErrInvalidAddress, "tester")
+ // Create errors for equal comparison.
+ myErrDecode = fmt.Errorf("test: %w", ErrTxDecode)
+ myErrAddr = fmt.Errorf("tester: %w", ErrInvalidAddress)
myPanic = ErrPanic
)
@@ -183,16 +104,8 @@ func (s *abciTestSuite) TestABCIInfoSerializeErr() {
for msg, spec := range specs {
spec := spec
_, _, log := ABCIInfo(spec.src, spec.debug)
- s.Require().Equal(spec.exp, log, msg)
+ if log != spec.exp {
+ t.Errorf("%s: expected log %s, got %s", msg, spec.exp, log)
+ }
}
}
-
-// customErr is a custom implementation of an error that provides an ABCICode
-// method.
-type customErr struct{}
-
-func (customErr) Codespace() string { return "extern" }
-
-func (customErr) ABCICode() uint32 { return 999 }
-
-func (customErr) Error() string { return "custom" }
diff --git a/errors/errors.go b/errors/errors.go
index 99c6cf01540a..1255e88003de 100644
--- a/errors/errors.go
+++ b/errors/errors.go
@@ -2,9 +2,6 @@ package errors
import (
"fmt"
- "reflect"
-
- "github.com/pkg/errors"
)
// UndefinedCodespace when we explicitly declare no codespace
@@ -63,11 +60,11 @@ func setUsed(err *Error) {
// The server (abci app / blockchain) should only refer to registered errors
func ABCIError(codespace string, code uint32, log string) error {
if e := getUsed(codespace, code); e != nil {
- return Wrap(e, log)
+ return fmt.Errorf("%s: %w", log, e)
}
// This is a unique error, will never match on .Is()
// Use Wrap here to get a stack trace
- return Wrap(&Error{codespace: codespace, code: code, desc: "unknown"}, log)
+ return fmt.Errorf("%s: %w", log, &Error{codespace: codespace, code: code, desc: "unknown"})
}
// Error represents a root error.
@@ -102,58 +99,6 @@ func (e Error) Codespace() string {
return e.codespace
}
-// Is check if given error instance is of a given kind/type. This involves
-// unwrapping given error using the Cause method if available.
-func (e *Error) Is(err error) bool {
- // Reflect usage is necessary to correctly compare with
- // a nil implementation of an error.
- if e == nil {
- return isNilErr(err)
- }
-
- for {
- if err == e {
- return true
- }
-
- // If this is a collection of errors, this function must return
- // true if at least one from the group match.
- if u, ok := err.(unpacker); ok {
- for _, er := range u.Unpack() {
- if e.Is(er) {
- return true
- }
- }
- }
-
- if c, ok := err.(causer); ok {
- err = c.Cause()
- } else {
- return false
- }
- }
-}
-
-// Wrap extends this error with an additional information.
-// It's a handy function to call Wrap with sdk errors.
-func (e *Error) Wrap(desc string) error { return Wrap(e, desc) }
-
-// Wrapf extends this error with an additional information.
-// It's a handy function to call Wrapf with sdk errors.
-func (e *Error) Wrapf(desc string, args ...interface{}) error { return Wrapf(e, desc, args...) }
-
-func isNilErr(err error) bool {
- // Reflect usage is necessary to correctly compare with
- // a nil implementation of an error.
- if err == nil {
- return true
- }
- if reflect.ValueOf(err).Kind() == reflect.Struct {
- return false
- }
- return reflect.ValueOf(err).IsNil()
-}
-
// Wrap extends given error with an additional information.
//
// If the wrapped error does not provide ABCICode method (ie. stdlib errors),
@@ -166,17 +111,7 @@ func Wrap(err error, description string) error {
return nil
}
- // If this error does not carry the stacktrace information yet, attach
- // one. This should be done only once per error at the lowest frame
- // possible (most inner wrap).
- if stackTrace(err) == nil {
- err = errors.WithStack(err)
- }
-
- return &wrappedError{
- parent: err,
- msg: description,
- }
+ return fmt.Errorf("%s: %w", description, err)
}
// Wrapf extends given error with an additional information.
@@ -187,83 +122,3 @@ func Wrapf(err error, format string, args ...interface{}) error {
desc := fmt.Sprintf(format, args...)
return Wrap(err, desc)
}
-
-type wrappedError struct {
- // This error layer description.
- msg string
- // The underlying error that triggered this one.
- parent error
-}
-
-func (e *wrappedError) Error() string {
- return fmt.Sprintf("%s: %s", e.msg, e.parent.Error())
-}
-
-func (e *wrappedError) Cause() error {
- return e.parent
-}
-
-// Is reports whether any error in e's chain matches a target.
-func (e *wrappedError) Is(target error) bool {
- if e == target {
- return true
- }
-
- w := e.Cause()
- for {
- if w == target {
- return true
- }
-
- x, ok := w.(causer)
- if ok {
- w = x.Cause()
- }
- if x == nil {
- return false
- }
- }
-}
-
-// Unwrap implements the built-in errors.Unwrap
-func (e *wrappedError) Unwrap() error {
- return e.parent
-}
-
-// Recover captures a panic and stop its propagation. If panic happens it is
-// transformed into a ErrPanic instance and assigned to given error. Call this
-// function using defer in order to work as expected.
-func Recover(err *error) {
- if r := recover(); r != nil {
- *err = Wrapf(ErrPanic, "%v", r)
- }
-}
-
-// WithType is a helper to augment an error with a corresponding type message
-func WithType(err error, obj interface{}) error {
- return Wrap(err, fmt.Sprintf("%T", obj))
-}
-
-// IsOf checks if a received error is caused by one of the target errors.
-// It extends the errors.Is functionality to a list of errors.
-func IsOf(received error, targets ...error) bool {
- if received == nil {
- return false
- }
- for _, t := range targets {
- if errors.Is(received, t) {
- return true
- }
- }
- return false
-}
-
-// causer is an interface implemented by an error that supports wrapping. Use
-// it to test if an error wraps another error instance.
-type causer interface {
- Cause() error
-}
-
-type unpacker interface {
- Unpack() []error
-}
diff --git a/errors/errors_test.go b/errors/errors_test.go
index f3e99e2bab9b..ce146ea412f0 100644
--- a/errors/errors_test.go
+++ b/errors/errors_test.go
@@ -1,212 +1,18 @@
package errors
import (
- stdlib "errors"
- "fmt"
"testing"
-
- "github.com/pkg/errors"
- "github.com/stretchr/testify/suite"
)
-type errorsTestSuite struct {
- suite.Suite
-}
-
-func TestErrorsTestSuite(t *testing.T) {
- suite.Run(t, new(errorsTestSuite))
-}
-
-func (s *errorsTestSuite) SetupSuite() {
- s.T().Parallel()
-}
-
-func (s *errorsTestSuite) TestCause() {
- std := stdlib.New("this is a stdlib error")
-
- cases := map[string]struct {
- err error
- root error
- }{
- "Errors are self-causing": {
- err: ErrUnauthorized,
- root: ErrUnauthorized,
- },
- "Wrap reveals root cause": {
- err: Wrap(ErrUnauthorized, "foo"),
- root: ErrUnauthorized,
- },
- "Cause works for stderr as root": {
- err: Wrap(std, "Some helpful text"),
- root: std,
- },
- }
-
- for testName, tc := range cases {
- s.Require().Equal(tc.root, errors.Cause(tc.err), testName)
- }
-}
-
-func (s *errorsTestSuite) TestErrorIs() {
- cases := map[string]struct {
- a *Error
- b error
- wantIs bool
- }{
- "instance of the same error": {
- a: ErrUnauthorized,
- b: ErrUnauthorized,
- wantIs: true,
- },
- "two different coded errors": {
- a: ErrUnauthorized,
- b: ErrOutOfGas,
- wantIs: false,
- },
- "successful comparison to a wrapped error": {
- a: ErrUnauthorized,
- b: Wrap(ErrUnauthorized, "gone"),
- wantIs: true,
- },
- "unsuccessful comparison to a wrapped error": {
- a: ErrUnauthorized,
- b: Wrap(ErrInsufficientFee, "too big"),
- wantIs: false,
- },
- "not equal to stdlib error": {
- a: ErrUnauthorized,
- b: fmt.Errorf("stdlib error"),
- wantIs: false,
- },
- "not equal to a wrapped stdlib error": {
- a: ErrUnauthorized,
- b: Wrap(fmt.Errorf("stdlib error"), "wrapped"),
- wantIs: false,
- },
- "nil is nil": {
- a: nil,
- b: nil,
- wantIs: true,
- },
- "nil is any error nil": {
- a: nil,
- b: (*customError)(nil),
- wantIs: true,
- },
- "nil is not not-nil": {
- a: nil,
- b: ErrUnauthorized,
- wantIs: false,
- },
- "not-nil is not nil": {
- a: ErrUnauthorized,
- b: nil,
- wantIs: false,
- },
+func TestABCIError(t *testing.T) {
+ if err := ABCIError(testCodespace, 2, "custom"); err.Error() != "custom: tx parse error" {
+ t.Errorf("expected error message: custom: tx parse error, got: %v", err.Error())
}
- for testName, tc := range cases {
- s.Require().Equal(tc.wantIs, tc.a.Is(tc.b), testName)
+ if err := ABCIError("unknown", 1, "custom"); err.Error() != "custom: unknown" {
+ t.Errorf("expected error message: custom: unknown, got: %v", err.Error())
}
}
-func (s *errorsTestSuite) TestIsOf() {
- require := s.Require()
-
- var errNil *Error
- err := ErrInvalidAddress
- errW := Wrap(ErrLogic, "more info")
-
- require.False(IsOf(nil), "nil should always have no causer")
- require.False(IsOf(nil, err), "nil should always have no causer")
- require.False(IsOf(errNil), "nil error should always have no causer")
- require.False(IsOf(errNil, err), "nil error should always have no causer")
-
- require.False(IsOf(err))
- require.False(IsOf(err, nil))
- require.False(IsOf(err, ErrLogic))
-
- require.True(IsOf(errW, ErrLogic))
- require.True(IsOf(errW, err, ErrLogic))
- require.True(IsOf(errW, nil, errW), "error should much itself")
- err2 := errors.New("other error")
- require.True(IsOf(err2, nil, err2), "error should much itself")
-}
-
-type customError struct{}
-
-func (customError) Error() string {
- return "custom error"
-}
-
-func (s *errorsTestSuite) TestWrapEmpty() {
- s.Require().Nil(Wrap(nil, "wrapping "))
-}
-
-func (s *errorsTestSuite) TestWrappedIs() {
- require := s.Require()
- err := Wrap(ErrTxTooLarge, "context")
- require.True(stdlib.Is(err, ErrTxTooLarge))
-
- err = Wrap(err, "more context")
- require.True(stdlib.Is(err, ErrTxTooLarge))
-
- err = Wrap(err, "even more context")
- require.True(stdlib.Is(err, ErrTxTooLarge))
-
- err = Wrap(ErrInsufficientFee, "...")
- require.False(stdlib.Is(err, ErrTxTooLarge))
-
- errs := stdlib.New("other")
- require.True(stdlib.Is(errs, errs))
-
- errw := &wrappedError{"msg", errs}
- require.True(errw.Is(errw), "should match itself")
-
- require.True(stdlib.Is(ErrInsufficientFee.Wrap("wrapped"), ErrInsufficientFee))
- require.True(IsOf(ErrInsufficientFee.Wrap("wrapped"), ErrInsufficientFee))
- require.True(stdlib.Is(ErrInsufficientFee.Wrapf("wrapped"), ErrInsufficientFee))
- require.True(IsOf(ErrInsufficientFee.Wrapf("wrapped"), ErrInsufficientFee))
-}
-
-func (s *errorsTestSuite) TestWrappedIsMultiple() {
- errTest := errors.New("test error")
- errTest2 := errors.New("test error 2")
- err := Wrap(errTest2, Wrap(errTest, "some random description").Error())
- s.Require().True(stdlib.Is(err, errTest2))
-}
-
-func (s *errorsTestSuite) TestWrappedIsFail() {
- errTest := errors.New("test error")
- errTest2 := errors.New("test error 2")
- err := Wrap(errTest2, Wrap(errTest, "some random description").Error())
- s.Require().False(stdlib.Is(err, errTest))
-}
-
-func (s *errorsTestSuite) TestWrappedUnwrap() {
- errTest := errors.New("test error")
- err := Wrap(errTest, "some random description")
- s.Require().Equal(errTest, stdlib.Unwrap(err))
-}
-
-func (s *errorsTestSuite) TestWrappedUnwrapMultiple() {
- errTest := errors.New("test error")
- errTest2 := errors.New("test error 2")
- err := Wrap(errTest2, Wrap(errTest, "some random description").Error())
- s.Require().Equal(errTest2, stdlib.Unwrap(err))
-}
-
-func (s *errorsTestSuite) TestWrappedUnwrapFail() {
- errTest := errors.New("test error")
- errTest2 := errors.New("test error 2")
- err := Wrap(errTest2, Wrap(errTest, "some random description").Error())
- s.Require().NotEqual(errTest, stdlib.Unwrap(err))
-}
-
-func (s *errorsTestSuite) TestABCIError() {
- s.Require().Equal("custom: tx parse error", ABCIError(testCodespace, 2, "custom").Error())
- s.Require().Equal("custom: unknown", ABCIError("unknown", 1, "custom").Error())
-}
-
const testCodespace = "testtesttest"
var (
diff --git a/errors/go.mod b/errors/go.mod
index 91cf5a175e20..20ae1c3f4a92 100644
--- a/errors/go.mod
+++ b/errors/go.mod
@@ -1,17 +1,3 @@
-module cosmossdk.io/errors
+module cosmossdk.io/errors/v2
go 1.20
-
-require (
- github.com/pkg/errors v0.9.1
- github.com/stretchr/testify v1.9.0
-)
-
-require (
- github.com/davecgh/go-spew v1.1.1 // indirect
- github.com/kr/pretty v0.3.0 // indirect
- github.com/pmezard/go-difflib v1.0.0 // indirect
- github.com/rogpeppe/go-internal v1.8.1 // indirect
- gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
- gopkg.in/yaml.v3 v3.0.1 // indirect
-)
diff --git a/errors/go.sum b/errors/go.sum
index 4c118e9927a8..e69de29bb2d1 100644
--- a/errors/go.sum
+++ b/errors/go.sum
@@ -1,28 +0,0 @@
-github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
-github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
-github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
-github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
-github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
-github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
-github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg=
-github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
-github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
-github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
-gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
-gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
-gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/errors/handle.go b/errors/handle.go
deleted file mode 100644
index 33c3fbfdeac2..000000000000
--- a/errors/handle.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package errors
-
-import "fmt"
-
-// AssertNil panics on error
-// Should be only used with interface methods, which require return error, but the
-// error is always nil
-func AssertNil(err error) {
- if err != nil {
- panic(fmt.Errorf("logic error - this should never happen. %w", err))
- }
-}
diff --git a/errors/stacktrace.go b/errors/stacktrace.go
deleted file mode 100644
index d7021085db34..000000000000
--- a/errors/stacktrace.go
+++ /dev/null
@@ -1,120 +0,0 @@
-package errors
-
-import (
- "fmt"
- "io"
- "runtime"
- "strings"
-
- "github.com/pkg/errors"
-)
-
-func matchesFunc(f errors.Frame, prefixes ...string) bool {
- fn := funcName(f)
- for _, prefix := range prefixes {
- if strings.HasPrefix(fn, prefix) {
- return true
- }
- }
- return false
-}
-
-// funcName returns the name of this function, if known.
-func funcName(f errors.Frame) string {
- // this looks a bit like magic, but follows example here:
- // https://github.com/pkg/errors/blob/v0.8.1/stack.go#L43-L50
- pc := uintptr(f) - 1
- fn := runtime.FuncForPC(pc)
- if fn == nil {
- return "unknown"
- }
- return fn.Name()
-}
-
-func fileLine(f errors.Frame) (string, int) {
- // this looks a bit like magic, but follows example here:
- // https://github.com/pkg/errors/blob/v0.8.1/stack.go#L14-L27
- // as this is where we get the Frames
- pc := uintptr(f) - 1
- fn := runtime.FuncForPC(pc)
- if fn == nil {
- return "unknown", 0
- }
- return fn.FileLine(pc)
-}
-
-func trimInternal(st errors.StackTrace) errors.StackTrace {
- // trim our internal parts here
- // manual error creation, or runtime for caught panics
- for matchesFunc(st[0],
- // where we create errors
- "cosmossdk.io/errors.Wrap",
- "cosmossdk.io/errors.Wrapf",
- "cosmossdk.io/errors.WithType",
- // runtime are added on panics
- "runtime.",
- // _test is defined in coverage tests, causing failure
- // "/_test/"
- ) {
- st = st[1:]
- }
- // trim out outer wrappers (runtime.goexit and test library if present)
- for l := len(st) - 1; l > 0 && matchesFunc(st[l], "runtime.", "testing."); l-- {
- st = st[:l]
- }
- return st
-}
-
-func writeSimpleFrame(s io.Writer, f errors.Frame) {
- file, line := fileLine(f)
- // cut file at "github.com/"
- // TODO: generalize better for other hosts?
- chunks := strings.SplitN(file, "github.com/", 2)
- if len(chunks) == 2 {
- file = chunks[1]
- }
- _, _ = fmt.Fprintf(s, " [%s:%d]", file, line)
-}
-
-// Format works like pkg/errors, with additions.
-// %s is just the error message
-// %+v is the full stack trace
-// %v appends a compressed [filename:line] where the error was created
-//
-// Inspired by https://github.com/pkg/errors/blob/v0.8.1/errors.go#L162-L176
-func (e *wrappedError) Format(s fmt.State, verb rune) {
- // normal output here....
- if verb != 'v' {
- _, _ = fmt.Fprint(s, e.Error())
- return
- }
- // work with the stack trace... whole or part
- stack := trimInternal(stackTrace(e))
- if s.Flag('+') {
- _, _ = fmt.Fprintf(s, "%+v\n", stack)
- _, _ = fmt.Fprint(s, e.Error())
- } else {
- _, _ = fmt.Fprint(s, e.Error())
- writeSimpleFrame(s, stack[0])
- }
-}
-
-// stackTrace returns the first found stack trace frame carried by given error
-// or any wrapped error. It returns nil if no stack trace is found.
-func stackTrace(err error) errors.StackTrace {
- type stackTracer interface {
- StackTrace() errors.StackTrace
- }
-
- for {
- if st, ok := err.(stackTracer); ok {
- return st.StackTrace()
- }
-
- if c, ok := err.(causer); ok {
- err = c.Cause()
- } else {
- return nil
- }
- }
-}
diff --git a/errors/stacktrace_test.go b/errors/stacktrace_test.go
deleted file mode 100644
index c0a8d6141c25..000000000000
--- a/errors/stacktrace_test.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package errors
-
-import (
- "errors"
- "fmt"
- "reflect"
- "strings"
-)
-
-func (s *errorsTestSuite) TestStackTrace() {
- cases := map[string]struct {
- err error
- wantError string
- }{
- "New gives us a stacktrace": {
- err: Wrap(ErrNoSignatures, "name"),
- wantError: "name: no signatures supplied",
- },
- "Wrapping stderr gives us a stacktrace": {
- err: Wrap(fmt.Errorf("foo"), "standard"),
- wantError: "standard: foo",
- },
- "Wrapping pkg/errors gives us clean stacktrace": {
- err: Wrap(errors.New("bar"), "pkg"),
- wantError: "pkg: bar",
- },
- "Wrapping inside another function is still clean": {
- err: Wrap(fmt.Errorf("indirect"), "do the do"),
- wantError: "do the do: indirect",
- },
- }
-
- // Wrapping code is unwanted in the errors stack trace.
- unwantedSrc := []string{
- "cosmossdk.io/errors.Wrap\n",
- "cosmossdk.io/errors.Wrapf\n",
- "runtime.goexit\n",
- }
- const thisTestSrc = "errors/stacktrace_test.go"
-
- for _, tc := range cases {
- s.Require().True(reflect.DeepEqual(tc.err.Error(), tc.wantError))
- s.Require().NotNil(stackTrace(tc.err))
- fullStack := fmt.Sprintf("%+v", tc.err)
- s.Require().True(strings.Contains(fullStack, thisTestSrc))
- s.Require().True(strings.Contains(fullStack, tc.wantError))
-
- for _, src := range unwantedSrc {
- if strings.Contains(fullStack, src) {
- s.T().Logf("Stack trace below\n----%s\n----", fullStack)
- s.T().Logf("full stack contains unwanted source file path: %q", src)
- }
- }
-
- tinyStack := fmt.Sprintf("%v", tc.err)
- s.Require().True(strings.HasPrefix(tinyStack, tc.wantError))
- s.Require().False(strings.Contains(tinyStack, "\n"))
- // contains a link to where it was created, which must
- // be here, not the Wrap() function
- s.Require().True(strings.Contains(tinyStack, thisTestSrc))
- }
-}
diff --git a/go.mod b/go.mod
index 3ffd9f680f26..ae05108c4c4a 100644
--- a/go.mod
+++ b/go.mod
@@ -25,6 +25,7 @@ require (
github.com/cosmos/btcutil v1.0.5
github.com/cosmos/cosmos-db v1.0.2
github.com/cosmos/cosmos-proto v1.0.0-beta.5
+ github.com/cosmos/crypto v0.0.0-20240309083813-82ed2537802e
github.com/cosmos/go-bip39 v1.0.0
github.com/cosmos/gogogateway v1.2.0
github.com/cosmos/gogoproto v1.5.0
@@ -85,7 +86,6 @@ require (
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cometbft/cometbft-db v0.12.0 // indirect
- github.com/cosmos/crypto v0.0.0-20240309083813-82ed2537802e // indirect
github.com/cosmos/iavl v1.1.4 // indirect
github.com/cosmos/ics23/go v0.10.0 // indirect
github.com/danieljoos/wincred v1.2.1 // indirect
diff --git a/orm/encoding/ormfield/duration.go b/orm/encoding/ormfield/duration.go
index 572b6e21e612..7d7f25b5c7e6 100644
--- a/orm/encoding/ormfield/duration.go
+++ b/orm/encoding/ormfield/duration.go
@@ -16,12 +16,12 @@ const (
// DurationCodec encodes google.protobuf.Duration values with the following
// encoding:
-// - nil is encoded as []byte{0xFF}
-// - seconds (which can range from -315,576,000,000 to +315,576,000,000) is encoded as 5 fixed bytes
-// - nanos (which can range from 0 to 999,999,999 or -999,999,999 to 0 if seconds is negative) are encoded such
-// that 999,999,999 is always added to nanos. This ensures that the encoded nanos are always >= 0. Additionally,
-// by adding 999,999,999 to both positive and negative nanos, we guarantee that the lexicographical order is
-// preserved when comparing the encoded values of two Durations:
+// - nil is encoded as []byte{0xFF}
+// - seconds (which can range from -315,576,000,000 to +315,576,000,000) is encoded as 5 fixed bytes
+// - nanos (which can range from 0 to 999,999,999 or -999,999,999 to 0 if seconds is negative) are encoded such
+// that 999,999,999 is always added to nanos. This ensures that the encoded nanos are always >= 0. Additionally,
+// by adding 999,999,999 to both positive and negative nanos, we guarantee that the lexicographical order is
+// preserved when comparing the encoded values of two Durations:
// - []byte{0xBB, 0x9A, 0xC9, 0xFF} for zero nanos
// - 4 fixed bytes with the bit mask 0x80 applied to the first byte, with negative nanos scaled so that -999,999,999
// is encoded as 0 and -1 is encoded as 999,999,998
diff --git a/orm/encoding/ormfield/timestamp.go b/orm/encoding/ormfield/timestamp.go
index 4788f390848a..d643a1c1d026 100644
--- a/orm/encoding/ormfield/timestamp.go
+++ b/orm/encoding/ormfield/timestamp.go
@@ -9,12 +9,12 @@ import (
// TimestampCodec encodes google.protobuf.Timestamp values with the following
// encoding:
-// - nil is encoded as []byte{0xFF}
-// - seconds (which can range from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z) is encoded as 5 fixed bytes
-// - nanos (which can range from 0 to 999,999,999 or -999,999,999 to 0 if seconds is negative) are encoded such
-// that 999,999,999 is always added to nanos. This ensures that the encoded nanos are always >= 0. Additionally,
-// by adding 999,999,999 to both positive and negative nanos, we guarantee that the lexicographical order is
-// preserved when comparing the encoded values of two Timestamps.
+// - nil is encoded as []byte{0xFF}
+// - seconds (which can range from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z) is encoded as 5 fixed bytes
+// - nanos (which can range from 0 to 999,999,999 or -999,999,999 to 0 if seconds is negative) are encoded such
+// that 999,999,999 is always added to nanos. This ensures that the encoded nanos are always >= 0. Additionally,
+// by adding 999,999,999 to both positive and negative nanos, we guarantee that the lexicographical order is
+// preserved when comparing the encoded values of two Timestamps.
//
// When iterating over timestamp indexes, nil values will always be ordered last.
//
diff --git a/runtime/app.go b/runtime/app.go
index 283727d4bf5e..80bc28340898 100644
--- a/runtime/app.go
+++ b/runtime/app.go
@@ -5,7 +5,7 @@ import (
"fmt"
"slices"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1"
appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1"
diff --git a/runtime/types.go b/runtime/types.go
index 9ade401eb6b1..50c8884716a7 100644
--- a/runtime/types.go
+++ b/runtime/types.go
@@ -1,7 +1,7 @@
package runtime
import (
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"
diff --git a/server/cmt_abci.go b/server/cmt_abci.go
index 865523233d1b..2e2ca9f0a8ca 100644
--- a/server/cmt_abci.go
+++ b/server/cmt_abci.go
@@ -4,6 +4,7 @@ import (
"context"
abci "github.com/cometbft/cometbft/abci/types"
+ abciproto "github.com/cometbft/cometbft/api/cometbft/abci/v1"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
)
@@ -16,58 +17,58 @@ func NewCometABCIWrapper(app servertypes.ABCI) abci.Application {
return cometABCIWrapper{app: app}
}
-func (w cometABCIWrapper) Info(_ context.Context, req *abci.InfoRequest) (*abci.InfoResponse, error) {
+func (w cometABCIWrapper) Info(_ context.Context, req *abciproto.InfoRequest) (*abciproto.InfoResponse, error) {
return w.app.Info(req)
}
-func (w cometABCIWrapper) Query(ctx context.Context, req *abci.QueryRequest) (*abci.QueryResponse, error) {
+func (w cometABCIWrapper) Query(ctx context.Context, req *abciproto.QueryRequest) (*abciproto.QueryResponse, error) {
return w.app.Query(ctx, req)
}
-func (w cometABCIWrapper) CheckTx(_ context.Context, req *abci.CheckTxRequest) (*abci.CheckTxResponse, error) {
+func (w cometABCIWrapper) CheckTx(_ context.Context, req *abciproto.CheckTxRequest) (*abciproto.CheckTxResponse, error) {
return w.app.CheckTx(req)
}
-func (w cometABCIWrapper) InitChain(_ context.Context, req *abci.InitChainRequest) (*abci.InitChainResponse, error) {
+func (w cometABCIWrapper) InitChain(_ context.Context, req *abciproto.InitChainRequest) (*abciproto.InitChainResponse, error) {
return w.app.InitChain(req)
}
-func (w cometABCIWrapper) PrepareProposal(_ context.Context, req *abci.PrepareProposalRequest) (*abci.PrepareProposalResponse, error) {
+func (w cometABCIWrapper) PrepareProposal(_ context.Context, req *abciproto.PrepareProposalRequest) (*abciproto.PrepareProposalResponse, error) {
return w.app.PrepareProposal(req)
}
-func (w cometABCIWrapper) ProcessProposal(_ context.Context, req *abci.ProcessProposalRequest) (*abci.ProcessProposalResponse, error) {
+func (w cometABCIWrapper) ProcessProposal(_ context.Context, req *abciproto.ProcessProposalRequest) (*abciproto.ProcessProposalResponse, error) {
return w.app.ProcessProposal(req)
}
-func (w cometABCIWrapper) FinalizeBlock(_ context.Context, req *abci.FinalizeBlockRequest) (*abci.FinalizeBlockResponse, error) {
+func (w cometABCIWrapper) FinalizeBlock(_ context.Context, req *abciproto.FinalizeBlockRequest) (*abciproto.FinalizeBlockResponse, error) {
return w.app.FinalizeBlock(req)
}
-func (w cometABCIWrapper) ExtendVote(ctx context.Context, req *abci.ExtendVoteRequest) (*abci.ExtendVoteResponse, error) {
+func (w cometABCIWrapper) ExtendVote(ctx context.Context, req *abciproto.ExtendVoteRequest) (*abciproto.ExtendVoteResponse, error) {
return w.app.ExtendVote(ctx, req)
}
-func (w cometABCIWrapper) VerifyVoteExtension(_ context.Context, req *abci.VerifyVoteExtensionRequest) (*abci.VerifyVoteExtensionResponse, error) {
+func (w cometABCIWrapper) VerifyVoteExtension(_ context.Context, req *abciproto.VerifyVoteExtensionRequest) (*abciproto.VerifyVoteExtensionResponse, error) {
return w.app.VerifyVoteExtension(req)
}
-func (w cometABCIWrapper) Commit(_ context.Context, _ *abci.CommitRequest) (*abci.CommitResponse, error) {
+func (w cometABCIWrapper) Commit(_ context.Context, _ *abciproto.CommitRequest) (*abciproto.CommitResponse, error) {
return w.app.Commit()
}
-func (w cometABCIWrapper) ListSnapshots(_ context.Context, req *abci.ListSnapshotsRequest) (*abci.ListSnapshotsResponse, error) {
+func (w cometABCIWrapper) ListSnapshots(_ context.Context, req *abciproto.ListSnapshotsRequest) (*abciproto.ListSnapshotsResponse, error) {
return w.app.ListSnapshots(req)
}
-func (w cometABCIWrapper) OfferSnapshot(_ context.Context, req *abci.OfferSnapshotRequest) (*abci.OfferSnapshotResponse, error) {
+func (w cometABCIWrapper) OfferSnapshot(_ context.Context, req *abciproto.OfferSnapshotRequest) (*abciproto.OfferSnapshotResponse, error) {
return w.app.OfferSnapshot(req)
}
-func (w cometABCIWrapper) LoadSnapshotChunk(_ context.Context, req *abci.LoadSnapshotChunkRequest) (*abci.LoadSnapshotChunkResponse, error) {
+func (w cometABCIWrapper) LoadSnapshotChunk(_ context.Context, req *abciproto.LoadSnapshotChunkRequest) (*abciproto.LoadSnapshotChunkResponse, error) {
return w.app.LoadSnapshotChunk(req)
}
-func (w cometABCIWrapper) ApplySnapshotChunk(_ context.Context, req *abci.ApplySnapshotChunkRequest) (*abci.ApplySnapshotChunkResponse, error) {
+func (w cometABCIWrapper) ApplySnapshotChunk(_ context.Context, req *abciproto.ApplySnapshotChunkRequest) (*abciproto.ApplySnapshotChunkResponse, error) {
return w.app.ApplySnapshotChunk(req)
}
diff --git a/server/mock/app.go b/server/mock/app.go
index 2b2cb3960e0e..bff962d88d76 100644
--- a/server/mock/app.go
+++ b/server/mock/app.go
@@ -7,7 +7,7 @@ import (
"fmt"
"path/filepath"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
db "github.com/cosmos/cosmos-db"
"google.golang.org/grpc"
"google.golang.org/protobuf/proto"
diff --git a/server/mock/app_test.go b/server/mock/app_test.go
index e24d30a67c2c..c749927c0a8d 100644
--- a/server/mock/app_test.go
+++ b/server/mock/app_test.go
@@ -6,7 +6,7 @@ import (
"testing"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/stretchr/testify/require"
"cosmossdk.io/log"
diff --git a/server/types/abci.go b/server/types/abci.go
index 456375eb2aac..33e73a4938bb 100644
--- a/server/types/abci.go
+++ b/server/types/abci.go
@@ -3,7 +3,7 @@ package types
import (
"context"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
)
// ABCI is an interface that enables any finite, deterministic state machine
diff --git a/server/v2/cometbft/abci.go b/server/v2/cometbft/abci.go
index ad68aaa9f183..a14a793a00ac 100644
--- a/server/v2/cometbft/abci.go
+++ b/server/v2/cometbft/abci.go
@@ -7,6 +7,7 @@ import (
"sync/atomic"
abci "github.com/cometbft/cometbft/abci/types"
+ abciproto "github.com/cometbft/cometbft/api/cometbft/abci/v1"
coreappmgr "cosmossdk.io/core/app"
"cosmossdk.io/core/comet"
@@ -125,7 +126,7 @@ type BlockData struct {
// CheckTx implements types.Application.
// It is called by cometbft to verify transaction validity
-func (c *Consensus[T]) CheckTx(ctx context.Context, req *abci.CheckTxRequest) (*abci.CheckTxResponse, error) {
+func (c *Consensus[T]) CheckTx(ctx context.Context, req *abciproto.CheckTxRequest) (*abciproto.CheckTxResponse, error) {
decodedTx, err := c.txCodec.Decode(req.Tx)
if err != nil {
return nil, err
@@ -154,7 +155,7 @@ func (c *Consensus[T]) CheckTx(ctx context.Context, req *abci.CheckTxRequest) (*
}
// Info implements types.Application.
-func (c *Consensus[T]) Info(ctx context.Context, _ *abci.InfoRequest) (*abci.InfoResponse, error) {
+func (c *Consensus[T]) Info(ctx context.Context, _ *abciproto.InfoRequest) (*abciproto.InfoResponse, error) {
version, _, err := c.store.StateLatest()
if err != nil {
return nil, err
@@ -182,7 +183,7 @@ func (c *Consensus[T]) Info(ctx context.Context, _ *abci.InfoRequest) (*abci.Inf
// Query implements types.Application.
// It is called by cometbft to query application state.
-func (c *Consensus[T]) Query(ctx context.Context, req *abci.QueryRequest) (*abci.QueryResponse, error) {
+func (c *Consensus[T]) Query(ctx context.Context, req *abciproto.QueryRequest) (*abciproto.QueryResponse, error) {
// follow the query path from here
decodedMsg, err := c.txCodec.Decode(req.Data)
protoMsg, ok := any(decodedMsg).(transaction.Msg)
@@ -208,7 +209,7 @@ func (c *Consensus[T]) Query(ctx context.Context, req *abci.QueryRequest) (*abci
return QueryResult(errorsmod.Wrap(cometerrors.ErrUnknownRequest, "no query path provided"), c.cfg.Trace), nil
}
- var resp *abci.QueryResponse
+ var resp *abciproto.QueryResponse
switch path[0] {
case QueryPathApp:
@@ -232,7 +233,7 @@ func (c *Consensus[T]) Query(ctx context.Context, req *abci.QueryRequest) (*abci
}
// InitChain implements types.Application.
-func (c *Consensus[T]) InitChain(ctx context.Context, req *abci.InitChainRequest) (*abci.InitChainResponse, error) {
+func (c *Consensus[T]) InitChain(ctx context.Context, req *abciproto.InitChainRequest) (*abciproto.InitChainResponse, error) {
c.logger.Info("InitChain", "initialHeight", req.InitialHeight, "chainID", req.ChainId)
// store chainID to be used later on in execution
@@ -304,8 +305,8 @@ func (c *Consensus[T]) InitChain(ctx context.Context, req *abci.InitChainRequest
// It is called by cometbft to prepare a proposal block.
func (c *Consensus[T]) PrepareProposal(
ctx context.Context,
- req *abci.PrepareProposalRequest,
-) (resp *abci.PrepareProposalResponse, err error) {
+ req *abciproto.PrepareProposalRequest,
+) (resp *abciproto.PrepareProposalResponse, err error) {
if req.Height < 1 {
return nil, errors.New("PrepareProposal called with invalid height")
}
@@ -347,8 +348,8 @@ func (c *Consensus[T]) PrepareProposal(
// It is called by cometbft to process/verify a proposal block.
func (c *Consensus[T]) ProcessProposal(
ctx context.Context,
- req *abci.ProcessProposalRequest,
-) (*abci.ProcessProposalResponse, error) {
+ req *abciproto.ProcessProposalRequest,
+) (*abciproto.ProcessProposalResponse, error) {
decodedTxs := make([]T, len(req.Txs))
for _, tx := range req.Txs {
decTx, err := c.txCodec.Decode(tx)
@@ -384,8 +385,8 @@ func (c *Consensus[T]) ProcessProposal(
// It is called by cometbft to finalize a block.
func (c *Consensus[T]) FinalizeBlock(
ctx context.Context,
- req *abci.FinalizeBlockRequest,
-) (*abci.FinalizeBlockResponse, error) {
+ req *abciproto.FinalizeBlockRequest,
+) (*abciproto.FinalizeBlockResponse, error) {
if err := c.validateFinalizeBlockHeight(req); err != nil {
return nil, err
}
@@ -494,7 +495,7 @@ func (c *Consensus[T]) FinalizeBlock(
// Commit implements types.Application.
// It is called by cometbft to notify the application that a block was committed.
-func (c *Consensus[T]) Commit(ctx context.Context, _ *abci.CommitRequest) (*abci.CommitResponse, error) {
+func (c *Consensus[T]) Commit(ctx context.Context, _ *abciproto.CommitRequest) (*abciproto.CommitResponse, error) {
lastCommittedBlock := c.lastCommittedBlock.Load()
c.snapshotManager.SnapshotIfApplicable(lastCommittedBlock.Height)
@@ -513,8 +514,8 @@ func (c *Consensus[T]) Commit(ctx context.Context, _ *abci.CommitRequest) (*abci
// VerifyVoteExtension implements types.Application.
func (c *Consensus[T]) VerifyVoteExtension(
ctx context.Context,
- req *abci.VerifyVoteExtensionRequest,
-) (*abci.VerifyVoteExtensionResponse, error) {
+ req *abciproto.VerifyVoteExtensionRequest,
+) (*abciproto.VerifyVoteExtensionResponse, error) {
// If vote extensions are not enabled, as a safety precaution, we return an
// error.
cp, err := c.GetConsensusParams(ctx)
@@ -548,7 +549,7 @@ func (c *Consensus[T]) VerifyVoteExtension(
}
// ExtendVote implements types.Application.
-func (c *Consensus[T]) ExtendVote(ctx context.Context, req *abci.ExtendVoteRequest) (*abci.ExtendVoteResponse, error) {
+func (c *Consensus[T]) ExtendVote(ctx context.Context, req *abciproto.ExtendVoteRequest) (*abciproto.ExtendVoteResponse, error) {
// If vote extensions are not enabled, as a safety precaution, we return an
// error.
cp, err := c.GetConsensusParams(ctx)
diff --git a/server/v2/cometbft/client/grpc/cmtservice/service.go b/server/v2/cometbft/client/grpc/cmtservice/service.go
index 02555d719574..096889a5a2ae 100644
--- a/server/v2/cometbft/client/grpc/cmtservice/service.go
+++ b/server/v2/cometbft/client/grpc/cmtservice/service.go
@@ -5,7 +5,7 @@ import (
"fmt"
"strings"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
coretypes "github.com/cometbft/cometbft/rpc/core/types"
gogogrpc "github.com/cosmos/gogoproto/grpc"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
diff --git a/server/v2/cometbft/client/grpc/cmtservice/types.go b/server/v2/cometbft/client/grpc/cmtservice/types.go
index a94c0fd8ba8d..6a88fbbe9847 100644
--- a/server/v2/cometbft/client/grpc/cmtservice/types.go
+++ b/server/v2/cometbft/client/grpc/cmtservice/types.go
@@ -1,7 +1,7 @@
package cmtservice
import (
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
)
// ToABCIRequestQuery converts a gRPC ABCIQueryRequest type to an ABCI
diff --git a/server/v2/cometbft/handlers/defaults.go b/server/v2/cometbft/handlers/defaults.go
index 8e9795660d19..f7e32f64fa45 100644
--- a/server/v2/cometbft/handlers/defaults.go
+++ b/server/v2/cometbft/handlers/defaults.go
@@ -5,7 +5,7 @@ import (
"errors"
"fmt"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/cosmos/gogoproto/proto"
consensusv1 "cosmossdk.io/api/cosmos/consensus/v1"
diff --git a/server/v2/cometbft/handlers/handlers.go b/server/v2/cometbft/handlers/handlers.go
index 7780a7cfc602..0354a4a497af 100644
--- a/server/v2/cometbft/handlers/handlers.go
+++ b/server/v2/cometbft/handlers/handlers.go
@@ -3,7 +3,7 @@ package handlers
import (
"context"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/cosmos/gogoproto/proto"
"cosmossdk.io/core/store"
diff --git a/server/v2/cometbft/query.go b/server/v2/cometbft/query.go
index 1f9c1539bdec..d45c97cd078b 100644
--- a/server/v2/cometbft/query.go
+++ b/server/v2/cometbft/query.go
@@ -4,7 +4,7 @@ import (
"context"
"strings"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
crypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1"
errorsmod "cosmossdk.io/errors"
diff --git a/server/v2/cometbft/snapshots.go b/server/v2/cometbft/snapshots.go
index dc68bab39752..5534712864df 100644
--- a/server/v2/cometbft/snapshots.go
+++ b/server/v2/cometbft/snapshots.go
@@ -7,7 +7,7 @@ import (
"os"
"path/filepath"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/cosmos/gogoproto/proto"
"cosmossdk.io/store/v2/snapshots"
diff --git a/server/v2/cometbft/types/peer.go b/server/v2/cometbft/types/peer.go
index 1ebc9b03c78d..6d15bd715092 100644
--- a/server/v2/cometbft/types/peer.go
+++ b/server/v2/cometbft/types/peer.go
@@ -1,6 +1,6 @@
package types
-import abci "github.com/cometbft/cometbft/abci/types"
+import abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
// PeerFilter responds to p2p filtering queries from Tendermint
type PeerFilter func(info string) (*abci.QueryResponse, error)
diff --git a/server/v2/cometbft/types/vote.go b/server/v2/cometbft/types/vote.go
index aeb3b9b8f150..322e09517f63 100644
--- a/server/v2/cometbft/types/vote.go
+++ b/server/v2/cometbft/types/vote.go
@@ -3,7 +3,7 @@ package types
import (
"context"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
)
// VoteExtensionsHandler defines how to implement vote extension handlers
diff --git a/server/v2/cometbft/utils.go b/server/v2/cometbft/utils.go
index 8c21cbd454aa..5313c445c70e 100644
--- a/server/v2/cometbft/utils.go
+++ b/server/v2/cometbft/utils.go
@@ -8,7 +8,7 @@ import (
"time"
abciv1 "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/abci/v1"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
gogoproto "github.com/cosmos/gogoproto/proto"
gogoany "github.com/cosmos/gogoproto/types/any"
diff --git a/server/v2/stf/branch/writer_map.go b/server/v2/stf/branch/writer_map.go
index b624a4d2532c..8e7edf0e4104 100644
--- a/server/v2/stf/branch/writer_map.go
+++ b/server/v2/stf/branch/writer_map.go
@@ -53,21 +53,47 @@ func (b WriterMap) ApplyStateChanges(stateChanges []store.StateChanges) error {
return nil
}
+// GetStateChanges returns the state changes for all actors in the WriterMap, including all direct
+// ancesotors from which this WriterMap was derived.
+// See WriterMap.recurseStateChanges for more details.
+// Subject to possible renaming to ensure a developer can retrieve only changes in *this* branch
+// context (not ancestors) if that is desired.
+// see: https://github.com/cosmos/cosmos-sdk/pull/20412#discussion_r1618771230
func (b WriterMap) GetStateChanges() ([]store.StateChanges, error) {
- sc := make([]store.StateChanges, len(b.branchedWriterState))
- for account, stateChange := range b.branchedWriterState {
- kvChanges, err := stateChange.ChangeSets()
- if err != nil {
- return nil, err
- }
+ var (
+ changes = make(map[string][]store.KVPair)
+ sc []store.StateChanges
+ )
+ if err := b.recurseStateChanges(changes); err != nil {
+ return nil, err
+ }
+
+ for account, kvPairs := range changes {
sc = append(sc, store.StateChanges{
Actor: []byte(account),
- StateChanges: kvChanges,
+ StateChanges: kvPairs,
})
}
return sc, nil
}
+func (b WriterMap) recurseStateChanges(changes map[string][]store.KVPair) error {
+ // depth first
+ if wr, ok := b.state.(WriterMap); ok {
+ if err := wr.recurseStateChanges(changes); err != nil {
+ return err
+ }
+ }
+ for account, stateChange := range b.branchedWriterState {
+ kvChanges, err := stateChange.ChangeSets()
+ if err != nil {
+ return err
+ }
+ changes[account] = append(changes[account], kvChanges...)
+ }
+ return nil
+}
+
func (b WriterMap) applyStateChange(sc store.StateChanges) error {
writableState, err := b.GetWriter(sc.Actor)
if err != nil {
diff --git a/server/v2/stf/core_router_service.go b/server/v2/stf/core_router_service.go
index f64e90cc285d..15da47e87cdc 100644
--- a/server/v2/stf/core_router_service.go
+++ b/server/v2/stf/core_router_service.go
@@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
+ "reflect"
"strings"
"google.golang.org/protobuf/runtime/protoiface"
@@ -61,14 +62,8 @@ func (m *msgRouterService) InvokeUntyped(ctx context.Context, msg protoiface.Mes
// NewQueryRouterService implements router.Service.
func NewQueryRouterService(queryRouterBuilder *MsgRouterBuilder) router.Service {
- queryRouter, err := queryRouterBuilder.Build()
- if err != nil {
- panic(fmt.Errorf("cannot create queryRouter: %w", err))
- }
-
return &queryRouterService{
builder: queryRouterBuilder,
- handler: queryRouter,
}
}
@@ -100,8 +95,21 @@ func (m *queryRouterService) InvokeTyped(
ctx context.Context,
req, resp protoiface.MessageV1,
) error {
- // see https://github.com/cosmos/cosmos-sdk/pull/20349
- panic("not implemented")
+ // TODO lazy initialization is ugly and not thread safe. we don't want to check a mutex on every InvokeTyped either.
+ if m.handler == nil {
+ var err error
+ m.handler, err = m.builder.Build()
+ if err != nil {
+ return fmt.Errorf("cannot create queryRouter: %w", err)
+ }
+ }
+ // reflection is required, see https://github.com/cosmos/cosmos-sdk/pull/20349
+ res, err := m.handler(ctx, req)
+ if err != nil {
+ return err
+ }
+ reflect.Indirect(reflect.ValueOf(resp)).Set(reflect.Indirect(reflect.ValueOf(res)))
+ return nil
}
// InvokeUntyped execute a message and returns a response.
diff --git a/server/v2/stf/stf.go b/server/v2/stf/stf.go
index 4848a8c765ab..fd6d434c91c6 100644
--- a/server/v2/stf/stf.go
+++ b/server/v2/stf/stf.go
@@ -7,6 +7,7 @@ import (
appmanager "cosmossdk.io/core/app"
appmodulev2 "cosmossdk.io/core/appmodule/v2"
+ corecontext "cosmossdk.io/core/context"
"cosmossdk.io/core/event"
"cosmossdk.io/core/gas"
"cosmossdk.io/core/header"
@@ -17,6 +18,9 @@ import (
"cosmossdk.io/server/v2/stf/internal"
)
+// Identity defines STF's bytes identity and it's used by STF to store things in its own state.
+var Identity = []byte("stf")
+
// STF is a struct that manages the state transition component of the app.
type STF[T transaction.Tx] struct {
logger log.Logger
@@ -108,10 +112,15 @@ func (s STF[T]) DeliverBlock(
// reset events
exCtx.events = make([]event.Event, 0)
+
// begin block
- beginBlockEvents, err := s.beginBlock(exCtx)
- if err != nil {
- return nil, nil, err
+ var beginBlockEvents []event.Event
+ if !block.IsGenesis {
+ // begin block
+ beginBlockEvents, err = s.beginBlock(exCtx)
+ if err != nil {
+ return nil, nil, err
+ }
}
// check if we need to return early
@@ -401,11 +410,13 @@ func (s STF[T]) validatorUpdates(
return ctx.events, valSetUpdates, nil
}
-const headerInfoPrefix = 0x0
+const headerInfoPrefix = 0x37
// setHeaderInfo sets the header info in the state to be used by queries in the future.
func (s STF[T]) setHeaderInfo(state store.WriterMap, headerInfo header.Info) error {
- runtimeStore, err := state.GetWriter(appmanager.RuntimeIdentity)
+ // TODO storing header info is too low level here, stf should be stateless.
+ // We should have a keeper that does this.
+ runtimeStore, err := state.GetWriter(Identity)
if err != nil {
return err
}
@@ -422,7 +433,7 @@ func (s STF[T]) setHeaderInfo(state store.WriterMap, headerInfo header.Info) err
// getHeaderInfo gets the header info from the state. It should only be used for queries
func (s STF[T]) getHeaderInfo(state store.WriterMap) (i header.Info, err error) {
- runtimeStore, err := state.GetWriter(appmanager.RuntimeIdentity)
+ runtimeStore, err := state.GetWriter(Identity)
if err != nil {
return header.Info{}, err
}
@@ -579,11 +590,12 @@ func (s STF[T]) makeContext(
store store.WriterMap,
execMode transaction.ExecMode,
) *executionContext {
+ valuedCtx := context.WithValue(ctx, corecontext.ExecModeKey, execMode)
return newExecutionContext(
s.makeGasMeter,
s.makeGasMeteredState,
s.branchFn,
- ctx,
+ valuedCtx,
sender,
store,
execMode,
diff --git a/simapp/abci.go b/simapp/abci.go
index a6c982b239c7..e4deee455718 100644
--- a/simapp/abci.go
+++ b/simapp/abci.go
@@ -6,7 +6,7 @@ import (
"encoding/json"
"fmt"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
diff --git a/simapp/app.go b/simapp/app.go
index 2f3046cefce5..348359921049 100644
--- a/simapp/app.go
+++ b/simapp/app.go
@@ -10,7 +10,7 @@ import (
"os"
"path/filepath"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
dbm "github.com/cosmos/cosmos-db"
"github.com/cosmos/gogoproto/proto"
"github.com/spf13/cast"
@@ -171,7 +171,7 @@ type SimApp struct {
ConsensusParamsKeeper consensusparamkeeper.Keeper
CircuitKeeper circuitkeeper.Keeper
PoolKeeper poolkeeper.Keeper
- EpochsKeeper epochskeeper.Keeper
+ EpochsKeeper *epochskeeper.Keeper
// managers
ModuleManager *module.Manager
diff --git a/simapp/app_di.go b/simapp/app_di.go
index 7a459a18507e..d2b27c7eefdc 100644
--- a/simapp/app_di.go
+++ b/simapp/app_di.go
@@ -93,7 +93,7 @@ type SimApp struct {
ConsensusParamsKeeper consensuskeeper.Keeper
CircuitBreakerKeeper circuitkeeper.Keeper
PoolKeeper poolkeeper.Keeper
- EpochsKeeper epochskeeper.Keeper
+ EpochsKeeper *epochskeeper.Keeper
// simulation manager
sm *module.SimulationManager
@@ -111,7 +111,8 @@ func init() {
// AppConfig returns the default app config.
func AppConfig() depinject.Config {
return depinject.Configs(
- appConfig, // Alternatively use appconfig.LoadYAML(AppConfigYAML)
+ appConfig, // Alternatively use appconfig.LoadYAML(AppConfigYAML)
+ depinject.Provide(ProvideExampleMintFn), // optional: override the mint module's mint function with epoched minting
)
}
@@ -174,8 +175,7 @@ func NewSimApp(
//
// For providing a custom inflation function for x/mint add here your
- // custom function that implements the minttypes.InflationCalculationFn
- // interface.
+ // custom function that implements the minttypes.MintFn interface.
),
)
)
diff --git a/simapp/app_test.go b/simapp/app_test.go
index 62312557efaf..9a798add2dd6 100644
--- a/simapp/app_test.go
+++ b/simapp/app_test.go
@@ -5,7 +5,7 @@ import (
"fmt"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
dbm "github.com/cosmos/cosmos-db"
"github.com/cosmos/gogoproto/proto"
diff --git a/simapp/go.mod b/simapp/go.mod
index 46e39f69b058..0e49796e23c6 100644
--- a/simapp/go.mod
+++ b/simapp/go.mod
@@ -19,7 +19,7 @@ require (
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91
cosmossdk.io/x/circuit v0.0.0-20230613133644-0a778132a60f
cosmossdk.io/x/distribution v0.0.0-20240227221813-a248d05f70f4
- cosmossdk.io/x/epochs v0.0.0-00010101000000-000000000000
+ cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337
cosmossdk.io/x/evidence v0.0.0-20230613133644-0a778132a60f
cosmossdk.io/x/feegrant v0.0.0-20230613133644-0a778132a60f
cosmossdk.io/x/gov v0.0.0-20231113122742-912390d5fc4a
diff --git a/simapp/mint_fn.go b/simapp/mint_fn.go
new file mode 100644
index 000000000000..e34aca38f496
--- /dev/null
+++ b/simapp/mint_fn.go
@@ -0,0 +1,125 @@
+package simapp
+
+import (
+ "context"
+ "encoding/binary"
+
+ "cosmossdk.io/core/appmodule"
+ "cosmossdk.io/core/event"
+ "cosmossdk.io/math"
+ authtypes "cosmossdk.io/x/auth/types"
+ banktypes "cosmossdk.io/x/bank/types"
+ minttypes "cosmossdk.io/x/mint/types"
+ stakingtypes "cosmossdk.io/x/staking/types"
+
+ sdk "github.com/cosmos/cosmos-sdk/types"
+)
+
+type MintBankKeeper interface {
+ MintCoins(ctx context.Context, moduleName string, coins sdk.Coins) error
+ SendCoinsFromModuleToModule(ctx context.Context, senderModule string, recipientModule string, amt sdk.Coins) error
+}
+
+// ProvideExampleMintFn returns the function used in x/mint's endblocker to mint new tokens.
+// Note that this function can not have the mint keeper as a parameter because it would create a cyclic dependency.
+func ProvideExampleMintFn(bankKeeper MintBankKeeper) minttypes.MintFn {
+ return func(ctx context.Context, env appmodule.Environment, minter *minttypes.Minter, epochID string, epochNumber int64) error {
+ // in this example we ignore epochNumber as we don't care what epoch we are in, we just assume we are being called every minute.
+ if epochID != "minute" {
+ return nil
+ }
+
+ var stakingParams stakingtypes.QueryParamsResponse
+ err := env.QueryRouterService.InvokeTyped(ctx, &stakingtypes.QueryParamsRequest{}, &stakingParams)
+ if err != nil {
+ return err
+ }
+
+ var bankSupply banktypes.QuerySupplyOfResponse
+ err = env.QueryRouterService.InvokeTyped(ctx, &banktypes.QuerySupplyOfRequest{Denom: stakingParams.Params.BondDenom}, &bankSupply)
+ if err != nil {
+ return err
+ }
+ stakingTokenSupply := bankSupply.Amount
+
+ var mintParams minttypes.QueryParamsResponse
+ err = env.QueryRouterService.InvokeTyped(ctx, &minttypes.QueryParamsRequest{}, &mintParams)
+ if err != nil {
+ return err
+ }
+
+ var stakingPool stakingtypes.QueryPoolResponse
+ err = env.QueryRouterService.InvokeTyped(ctx, &stakingtypes.QueryPoolRequest{}, &stakingPool)
+ if err != nil {
+ return err
+ }
+
+ // bondedRatio
+ bondedRatio := math.LegacyNewDecFromInt(stakingPool.Pool.BondedTokens).QuoInt(stakingTokenSupply.Amount)
+ minter.Inflation = minter.NextInflationRate(mintParams.Params, bondedRatio)
+ minter.AnnualProvisions = minter.NextAnnualProvisions(mintParams.Params, stakingTokenSupply.Amount)
+
+ // to get a more accurate amount of tokens minted, we get, and later store, last minting time.
+
+ // if this is the first time minting, we initialize the minter.Data with the current time - 60s
+ // to mint tokens at the beginning. Note: this is a custom behavior to avoid breaking tests.
+ if minter.Data == nil {
+ minter.Data = make([]byte, 8)
+ binary.BigEndian.PutUint64(minter.Data, (uint64)(env.HeaderService.HeaderInfo(ctx).Time.Unix()-60))
+ }
+
+ lastMint := binary.BigEndian.Uint64(minter.Data)
+ binary.BigEndian.PutUint64(minter.Data, (uint64)(env.HeaderService.HeaderInfo(ctx).Time.Unix()))
+
+ // calculate the amount of tokens to mint, based on the time since the last mint
+ secsSinceLastMint := env.HeaderService.HeaderInfo(ctx).Time.Unix() - (int64)(lastMint)
+ provisionAmt := minter.AnnualProvisions.QuoInt64(31536000).MulInt64(secsSinceLastMint) // 31536000 = seconds in a year
+ mintedCoin := sdk.NewCoin(mintParams.Params.MintDenom, provisionAmt.TruncateInt())
+ maxSupply := mintParams.Params.MaxSupply
+ totalSupply := stakingTokenSupply.Amount
+
+ if !maxSupply.IsZero() {
+ // supply is not infinite, check the amount to mint
+ remainingSupply := maxSupply.Sub(totalSupply)
+
+ if remainingSupply.LTE(math.ZeroInt()) {
+ // max supply reached, no new tokens will be minted
+ // also handles the case where totalSupply > maxSupply
+ return nil
+ }
+
+ // if the amount to mint is greater than the remaining supply, mint the remaining supply
+ if mintedCoin.Amount.GT(remainingSupply) {
+ mintedCoin.Amount = remainingSupply
+ }
+ }
+
+ if mintedCoin.Amount.IsZero() {
+ // skip as no coins need to be minted
+ return nil
+ }
+
+ mintedCoins := sdk.NewCoins(mintedCoin)
+ if err := bankKeeper.MintCoins(ctx, minttypes.ModuleName, mintedCoins); err != nil {
+ return err
+ }
+
+ // Example of custom send while minting
+ // Send some tokens to a "team account"
+ // if err = bankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, ... ); err != nil {
+ // return err
+ // }
+
+ if err = bankKeeper.SendCoinsFromModuleToModule(ctx, minttypes.ModuleName, authtypes.FeeCollectorName, mintedCoins); err != nil {
+ return err
+ }
+
+ return env.EventService.EventManager(ctx).EmitKV(
+ minttypes.EventTypeMint,
+ event.NewAttribute(minttypes.AttributeKeyBondedRatio, bondedRatio.String()),
+ event.NewAttribute(minttypes.AttributeKeyInflation, minter.Inflation.String()),
+ event.NewAttribute(minttypes.AttributeKeyAnnualProvisions, minter.AnnualProvisions.String()),
+ event.NewAttribute(sdk.AttributeKeyAmount, mintedCoin.Amount.String()),
+ )
+ }
+}
diff --git a/simapp/sim_test.go b/simapp/sim_test.go
index c3edd4228e5a..1e98fafd47be 100644
--- a/simapp/sim_test.go
+++ b/simapp/sim_test.go
@@ -19,7 +19,7 @@ import (
"cosmossdk.io/x/feegrant"
slashingtypes "cosmossdk.io/x/slashing/types"
stakingtypes "cosmossdk.io/x/staking/types"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
dbm "github.com/cosmos/cosmos-db"
"github.com/cosmos/cosmos-sdk/baseapp"
diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go
index 56fffd41479c..5609fb1a2f20 100644
--- a/simapp/simd/cmd/testnet.go
+++ b/simapp/simd/cmd/testnet.go
@@ -292,7 +292,7 @@ func initTestnetFiles(
}
}
- nodeIDs[i], valPubKeys[i], err = genutil.InitializeNodeValidatorFiles(nodeConfig)
+ nodeIDs[i], valPubKeys[i], err = genutil.InitializeNodeValidatorFiles(nodeConfig, args.algo)
if err != nil {
_ = os.RemoveAll(args.outputDir)
return err
diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go
index 4e8b75339a95..363698a137ea 100644
--- a/simapp/test_helpers.go
+++ b/simapp/test_helpers.go
@@ -6,7 +6,7 @@ import (
"os"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtjson "github.com/cometbft/cometbft/libs/json"
cmttypes "github.com/cometbft/cometbft/types"
dbm "github.com/cosmos/cosmos-db"
diff --git a/simapp/upgrades.go b/simapp/upgrades.go
index 01fe745d6e88..9433b94e37b4 100644
--- a/simapp/upgrades.go
+++ b/simapp/upgrades.go
@@ -6,6 +6,7 @@ import (
"cosmossdk.io/core/appmodule"
storetypes "cosmossdk.io/store/types"
"cosmossdk.io/x/accounts"
+ authkeeper "cosmossdk.io/x/auth/keeper"
epochstypes "cosmossdk.io/x/epochs/types"
protocolpooltypes "cosmossdk.io/x/protocolpool/types"
upgradetypes "cosmossdk.io/x/upgrade/types"
@@ -25,6 +26,12 @@ func (app SimApp) RegisterUpgradeHandlers() {
app.UpgradeKeeper.SetUpgradeHandler(
UpgradeName,
func(ctx context.Context, _ upgradetypes.Plan, fromVM appmodule.VersionMap) (appmodule.VersionMap, error) {
+ // sync accounts and auth module account number
+ err := authkeeper.MigrateAccountNumberUnsafe(ctx, &app.AuthKeeper)
+ if err != nil {
+ return nil, err
+ }
+
return app.ModuleManager.RunMigrations(ctx, app.Configurator(), fromVM)
},
)
diff --git a/simapp/upgrades_test.go b/simapp/upgrades_test.go
new file mode 100644
index 000000000000..b70ee15c7863
--- /dev/null
+++ b/simapp/upgrades_test.go
@@ -0,0 +1,54 @@
+package simapp
+
+import (
+ "testing"
+
+ cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
+ "github.com/stretchr/testify/require"
+
+ "cosmossdk.io/collections"
+ authkeeper "cosmossdk.io/x/auth/keeper"
+ authtypes "cosmossdk.io/x/auth/types"
+)
+
+// TestSyncAccountNumber tests if accounts module account number is set correctly with the value get from auth.
+// Also check if the store entry for auth GlobalAccountNumberKey is successfully deleted.
+func TestSyncAccountNumber(t *testing.T) {
+ app := Setup(t, true)
+ ctx := app.NewUncachedContext(true, cmtproto.Header{})
+
+ bytesKey := authtypes.GlobalAccountNumberKey
+ store := app.AuthKeeper.KVStoreService.OpenKVStore(ctx)
+
+ // initially there is no value set yet
+ v, err := store.Get(bytesKey)
+ require.NoError(t, err)
+ require.Nil(t, v)
+
+ // set value for legacy account number
+ v, err = collections.Uint64Value.Encode(10)
+ require.NoError(t, err)
+ err = store.Set(bytesKey, v)
+ require.NoError(t, err)
+
+ // make sure value are updated
+ v, err = store.Get(bytesKey)
+ require.NoError(t, err)
+ require.NotEmpty(t, v)
+ num, err := collections.Uint64Value.Decode(v)
+ require.NoError(t, err)
+ require.Equal(t, uint64(10), num)
+
+ err = authkeeper.MigrateAccountNumberUnsafe(ctx, &app.AuthKeeper)
+ require.NoError(t, err)
+
+ // make sure the DB entry for this key is deleted
+ v, err = store.Get(bytesKey)
+ require.NoError(t, err)
+ require.Nil(t, v)
+
+ // check if accounts's account number is updated
+ currentNum, err := app.AccountsKeeper.AccountNumber.Peek(ctx)
+ require.NoError(t, err)
+ require.Equal(t, uint64(10), currentNum)
+}
diff --git a/store/internal/maps/maps.go b/store/internal/maps/maps.go
index 181fc47bd978..40aa0b44d9f8 100644
--- a/store/internal/maps/maps.go
+++ b/store/internal/maps/maps.go
@@ -1,11 +1,11 @@
package maps
import (
+ "crypto/sha256"
"encoding/binary"
cmtprotocrypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1"
"github.com/cometbft/cometbft/crypto/merkle"
- "github.com/cometbft/cometbft/crypto/tmhash"
"cosmossdk.io/store/internal/kv"
"cosmossdk.io/store/internal/tree"
@@ -36,11 +36,11 @@ func (sm *merkleMap) set(key string, value []byte) {
// The value is hashed, so you can check for equality with a cached value (say)
// and make a determination to fetch or not.
- vhash := tmhash.Sum(value)
+ vhash := sha256.Sum256(value)
sm.kvs.Pairs = append(sm.kvs.Pairs, kv.Pair{
Key: byteKey,
- Value: vhash,
+ Value: vhash[:],
})
}
@@ -97,11 +97,11 @@ func (sm *simpleMap) Set(key string, value []byte) {
// The value is hashed, so you can
// check for equality with a cached value (say)
// and make a determination to fetch or not.
- vhash := tmhash.Sum(value)
+ vhash := sha256.Sum256(value)
sm.Kvs.Pairs = append(sm.Kvs.Pairs, kv.Pair{
Key: byteKey,
- Value: vhash,
+ Value: vhash[:],
})
}
diff --git a/store/snapshots/types/convert.go b/store/snapshots/types/convert.go
index 90deead3bfa8..f326878757dd 100644
--- a/store/snapshots/types/convert.go
+++ b/store/snapshots/types/convert.go
@@ -1,7 +1,7 @@
package types
import (
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
proto "github.com/cosmos/gogoproto/proto"
"cosmossdk.io/errors"
diff --git a/store/streaming/abci/examples/file/file.go b/store/streaming/abci/examples/file/file.go
index a6473bca7e71..061653a555da 100644
--- a/store/streaming/abci/examples/file/file.go
+++ b/store/streaming/abci/examples/file/file.go
@@ -6,7 +6,7 @@ import (
"os"
"path/filepath"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/hashicorp/go-plugin"
streamingabci "cosmossdk.io/store/streaming/abci"
diff --git a/store/streaming/abci/examples/stdout/stdout.go b/store/streaming/abci/examples/stdout/stdout.go
index d24e33a421a0..99bef6414730 100644
--- a/store/streaming/abci/examples/stdout/stdout.go
+++ b/store/streaming/abci/examples/stdout/stdout.go
@@ -4,7 +4,7 @@ import (
"context"
"fmt"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/hashicorp/go-plugin"
streamingabci "cosmossdk.io/store/streaming/abci"
diff --git a/store/streaming/abci/grpc.go b/store/streaming/abci/grpc.go
index 05e3ecb3e573..b838a153be17 100644
--- a/store/streaming/abci/grpc.go
+++ b/store/streaming/abci/grpc.go
@@ -4,7 +4,7 @@ import (
"context"
"os"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/hashicorp/go-plugin"
storetypes "cosmossdk.io/store/types"
diff --git a/store/streaming/streaming_test.go b/store/streaming/streaming_test.go
index 459784a1271c..5471a2b4dcde 100644
--- a/store/streaming/streaming_test.go
+++ b/store/streaming/streaming_test.go
@@ -8,7 +8,7 @@ import (
"testing"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
"github.com/cosmos/gogoproto/proto"
"github.com/stretchr/testify/assert"
diff --git a/store/types/streaming.go b/store/types/streaming.go
index 50554b418f0f..7385518a52c2 100644
--- a/store/types/streaming.go
+++ b/store/types/streaming.go
@@ -3,7 +3,7 @@ package types
import (
"context"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
)
// ABCIListener is the interface that we're exposing as a streaming service.
diff --git a/store/v2/commitment/store.go b/store/v2/commitment/store.go
index b67a1149c311..4a93dc823d54 100644
--- a/store/v2/commitment/store.go
+++ b/store/v2/commitment/store.go
@@ -134,6 +134,7 @@ func (c *CommitStore) LoadVersion(targetVersion uint64) error {
}
if targetVersion < latestVersion {
batch := c.db.NewBatch()
+ defer batch.Close()
for version := latestVersion; version > targetVersion; version-- {
cInfoKey := []byte(fmt.Sprintf(commitInfoKeyFmt, version))
if err := batch.Delete(cInfoKey); err != nil {
@@ -186,6 +187,7 @@ func (c *CommitStore) flushCommitInfo(version uint64, cInfo *proof.CommitInfo) e
}
batch := c.db.NewBatch()
+ defer batch.Close()
cInfoKey := []byte(fmt.Sprintf(commitInfoKeyFmt, version))
value, err := cInfo.Marshal()
if err != nil {
@@ -306,6 +308,7 @@ func (c *CommitStore) Get(storeKey []byte, version uint64, key []byte) ([]byte,
func (c *CommitStore) Prune(version uint64) (ferr error) {
// prune the metadata
batch := c.db.NewBatch()
+ defer batch.Close()
for v := version; v > 0; v-- {
cInfoKey := []byte(fmt.Sprintf(commitInfoKeyFmt, v))
if exist, _ := c.db.Has(cInfoKey); !exist {
diff --git a/store/v2/migration/manager.go b/store/v2/migration/manager.go
index 3dc3ef80e5da..bd636dc3c600 100644
--- a/store/v2/migration/manager.go
+++ b/store/v2/migration/manager.go
@@ -197,7 +197,6 @@ func (m *Manager) writeChangeset() error {
if err != nil {
return err
}
- batch.Close()
}
return nil
diff --git a/tests/e2e/auth/suite.go b/tests/e2e/auth/suite.go
index 8e288f355115..ffc896810ee0 100644
--- a/tests/e2e/auth/suite.go
+++ b/tests/e2e/auth/suite.go
@@ -7,7 +7,7 @@ import (
"strings"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
diff --git a/tests/e2e/bank/grpc.go b/tests/e2e/bank/grpc.go
index 435778eae841..29f57bc4ae84 100644
--- a/tests/e2e/bank/grpc.go
+++ b/tests/e2e/bank/grpc.go
@@ -35,7 +35,7 @@ func (s *E2ETestSuite) TestTotalSupplyGRPCHandler() {
&types.QueryTotalSupplyResponse{
Supply: sdk.NewCoins(
sdk.NewCoin(fmt.Sprintf("%stoken", val.GetMoniker()), s.cfg.AccountTokens),
- sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(math.NewInt(10))),
+ sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(math.NewInt(47))),
),
Pagination: &query.PageResponse{
Total: 2,
@@ -50,7 +50,7 @@ func (s *E2ETestSuite) TestTotalSupplyGRPCHandler() {
},
&types.QuerySupplyOfResponse{},
&types.QuerySupplyOfResponse{
- Amount: sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(math.NewInt(10))),
+ Amount: sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(math.NewInt(47))),
},
},
{
@@ -61,7 +61,7 @@ func (s *E2ETestSuite) TestTotalSupplyGRPCHandler() {
},
&types.QuerySupplyOfResponse{},
&types.QuerySupplyOfResponse{
- Amount: sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(math.NewInt(20))),
+ Amount: sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(math.NewInt(47))),
},
},
{
@@ -72,7 +72,7 @@ func (s *E2ETestSuite) TestTotalSupplyGRPCHandler() {
},
&types.QuerySupplyOfResponse{},
&types.QuerySupplyOfResponse{
- Amount: sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(math.NewInt(10))),
+ Amount: sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(math.NewInt(47))),
},
},
{
diff --git a/tests/e2e/baseapp/block_gas_test.go b/tests/e2e/baseapp/block_gas_test.go
index 52d5a4476681..431e9463c066 100644
--- a/tests/e2e/baseapp/block_gas_test.go
+++ b/tests/e2e/baseapp/block_gas_test.go
@@ -8,7 +8,7 @@ import (
"math"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtjson "github.com/cometbft/cometbft/libs/json"
dbm "github.com/cosmos/cosmos-db"
"github.com/stretchr/testify/require"
diff --git a/tests/e2e/distribution/grpc_query_suite.go b/tests/e2e/distribution/grpc_query_suite.go
index 7392c5fa1c9e..4a5a2c3475b8 100644
--- a/tests/e2e/distribution/grpc_query_suite.go
+++ b/tests/e2e/distribution/grpc_query_suite.go
@@ -116,7 +116,7 @@ func (s *GRPCQueryTestSuite) TestQueryOutstandingRewardsGRPC() {
val := s.network.GetValidators()[0]
baseURL := val.GetAPIAddress()
- rewards, err := sdk.ParseDecCoins("19.6stake")
+ rewards, err := sdk.ParseDecCoins("46.06stake")
s.Require().NoError(err)
testCases := []struct {
@@ -170,7 +170,7 @@ func (s *GRPCQueryTestSuite) TestQueryValidatorCommissionGRPC() {
val := s.network.GetValidators()[0]
baseURL := val.GetAPIAddress()
- commission, err := sdk.ParseDecCoins("9.8stake")
+ commission, err := sdk.ParseDecCoins("23.03stake")
s.Require().NoError(err)
testCases := []struct {
@@ -283,7 +283,7 @@ func (s *GRPCQueryTestSuite) TestQueryDelegatorRewardsGRPC() {
val := s.network.GetValidators()[0]
baseURL := val.GetAPIAddress()
- rewards, err := sdk.ParseDecCoins("9.8stake")
+ rewards, err := sdk.ParseDecCoins("23.03stake")
s.Require().NoError(err)
testCases := []struct {
diff --git a/tests/e2e/genutil/export_test.go b/tests/e2e/genutil/export_test.go
index febda09efcff..7f9ad1b4daec 100644
--- a/tests/e2e/genutil/export_test.go
+++ b/tests/e2e/genutil/export_test.go
@@ -13,7 +13,7 @@ import (
"path"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtcfg "github.com/cometbft/cometbft/config"
dbm "github.com/cosmos/cosmos-db"
"github.com/spf13/cobra"
diff --git a/tests/go.mod b/tests/go.mod
index c32b5d0d4492..606bab894402 100644
--- a/tests/go.mod
+++ b/tests/go.mod
@@ -65,7 +65,7 @@ require (
cosmossdk.io/client/v2 v2.0.0-20230630094428-02b760776860 // indirect
cosmossdk.io/core/testing v0.0.0-00010101000000-000000000000 // indirect
cosmossdk.io/x/circuit v0.0.0-20230613133644-0a778132a60f // indirect
- cosmossdk.io/x/epochs v0.0.0-00010101000000-000000000000 // indirect
+ cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.2 // indirect
diff --git a/tests/integration/auth/client/cli/suite_test.go b/tests/integration/auth/client/cli/suite_test.go
index 8c87e6b27ce0..2e59e9473323 100644
--- a/tests/integration/auth/client/cli/suite_test.go
+++ b/tests/integration/auth/client/cli/suite_test.go
@@ -7,7 +7,7 @@ import (
"strings"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
"github.com/stretchr/testify/suite"
diff --git a/tests/integration/bank/app_test.go b/tests/integration/bank/app_test.go
index d7fa3dda7043..bb2c65d271c6 100644
--- a/tests/integration/bank/app_test.go
+++ b/tests/integration/bank/app_test.go
@@ -3,7 +3,7 @@ package bank_test
import (
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
diff --git a/tests/integration/bank/bench_test.go b/tests/integration/bank/bench_test.go
index c99c4f16735b..a52f7437351f 100644
--- a/tests/integration/bank/bench_test.go
+++ b/tests/integration/bank/bench_test.go
@@ -6,7 +6,7 @@ import (
"testing"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/stretchr/testify/require"
authtypes "cosmossdk.io/x/auth/types"
diff --git a/tests/integration/distribution/cli_tx_test.go b/tests/integration/distribution/cli_tx_test.go
index 222f7d8234fe..06f3012128db 100644
--- a/tests/integration/distribution/cli_tx_test.go
+++ b/tests/integration/distribution/cli_tx_test.go
@@ -5,7 +5,7 @@ import (
"io"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
"github.com/stretchr/testify/suite"
diff --git a/tests/integration/evidence/keeper/infraction_test.go b/tests/integration/evidence/keeper/infraction_test.go
index 0be69083614b..2719b710f09a 100644
--- a/tests/integration/evidence/keeper/infraction_test.go
+++ b/tests/integration/evidence/keeper/infraction_test.go
@@ -8,7 +8,7 @@ import (
"testing"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/golang/mock/gomock"
"gotest.tools/v3/assert"
diff --git a/tests/integration/gov/genesis_test.go b/tests/integration/gov/genesis_test.go
index 9a7180bfc633..e54b3eb012a1 100644
--- a/tests/integration/gov/genesis_test.go
+++ b/tests/integration/gov/genesis_test.go
@@ -4,7 +4,7 @@ import (
"encoding/json"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
dbm "github.com/cosmos/cosmos-db"
"github.com/stretchr/testify/require"
"gotest.tools/v3/assert"
diff --git a/tests/integration/staking/keeper/vote_extensions_test.go b/tests/integration/staking/keeper/vote_extensions_test.go
index ba1167dcac92..fc81126d7b44 100644
--- a/tests/integration/staking/keeper/vote_extensions_test.go
+++ b/tests/integration/staking/keeper/vote_extensions_test.go
@@ -5,7 +5,7 @@ import (
"sort"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
protoio "github.com/cosmos/gogoproto/io"
"github.com/cosmos/gogoproto/proto"
diff --git a/tests/integration/staking/simulation/operations_test.go b/tests/integration/staking/simulation/operations_test.go
index dfc19c38ac94..023b050034e4 100644
--- a/tests/integration/staking/simulation/operations_test.go
+++ b/tests/integration/staking/simulation/operations_test.go
@@ -6,7 +6,7 @@ import (
"testing"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmttypes "github.com/cometbft/cometbft/types"
"github.com/cosmos/gogoproto/proto"
"github.com/stretchr/testify/require"
diff --git a/tests/integration/store/rootmulti/rollback_test.go b/tests/integration/store/rootmulti/rollback_test.go
index 40c378e89f28..0d6f9d074fa2 100644
--- a/tests/integration/store/rootmulti/rollback_test.go
+++ b/tests/integration/store/rootmulti/rollback_test.go
@@ -4,7 +4,7 @@ import (
"fmt"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
dbm "github.com/cosmos/cosmos-db"
"gotest.tools/v3/assert"
diff --git a/tests/sims/slashing/operations_test.go b/tests/sims/slashing/operations_test.go
index f3263f1ab6e1..b0df7052dab2 100644
--- a/tests/sims/slashing/operations_test.go
+++ b/tests/sims/slashing/operations_test.go
@@ -6,7 +6,7 @@ import (
"testing"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmttypes "github.com/cometbft/cometbft/types"
"github.com/cosmos/gogoproto/proto"
"github.com/stretchr/testify/suite"
diff --git a/tests/systemtests/system.go b/tests/systemtests/system.go
index deb19a396fe1..285af4e03f9c 100644
--- a/tests/systemtests/system.go
+++ b/tests/systemtests/system.go
@@ -48,7 +48,7 @@ type SystemUnderTest struct {
outputDir string
testnetInitializer TestnetInitializer
- // blockTime is the the expected/desired block time. This is not going to be very precise
+ // blockTime is the expected/desired block time. This is not going to be very precise
// since Tendermint consensus does not allow specifying it directly.
blockTime time.Duration
rpcAddr string
diff --git a/testutil/cli/cmt_mocks.go b/testutil/cli/cmt_mocks.go
index 3bb35e2040fb..71e0cb973955 100644
--- a/testutil/cli/cmt_mocks.go
+++ b/testutil/cli/cmt_mocks.go
@@ -3,7 +3,7 @@ package cli
import (
"context"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtbytes "github.com/cometbft/cometbft/libs/bytes"
rpcclient "github.com/cometbft/cometbft/rpc/client"
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
diff --git a/testutil/integration/router.go b/testutil/integration/router.go
index 48159bcc9d97..0e4724779425 100644
--- a/testutil/integration/router.go
+++ b/testutil/integration/router.go
@@ -4,7 +4,7 @@ import (
"context"
"fmt"
- cmtabcitypes "github.com/cometbft/cometbft/abci/types"
+ cmtabcitypes "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
cmttypes "github.com/cometbft/cometbft/types"
dbm "github.com/cosmos/cosmos-db"
diff --git a/testutil/network/network.go b/testutil/network/network.go
index 3717f7e65b9d..da9159bd09ae 100644
--- a/testutil/network/network.go
+++ b/testutil/network/network.go
@@ -49,6 +49,7 @@ import (
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
+ "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
"github.com/cosmos/cosmos-sdk/runtime"
srvconfig "github.com/cosmos/cosmos-sdk/server/config"
@@ -446,7 +447,7 @@ func New(l Logger, baseDir string, cfg Config) (NetworkI, error) {
mnemonic = cfg.Mnemonics[i]
}
- nodeID, pubKey, err := genutil.InitializeNodeValidatorFilesFromMnemonic(cmtCfg, mnemonic)
+ nodeID, pubKey, err := genutil.InitializeNodeValidatorFilesFromMnemonic(cmtCfg, mnemonic, ed25519.PrivKeyName)
if err != nil {
return nil, err
}
diff --git a/testutil/sims/app_helpers.go b/testutil/sims/app_helpers.go
index c6fd06b66268..720713ca56ac 100644
--- a/testutil/sims/app_helpers.go
+++ b/testutil/sims/app_helpers.go
@@ -5,7 +5,7 @@ import (
"fmt"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
cmtjson "github.com/cometbft/cometbft/libs/json"
cmttypes "github.com/cometbft/cometbft/types"
diff --git a/testutil/sims/tx_helpers.go b/testutil/sims/tx_helpers.go
index 8c3d00b15b1b..c681594b3f01 100644
--- a/testutil/sims/tx_helpers.go
+++ b/testutil/sims/tx_helpers.go
@@ -6,7 +6,7 @@ import (
"testing"
"time"
- types2 "github.com/cometbft/cometbft/abci/types"
+ types2 "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/stretchr/testify/require"
"cosmossdk.io/core/header"
diff --git a/types/abci.go b/types/abci.go
index a650535d098f..30e6beee391e 100644
--- a/types/abci.go
+++ b/types/abci.go
@@ -1,7 +1,7 @@
package types
import (
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
)
// InitChainer initializes application state at genesis
diff --git a/types/context.go b/types/context.go
index 1ccdb739994f..94f6be6ef82f 100644
--- a/types/context.go
+++ b/types/context.go
@@ -4,7 +4,7 @@ import (
"context"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
"cosmossdk.io/core/comet"
diff --git a/types/context_test.go b/types/context_test.go
index a00e302e41e2..f705bc33c87e 100644
--- a/types/context_test.go
+++ b/types/context_test.go
@@ -5,7 +5,7 @@ import (
"testing"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"
diff --git a/types/errors/abci.go b/types/errors/abci.go
index 8344f465cc02..3a1dac58e51d 100644
--- a/types/errors/abci.go
+++ b/types/errors/abci.go
@@ -1,7 +1,7 @@
package errors
import (
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
errorsmod "cosmossdk.io/errors"
)
diff --git a/types/events.go b/types/events.go
index f883fe778347..748b35ce63d4 100644
--- a/types/events.go
+++ b/types/events.go
@@ -7,7 +7,7 @@ import (
"slices"
"strings"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/cosmos/gogoproto/jsonpb"
"github.com/cosmos/gogoproto/proto"
"golang.org/x/exp/maps"
diff --git a/types/events_test.go b/types/events_test.go
index 74e16466dc43..2b55952a9d6d 100644
--- a/types/events_test.go
+++ b/types/events_test.go
@@ -5,7 +5,7 @@ import (
"reflect"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/stretchr/testify/suite"
"cosmossdk.io/math"
diff --git a/types/module/module.go b/types/module/module.go
index 4248143dc7df..1d6df7df4e30 100644
--- a/types/module/module.go
+++ b/types/module/module.go
@@ -26,7 +26,7 @@ import (
"fmt"
"sort"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/spf13/cobra"
"golang.org/x/exp/maps"
diff --git a/types/module/module_test.go b/types/module/module_test.go
index 5a15727f1325..ccd22bf02462 100644
--- a/types/module/module_test.go
+++ b/types/module/module_test.go
@@ -7,7 +7,7 @@ import (
"io"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/golang/mock/gomock"
"github.com/spf13/cobra"
"github.com/stretchr/testify/require"
diff --git a/types/result_test.go b/types/result_test.go
index e531400e510a..1b46c9ec8e80 100644
--- a/types/result_test.go
+++ b/types/result_test.go
@@ -7,7 +7,7 @@ import (
"testing"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
cmtt "github.com/cometbft/cometbft/api/cometbft/types/v1"
coretypes "github.com/cometbft/cometbft/rpc/core/types"
cmt "github.com/cometbft/cometbft/types"
diff --git a/x/accounts/genesis.go b/x/accounts/genesis.go
index bd0f9edc0b4d..5f9ad3ee954e 100644
--- a/x/accounts/genesis.go
+++ b/x/accounts/genesis.go
@@ -64,19 +64,28 @@ func (k Keeper) exportAccount(ctx context.Context, addr []byte, accType string,
}
func (k Keeper) ImportState(ctx context.Context, genState *v1.GenesisState) error {
- err := k.AccountNumber.Set(ctx, genState.AccountNumber)
- if err != nil {
- return err
- }
-
+ var largestNum *uint64
+ var err error
// import accounts
for _, acc := range genState.Accounts {
err = k.importAccount(ctx, acc)
if err != nil {
return fmt.Errorf("%w: %s", err, acc.Address)
}
+
+ accNum := acc.AccountNumber
+
+ if largestNum == nil || *largestNum < accNum {
+ largestNum = &accNum
+ }
}
- return nil
+
+ if largestNum != nil {
+ // set the account number to the highest account number to avoid duplicate account number
+ err = k.AccountNumber.Set(ctx, *largestNum)
+ }
+
+ return err
}
func (k Keeper) importAccount(ctx context.Context, acc *v1.GenesisAccount) error {
diff --git a/x/accounts/genesis_test.go b/x/accounts/genesis_test.go
index 357fb8eb6628..ecd44a91d00d 100644
--- a/x/accounts/genesis_test.go
+++ b/x/accounts/genesis_test.go
@@ -51,6 +51,23 @@ func TestGenesis(t *testing.T) {
resp, err = k.Query(ctx, addr2, &types.DoubleValue{})
require.NoError(t, err)
require.Equal(t, &types.UInt64Value{Value: 20}, resp)
+
+ // reset state
+ k, ctx = newKeeper(t, func(deps implementation.Dependencies) (string, implementation.Account, error) {
+ acc, err := NewTestAccount(deps)
+ return testAccountType, acc, err
+ })
+
+ // modify the accounts account number
+ state.Accounts[0].AccountNumber = 99
+
+ err = k.ImportState(ctx, state)
+ require.NoError(t, err)
+
+ currentAccNum, err := k.AccountNumber.Peek(ctx)
+ require.NoError(t, err)
+ // AccountNumber should be set to the highest account number in the genesis state
+ require.Equal(t, uint64(99), currentAccNum)
}
func TestImportAccountError(t *testing.T) {
diff --git a/x/auth/ante/sigverify.go b/x/auth/ante/sigverify.go
index e40fc5d9b98a..638afe594332 100644
--- a/x/auth/ante/sigverify.go
+++ b/x/auth/ante/sigverify.go
@@ -64,7 +64,7 @@ type AccountAbstractionKeeper interface {
// gas for signature verification.
//
// In cases where unordered or parallel transactions are desired, it is recommended
-// to to set unordered=true with a reasonable timeout_height value, in which case
+// to set unordered=true with a reasonable timeout_height value, in which case
// this nonce verification and increment will be skipped.
//
// CONTRACT: Tx must implement SigVerifiableTx interface
diff --git a/x/auth/ante/testutil_test.go b/x/auth/ante/testutil_test.go
index 8dff25c7713f..294e17db8900 100644
--- a/x/auth/ante/testutil_test.go
+++ b/x/auth/ante/testutil_test.go
@@ -4,7 +4,7 @@ import (
"context"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
diff --git a/x/auth/go.mod b/x/auth/go.mod
index 1e428df69150..d05bdd27649e 100644
--- a/x/auth/go.mod
+++ b/x/auth/go.mod
@@ -15,6 +15,7 @@ require (
cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000
cosmossdk.io/x/tx v0.13.3
github.com/cometbft/cometbft v1.0.0-alpha.2.0.20240530055211-ae27f7eb3c08
+ github.com/cometbft/cometbft/api v1.0.0-rc.1
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.51.0
github.com/cosmos/gogoproto v1.5.0
@@ -57,7 +58,6 @@ require (
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cometbft/cometbft-db v0.12.0 // indirect
- github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/cosmos-db v1.0.2 // indirect
github.com/cosmos/crypto v0.0.0-20240309083813-82ed2537802e // indirect
diff --git a/x/auth/keeper/keeper.go b/x/auth/keeper/keeper.go
index 7c86fb093390..00240e8f9a65 100644
--- a/x/auth/keeper/keeper.go
+++ b/x/auth/keeper/keeper.go
@@ -102,6 +102,10 @@ type AccountKeeper struct {
Schema collections.Schema
Params collections.Item[types.Params]
+ // only use for upgrade handler
+ //
+ // Deprecated: move to accounts module accountNumber
+ accountNumber collections.Sequence
// Accounts key: AccAddr | value: AccountI | index: AccountsIndex
Accounts *collections.IndexedMap[sdk.AccAddress, sdk.AccountI, AccountsIndexes]
}
@@ -135,6 +139,7 @@ func NewAccountKeeper(
permAddrs: permAddrs,
authority: authority,
Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)),
+ accountNumber: collections.NewSequence(sb, types.GlobalAccountNumberKey, "account_number"),
Accounts: collections.NewIndexedMap(sb, types.AddressStoreKeyPrefix, "accounts", sdk.AccAddressKey, codec.CollInterfaceValue[sdk.AccountI](cdc), NewAccountIndexes(sb)),
}
schema, err := sb.Build()
@@ -145,6 +150,22 @@ func NewAccountKeeper(
return ak
}
+// removeLegacyAccountNumberUnsafe is used for migration purpose only. It deletes the sequence in the DB
+// and returns the last value used on success.
+// Deprecated
+func (ak AccountKeeper) removeLegacyAccountNumberUnsafe(ctx context.Context) (uint64, error) {
+ accNum, err := ak.accountNumber.Peek(ctx)
+ if err != nil {
+ return 0, err
+ }
+
+ // Delete DB entry for legacy account number
+ store := ak.KVStoreService.OpenKVStore(ctx)
+ err = store.Delete(types.GlobalAccountNumberKey.Bytes())
+
+ return accNum, err
+}
+
// GetAuthority returns the x/auth module's authority.
func (ak AccountKeeper) GetAuthority() string {
return ak.authority
@@ -317,3 +338,18 @@ func (ak AccountKeeper) NonAtomicMsgsExec(ctx context.Context, signer sdk.AccAdd
return msgResponses, nil
}
+
+// MigrateAccountNumberUnsafe migrates auth's account number to accounts's account number
+// and delete store entry for auth legacy GlobalAccountNumberKey.
+//
+// Should only use in an upgrade handler for migrating account number.
+func MigrateAccountNumberUnsafe(ctx context.Context, ak *AccountKeeper) error {
+ currentAccNum, err := ak.removeLegacyAccountNumberUnsafe(ctx)
+ if err != nil {
+ return fmt.Errorf("failed to migrate account number: %w", err)
+ }
+
+ err = ak.AccountsModKeeper.InitAccountNumberSeqUnsafe(ctx, currentAccNum)
+
+ return err
+}
diff --git a/x/auth/keeper/migrations.go b/x/auth/keeper/migrations.go
index 5b3418b99e65..c858e7e9551a 100644
--- a/x/auth/keeper/migrations.go
+++ b/x/auth/keeper/migrations.go
@@ -3,7 +3,6 @@ package keeper
import (
"context"
- "cosmossdk.io/collections"
v5 "cosmossdk.io/x/auth/migrations/v5"
"cosmossdk.io/x/auth/types"
@@ -13,16 +12,11 @@ import (
// Migrator is a struct for handling in-place store migrations.
type Migrator struct {
keeper AccountKeeper
- // accNum is use in v4 to v5 and v5 to v6 migration
- accNum collections.Sequence
}
// NewMigrator returns a new Migrator.
func NewMigrator(keeper AccountKeeper) Migrator {
- sb := collections.NewSchemaBuilder(keeper.Environment.KVStoreService)
- accNumSeq := collections.NewSequence(sb, types.GlobalAccountNumberKey, "account_number")
-
- return Migrator{keeper: keeper, accNum: accNumSeq}
+ return Migrator{keeper: keeper}
}
// Migrate1to2 migrates from version 1 to 2.
@@ -48,18 +42,7 @@ func (m Migrator) Migrate3to4(ctx context.Context) error {
// It migrates the GlobalAccountNumber from being a protobuf defined value to a
// big-endian encoded uint64, it also migrates it to use a more canonical prefix.
func (m Migrator) Migrate4To5(ctx context.Context) error {
- return v5.Migrate(ctx, m.keeper.KVStoreService, m.accNum)
-}
-
-// Migrate5To6 migrates the x/auth module state from the consensus version 5 to 6.
-// It migrates the GlobalAccountNumber from x/auth to x/accounts .
-func (m Migrator) Migrate5To6(ctx context.Context) error {
- currentAccNum, err := m.accNum.Peek(ctx)
- if err != nil {
- return err
- }
-
- return m.keeper.AccountsModKeeper.InitAccountNumberSeqUnsafe(ctx, currentAccNum)
+ return v5.Migrate(ctx, m.keeper.KVStoreService, m.keeper.accountNumber)
}
// V45SetAccount implements V45_SetAccount
diff --git a/x/auth/migrations/v6/migrate.go b/x/auth/migrations/v6/migrate.go
deleted file mode 100644
index 889de0e9c9e4..000000000000
--- a/x/auth/migrations/v6/migrate.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package v6
-
-import (
- "context"
-)
-
-type migrateAccNumFunc = func(ctx context.Context) error
-
-// Migrate account number from x/auth account number to x/accounts account number
-func Migrate(ctx context.Context, f migrateAccNumFunc) error {
- return f(ctx)
-}
diff --git a/x/auth/module.go b/x/auth/module.go
index 32f5f7627b90..d9290c0a8f1f 100644
--- a/x/auth/module.go
+++ b/x/auth/module.go
@@ -27,7 +27,7 @@ import (
// ConsensusVersion defines the current x/auth module consensus version.
const (
- ConsensusVersion = 6
+ ConsensusVersion = 5
GovModuleName = "gov"
)
@@ -113,9 +113,6 @@ func (am AppModule) RegisterMigrations(mr appmodule.MigrationRegistrar) error {
if err := mr.Register(types.ModuleName, 4, m.Migrate4To5); err != nil {
return fmt.Errorf("failed to migrate x/%s from version 4 to 5: %w", types.ModuleName, err)
}
- if err := mr.Register(types.ModuleName, 5, m.Migrate5To6); err != nil {
- return fmt.Errorf("failed to migrate x/%s from version 5 to 6: %w", types.ModuleName, err)
- }
return nil
}
diff --git a/x/auth/vesting/README.md b/x/auth/vesting/README.md
index 222b73f6bcc6..7c8e6208fb38 100644
--- a/x/auth/vesting/README.md
+++ b/x/auth/vesting/README.md
@@ -596,7 +596,7 @@ simd tx vesting --help
#### create-periodic-vesting-account
-The `create-periodic-vesting-account` command creates a new vesting account funded with an allocation of tokens, where a sequence of coins and period length in seconds. Periods are sequential, in that the duration of of a period only starts at the end of the previous period. The duration of the first period starts upon account creation.
+The `create-periodic-vesting-account` command creates a new vesting account funded with an allocation of tokens, where a sequence of coins and period length in seconds. Periods are sequential, in that the duration of a period only starts at the end of the previous period. The duration of the first period starts upon account creation.
```bash
simd tx vesting create-periodic-vesting-account [to_address] [periods_json_file] [flags]
diff --git a/x/authz/client/cli/tx_test.go b/x/authz/client/cli/tx_test.go
index a70a5fc0f4bc..24b33d7f9e6f 100644
--- a/x/authz/client/cli/tx_test.go
+++ b/x/authz/client/cli/tx_test.go
@@ -6,7 +6,7 @@ import (
"testing"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
"github.com/stretchr/testify/suite"
diff --git a/x/authz/go.mod b/x/authz/go.mod
index 0549245f7b6d..b9c3976cae4f 100644
--- a/x/authz/go.mod
+++ b/x/authz/go.mod
@@ -51,7 +51,7 @@ require (
github.com/cockroachdb/pebble v1.1.0 // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cometbft/cometbft-db v0.12.0 // indirect
- github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect
+ github.com/cometbft/cometbft/api v1.0.0-rc.1
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/cosmos-db v1.0.2 // indirect
github.com/cosmos/crypto v0.0.0-20240309083813-82ed2537802e // indirect
diff --git a/x/authz/proto/cosmos/authz/v1beta1/tx.proto b/x/authz/proto/cosmos/authz/v1beta1/tx.proto
index 8df2f1da1b1d..7c7d4bdbdf77 100644
--- a/x/authz/proto/cosmos/authz/v1beta1/tx.proto
+++ b/x/authz/proto/cosmos/authz/v1beta1/tx.proto
@@ -106,7 +106,7 @@ message MsgRevokeAllResponse {
// MsgPruneExpiredGrants prunes the expired grants.
message MsgPruneExpiredGrants {
- option (cosmos_proto.message_added_in) = "x/authz v1.0.0";
+ option (cosmos_proto.message_added_in) = "x/authz v0.2.0";
option (cosmos.msg.v1.signer) = "pruner";
string pruner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
@@ -114,5 +114,5 @@ message MsgPruneExpiredGrants {
// MsgPruneExpiredGrantsResponse defines the Msg/MsgPruneExpiredGrantsResponse response type.
message MsgPruneExpiredGrantsResponse {
- option (cosmos_proto.message_added_in) = "x/authz v1.0.0";
+ option (cosmos_proto.message_added_in) = "x/authz v0.2.0";
}
diff --git a/x/authz/tx.pb.go b/x/authz/tx.pb.go
index 528d9c414ccd..af6fba8effd4 100644
--- a/x/authz/tx.pb.go
+++ b/x/authz/tx.pb.go
@@ -469,7 +469,7 @@ var fileDescriptor_3ceddab7d8589ad1 = []byte{
0xa5, 0xaa, 0x65, 0xe9, 0x6b, 0x30, 0x73, 0xd6, 0x0f, 0x89, 0x55, 0xd2, 0x31, 0x4d, 0xf5, 0x6d,
0x78, 0xbb, 0x4e, 0xc9, 0x33, 0xaf, 0x6b, 0xe3, 0x8d, 0xbe, 0xdb, 0xf6, 0x70, 0x8b, 0x49, 0x8f,
0x4a, 0x45, 0x38, 0xed, 0x06, 0xd1, 0xf1, 0xac, 0x05, 0xae, 0x92, 0x3d, 0x1c, 0x16, 0x6e, 0xf6,
- 0xf9, 0x45, 0x6b, 0xbd, 0x12, 0x2a, 0xa2, 0x62, 0xc0, 0x59, 0xa4, 0xf5, 0x75, 0x98, 0x8d, 0x7d,
+ 0xf9, 0x45, 0x6b, 0xbd, 0x22, 0x2a, 0xa3, 0x62, 0xc0, 0x59, 0xa4, 0xf5, 0x75, 0x98, 0x8d, 0x7d,
0x29, 0xe2, 0x27, 0x5d, 0xae, 0x2f, 0xff, 0x4e, 0xc2, 0x64, 0x9d, 0x12, 0xe9, 0x29, 0x9c, 0xe2,
0xa7, 0xae, 0xc6, 0xdf, 0x5c, 0x78, 0x32, 0xca, 0xbd, 0xd1, 0xf9, 0x48, 0x93, 0x4f, 0xe0, 0x24,
0x3b, 0xa7, 0xec, 0x95, 0xf8, 0x20, 0xad, 0xac, 0x8e, 0x4c, 0x47, 0xdd, 0x4c, 0x38, 0x2d, 0x34,
@@ -479,7 +479,7 @@ var fileDescriptor_3ceddab7d8589ad1 = []byte{
0x36, 0xca, 0xd4, 0xbb, 0xe0, 0xe3, 0x59, 0x2b, 0xef, 0xfd, 0x52, 0x13, 0x7b, 0x47, 0x2a, 0x38,
0x38, 0x52, 0xc1, 0xcf, 0x23, 0x15, 0x7c, 0x3a, 0x56, 0x13, 0x07, 0xc7, 0x6a, 0xe2, 0xfb, 0xb1,
0x9a, 0x78, 0x25, 0x14, 0x49, 0x5b, 0x3b, 0xa8, 0xed, 0x18, 0x42, 0x3c, 0xcd, 0x69, 0xf6, 0x65,
- 0x5b, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x6b, 0x8f, 0x89, 0xf4, 0x06, 0x00, 0x00,
+ 0x5b, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x34, 0x9d, 0x5f, 0xf4, 0x06, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
diff --git a/x/circuit/README.md b/x/circuit/README.md
index f0d2d5d8df20..25843ed2033a 100644
--- a/x/circuit/README.md
+++ b/x/circuit/README.md
@@ -92,7 +92,7 @@ Reset is called by an authorized account to enable execution for a specific msgU
```protobuf
// ResetCircuitBreaker resumes processing of Msg's in the state machine that
- // have been been paused using TripCircuitBreaker.
+ // have been paused using TripCircuitBreaker.
rpc ResetCircuitBreaker(MsgResetCircuitBreaker) returns (MsgResetCircuitBreakerResponse);
```
diff --git a/x/circuit/keeper/msg_server.go b/x/circuit/keeper/msg_server.go
index 3c7df7172732..974d682ecc35 100644
--- a/x/circuit/keeper/msg_server.go
+++ b/x/circuit/keeper/msg_server.go
@@ -134,7 +134,7 @@ func (srv msgServer) TripCircuitBreaker(ctx context.Context, msg *types.MsgTripC
}
// ResetCircuitBreaker resumes processing of Msg's in the state machine that
-// have been been paused using TripCircuitBreaker.
+// have been paused using TripCircuitBreaker.
func (srv msgServer) ResetCircuitBreaker(ctx context.Context, msg *types.MsgResetCircuitBreaker) (*types.MsgResetCircuitBreakerResponse, error) {
keeper := srv.Keeper
address, err := srv.addressCodec.StringToBytes(msg.Authority)
diff --git a/x/circuit/proto/cosmos/circuit/v1/tx.proto b/x/circuit/proto/cosmos/circuit/v1/tx.proto
index 71f708bb2ad9..1e09117b28f1 100644
--- a/x/circuit/proto/cosmos/circuit/v1/tx.proto
+++ b/x/circuit/proto/cosmos/circuit/v1/tx.proto
@@ -18,7 +18,7 @@ service Msg {
rpc TripCircuitBreaker(MsgTripCircuitBreaker) returns (MsgTripCircuitBreakerResponse);
// ResetCircuitBreaker resumes processing of Msg's in the state machine that
- // have been been paused using TripCircuitBreaker.
+ // have been paused using TripCircuitBreaker.
rpc ResetCircuitBreaker(MsgResetCircuitBreaker) returns (MsgResetCircuitBreakerResponse);
}
diff --git a/x/circuit/types/tx.pb.go b/x/circuit/types/tx.pb.go
index df1f62291b2d..667cce9d9d7a 100644
--- a/x/circuit/types/tx.pb.go
+++ b/x/circuit/types/tx.pb.go
@@ -406,7 +406,7 @@ type MsgClient interface {
// TripCircuitBreaker pauses processing of Msg's in the state machine.
TripCircuitBreaker(ctx context.Context, in *MsgTripCircuitBreaker, opts ...grpc.CallOption) (*MsgTripCircuitBreakerResponse, error)
// ResetCircuitBreaker resumes processing of Msg's in the state machine that
- // have been been paused using TripCircuitBreaker.
+ // have been paused using TripCircuitBreaker.
ResetCircuitBreaker(ctx context.Context, in *MsgResetCircuitBreaker, opts ...grpc.CallOption) (*MsgResetCircuitBreakerResponse, error)
}
diff --git a/x/epochs/depinject.go b/x/epochs/depinject.go
index 0239cc0081a6..f09f9f95d9f8 100644
--- a/x/epochs/depinject.go
+++ b/x/epochs/depinject.go
@@ -39,7 +39,7 @@ type ModuleInputs struct {
type ModuleOutputs struct {
depinject.Out
- EpochKeeper keeper.Keeper
+ EpochKeeper *keeper.Keeper
Module appmodule.AppModule
}
@@ -49,7 +49,7 @@ func ProvideModule(in ModuleInputs) ModuleOutputs {
return ModuleOutputs{EpochKeeper: k, Module: m}
}
-func InvokeSetHooks(keeper keeper.Keeper, hooks map[string]types.EpochHooksWrapper) error {
+func InvokeSetHooks(keeper *keeper.Keeper, hooks map[string]types.EpochHooksWrapper) error {
if hooks == nil {
return nil
}
diff --git a/x/epochs/keeper/epoch_test.go b/x/epochs/keeper/epoch_test.go
index 0977940afeca..24dcc4764042 100644
--- a/x/epochs/keeper/epoch_test.go
+++ b/x/epochs/keeper/epoch_test.go
@@ -93,9 +93,10 @@ func (s *KeeperTestSuite) TestEpochLifeCycle() {
allEpochs, err := s.EpochsKeeper.AllEpochInfos(s.Ctx)
s.Require().NoError(err)
- s.Require().Len(allEpochs, 4)
+ s.Require().Len(allEpochs, 5)
s.Require().Equal(allEpochs[0].Identifier, "day") // alphabetical order
s.Require().Equal(allEpochs[1].Identifier, "hour")
- s.Require().Equal(allEpochs[2].Identifier, "monthly")
- s.Require().Equal(allEpochs[3].Identifier, "week")
+ s.Require().Equal(allEpochs[2].Identifier, "minute")
+ s.Require().Equal(allEpochs[3].Identifier, "monthly")
+ s.Require().Equal(allEpochs[4].Identifier, "week")
}
diff --git a/x/epochs/keeper/genesis_test.go b/x/epochs/keeper/genesis_test.go
index 4400cb65908f..eb42f17246c8 100644
--- a/x/epochs/keeper/genesis_test.go
+++ b/x/epochs/keeper/genesis_test.go
@@ -18,7 +18,7 @@ func TestEpochsExportGenesis(t *testing.T) {
genesis, err := epochsKeeper.ExportGenesis(ctx)
require.NoError(t, err)
- require.Len(t, genesis.Epochs, 3)
+ require.Len(t, genesis.Epochs, 4)
expectedEpochs := types.DefaultGenesis().Epochs
for i := 0; i < len(expectedEpochs); i++ {
diff --git a/x/epochs/keeper/grpc_query_test.go b/x/epochs/keeper/grpc_query_test.go
index 760c0e978bc2..e83b11e2d1fe 100644
--- a/x/epochs/keeper/grpc_query_test.go
+++ b/x/epochs/keeper/grpc_query_test.go
@@ -11,7 +11,7 @@ func (s *KeeperTestSuite) TestQueryEpochInfos() {
// Check that querying epoch infos on default genesis returns the default genesis epoch infos
epochInfosResponse, err := queryClient.EpochInfos(s.Ctx, &types.QueryEpochsInfoRequest{})
s.Require().NoError(err)
- s.Require().Len(epochInfosResponse.Epochs, 3)
+ s.Require().Len(epochInfosResponse.Epochs, 4)
expectedEpochs := types.DefaultGenesis().Epochs
for id := range expectedEpochs {
expectedEpochs[id].StartTime = s.Ctx.BlockTime()
diff --git a/x/epochs/keeper/keeper.go b/x/epochs/keeper/keeper.go
index 2b47d40be2b9..c15ed267e989 100644
--- a/x/epochs/keeper/keeper.go
+++ b/x/epochs/keeper/keeper.go
@@ -19,7 +19,7 @@ type Keeper struct {
}
// NewKeeper returns a new keeper by codec and storeKey inputs.
-func NewKeeper(env appmodule.Environment, cdc codec.BinaryCodec) Keeper {
+func NewKeeper(env appmodule.Environment, cdc codec.BinaryCodec) *Keeper {
sb := collections.NewSchemaBuilder(env.KVStoreService)
k := Keeper{
Environment: env,
@@ -32,11 +32,11 @@ func NewKeeper(env appmodule.Environment, cdc codec.BinaryCodec) Keeper {
panic(err)
}
k.Schema = schema
- return k
+ return &k
}
// Set the gamm hooks.
-func (k Keeper) SetHooks(eh types.EpochHooks) Keeper {
+func (k *Keeper) SetHooks(eh types.EpochHooks) *Keeper {
if k.hooks != nil {
panic("cannot set epochs hooks twice")
}
diff --git a/x/epochs/keeper/keeper_test.go b/x/epochs/keeper/keeper_test.go
index 354669f76a61..07cc9a35eb16 100644
--- a/x/epochs/keeper/keeper_test.go
+++ b/x/epochs/keeper/keeper_test.go
@@ -27,7 +27,7 @@ type KeeperTestSuite struct {
suite.Suite
Ctx sdk.Context
environment appmodule.Environment
- EpochsKeeper epochskeeper.Keeper
+ EpochsKeeper *epochskeeper.Keeper
queryClient types.QueryClient
}
@@ -39,7 +39,7 @@ func (s *KeeperTestSuite) SetupTest() {
s.environment = environment
queryRouter := baseapp.NewGRPCQueryRouter()
cfg := module.NewConfigurator(nil, nil, queryRouter)
- types.RegisterQueryServer(cfg.QueryServer(), epochskeeper.NewQuerier(s.EpochsKeeper))
+ types.RegisterQueryServer(cfg.QueryServer(), epochskeeper.NewQuerier(*s.EpochsKeeper))
grpcQueryService := &baseapp.QueryServiceTestHelper{
GRPCQueryRouter: queryRouter,
Ctx: s.Ctx,
@@ -49,7 +49,7 @@ func (s *KeeperTestSuite) SetupTest() {
s.queryClient = types.NewQueryClient(grpcQueryService)
}
-func Setup(t *testing.T) (sdk.Context, epochskeeper.Keeper, appmodule.Environment) {
+func Setup(t *testing.T) (sdk.Context, *epochskeeper.Keeper, appmodule.Environment) {
t.Helper()
key := storetypes.NewKVStoreKey(types.StoreKey)
@@ -67,7 +67,7 @@ func Setup(t *testing.T) (sdk.Context, epochskeeper.Keeper, appmodule.Environmen
ctx.WithHeaderInfo(header.Info{Height: 1, Time: time.Now().UTC(), ChainID: "epochs"})
err := epochsKeeper.InitGenesis(ctx, *types.DefaultGenesis())
require.NoError(t, err)
- SetEpochStartTime(ctx, epochsKeeper)
+ SetEpochStartTime(ctx, *epochsKeeper)
return ctx, epochsKeeper, environment
}
diff --git a/x/epochs/module.go b/x/epochs/module.go
index 23f39c362075..8365f189cfa2 100644
--- a/x/epochs/module.go
+++ b/x/epochs/module.go
@@ -36,11 +36,11 @@ const ConsensusVersion = 1
// AppModule implements the AppModule interface for the epochs module.
type AppModule struct {
cdc codec.Codec
- keeper keeper.Keeper
+ keeper *keeper.Keeper
}
// NewAppModule creates a new AppModule object.
-func NewAppModule(cdc codec.Codec, keeper keeper.Keeper) AppModule {
+func NewAppModule(cdc codec.Codec, keeper *keeper.Keeper) AppModule {
return AppModule{
cdc: cdc,
keeper: keeper,
@@ -67,7 +67,7 @@ func (AppModule) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *gwrunt
// RegisterServices registers module services.
func (am AppModule) RegisterServices(registrar grpc.ServiceRegistrar) error {
- types.RegisterQueryServer(registrar, keeper.NewQuerier(am.keeper))
+ types.RegisterQueryServer(registrar, keeper.NewQuerier(*am.keeper))
return nil
}
diff --git a/x/epochs/types/genesis.go b/x/epochs/types/genesis.go
index cf60354782b1..1cdea892df49 100644
--- a/x/epochs/types/genesis.go
+++ b/x/epochs/types/genesis.go
@@ -17,6 +17,7 @@ func DefaultGenesis() *GenesisState {
epochs := []EpochInfo{
NewGenesisEpochInfo("day", time.Hour*24), // alphabetical order
NewGenesisEpochInfo("hour", time.Hour),
+ NewGenesisEpochInfo("minute", time.Minute),
NewGenesisEpochInfo("week", time.Hour*24*7),
}
return NewGenesisState(epochs)
diff --git a/x/feegrant/client/cli/tx_test.go b/x/feegrant/client/cli/tx_test.go
index c8578cd35cf9..61c32ea34e23 100644
--- a/x/feegrant/client/cli/tx_test.go
+++ b/x/feegrant/client/cli/tx_test.go
@@ -7,7 +7,7 @@ import (
"testing"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
"github.com/cosmos/gogoproto/proto"
"github.com/stretchr/testify/suite"
diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod
index b0b6de9fa186..f7a8a2d3266f 100644
--- a/x/feegrant/go.mod
+++ b/x/feegrant/go.mod
@@ -55,7 +55,7 @@ require (
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cometbft/cometbft-db v0.12.0 // indirect
- github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect
+ github.com/cometbft/cometbft/api v1.0.0-rc.1
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/cosmos-db v1.0.2 // indirect
github.com/cosmos/crypto v0.0.0-20240309083813-82ed2537802e // indirect
diff --git a/x/genutil/client/cli/collect.go b/x/genutil/client/cli/collect.go
index 3b0354c1073b..96b65f147e7d 100644
--- a/x/genutil/client/cli/collect.go
+++ b/x/genutil/client/cli/collect.go
@@ -26,7 +26,12 @@ func CollectGenTxsCmd(genBalIterator types.GenesisBalancesIterator, validator ty
clientCtx := client.GetClientContextFromCmd(cmd)
cdc := clientCtx.Codec
- nodeID, valPubKey, err := genutil.InitializeNodeValidatorFiles(config)
+ consensusKey, err := cmd.Flags().GetString(FlagConsensusKeyAlgo)
+ if err != nil {
+ return errors.Wrap(err, "Failed to get consensus key algo")
+ }
+
+ nodeID, valPubKey, err := genutil.InitializeNodeValidatorFiles(config, consensusKey)
if err != nil {
return errors.Wrap(err, "failed to initialize node validator files")
}
@@ -52,10 +57,10 @@ func CollectGenTxsCmd(genBalIterator types.GenesisBalancesIterator, validator ty
toPrint.AppMessage = appMessage
- return displayInfo(toPrint)
+ return displayInfo(cmd.ErrOrStderr(), toPrint)
},
}
-
+ cmd.Flags().String(FlagConsensusKeyAlgo, "ed25519", "algorithm to use for the consensus key")
cmd.Flags().String(flagGenTxDir, "", "override default \"gentx\" directory from which collect and execute genesis transactions; default [--home]/config/gentx/")
return cmd
diff --git a/x/genutil/client/cli/gentx.go b/x/genutil/client/cli/gentx.go
index 9c6d0c5034c7..5b4b57f95ea5 100644
--- a/x/genutil/client/cli/gentx.go
+++ b/x/genutil/client/cli/gentx.go
@@ -62,7 +62,12 @@ $ %s gentx my-key-name 1000000stake --home=/path/to/home/dir --keyring-backend=o
}
cdc := clientCtx.Codec
- nodeID, valPubKey, err := genutil.InitializeNodeValidatorFiles(config)
+ consensusKey, err := cmd.Flags().GetString(FlagConsensusKeyAlgo)
+ if err != nil {
+ return errors.Wrap(err, "Failed to get consensus key algo")
+ }
+
+ nodeID, valPubKey, err := genutil.InitializeNodeValidatorFiles(config, consensusKey)
if err != nil {
return errors.Wrap(err, "failed to initialize node validator files")
}
@@ -212,6 +217,7 @@ $ %s gentx my-key-name 1000000stake --home=/path/to/home/dir --keyring-backend=o
},
}
+ cmd.Flags().String(FlagConsensusKeyAlgo, "ed25519", "algorithm to use for the consensus key: ed25519 | secp256k1 | bls12_381 | sr25519 | multi")
cmd.Flags().String(flags.FlagOutputDocument, "", "Write the genesis transaction JSON document to the given file instead of the default location")
cmd.Flags().AddFlagSet(fsCreateValidator)
flags.AddTxFlagsToCmd(cmd)
diff --git a/x/genutil/client/cli/init.go b/x/genutil/client/cli/init.go
index 920dfcec260f..866a472778e0 100644
--- a/x/genutil/client/cli/init.go
+++ b/x/genutil/client/cli/init.go
@@ -5,6 +5,7 @@ import (
"encoding/json"
"errors"
"fmt"
+ "io"
"os"
"path/filepath"
@@ -58,13 +59,13 @@ func newPrintInfo(moniker, chainID, nodeID, genTxsDir string, appMessage json.Ra
}
}
-func displayInfo(info printInfo) error {
+func displayInfo(dst io.Writer, info printInfo) error {
out, err := json.MarshalIndent(info, "", " ")
if err != nil {
return err
}
- _, err = fmt.Fprintf(os.Stderr, "%s\n", out)
+ _, err = fmt.Fprintf(dst, "%s\n", out)
return err
}
@@ -112,7 +113,12 @@ func InitCmd(mm *module.Manager) *cobra.Command {
initHeight = 1
}
- nodeID, _, err := genutil.InitializeNodeValidatorFilesFromMnemonic(config, mnemonic)
+ consensusKey, err := cmd.Flags().GetString(FlagConsensusKeyAlgo)
+ if err != nil {
+ return errorsmod.Wrap(err, "Failed to get consensus key algo")
+ }
+
+ nodeID, _, err := genutil.InitializeNodeValidatorFilesFromMnemonic(config, mnemonic, consensusKey)
if err != nil {
return err
}
@@ -162,10 +168,6 @@ func InitCmd(mm *module.Manager) *cobra.Command {
Params: cmttypes.DefaultConsensusParams(),
}
- consensusKey, err := cmd.Flags().GetString(FlagConsensusKeyAlgo)
- if err != nil {
- return errorsmod.Wrap(err, "Failed to get consensus key algo")
- }
appGenesis.Consensus.Params.Validator.PubKeyTypes = []string{consensusKey}
if err = genutil.ExportGenesisFile(appGenesis, genFile); err != nil {
@@ -175,7 +177,7 @@ func InitCmd(mm *module.Manager) *cobra.Command {
toPrint := newPrintInfo(config.Moniker, chainID, nodeID, "", appState)
cfg.WriteConfigFile(filepath.Join(config.RootDir, "config", "config.toml"), config)
- return displayInfo(toPrint)
+ return displayInfo(cmd.ErrOrStderr(), toPrint)
},
}
diff --git a/x/genutil/client/cli/init_test.go b/x/genutil/client/cli/init_test.go
index b57bba44cd50..ba90403be880 100644
--- a/x/genutil/client/cli/init_test.go
+++ b/x/genutil/client/cli/init_test.go
@@ -22,6 +22,7 @@ import (
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/types"
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
+ "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
"github.com/cosmos/cosmos-sdk/server"
servercmtlog "github.com/cosmos/cosmos-sdk/server/log"
"github.com/cosmos/cosmos-sdk/server/mock"
@@ -243,7 +244,7 @@ func TestInitNodeValidatorFiles(t *testing.T) {
cfg, err := genutiltest.CreateDefaultCometConfig(home)
require.NoError(t, err)
- nodeID, valPubKey, err := genutil.InitializeNodeValidatorFiles(cfg)
+ nodeID, valPubKey, err := genutil.InitializeNodeValidatorFiles(cfg, ed25519.KeyType)
require.NoError(t, err)
require.NotEqual(t, "", nodeID)
diff --git a/x/genutil/utils.go b/x/genutil/utils.go
index 880aa7bdc1c0..78fc18f85aed 100644
--- a/x/genutil/utils.go
+++ b/x/genutil/utils.go
@@ -8,6 +8,8 @@ import (
"time"
cfg "github.com/cometbft/cometbft/config"
+ cmtcrypto "github.com/cometbft/cometbft/crypto"
+ cmtbls12381 "github.com/cometbft/cometbft/crypto/bls12381"
tmed25519 "github.com/cometbft/cometbft/crypto/ed25519"
"github.com/cometbft/cometbft/p2p"
"github.com/cometbft/cometbft/privval"
@@ -44,13 +46,13 @@ func ExportGenesisFileWithTime(genFile, chainID string, validators []cmttypes.Ge
}
// InitializeNodeValidatorFiles creates private validator and p2p configuration files.
-func InitializeNodeValidatorFiles(config *cfg.Config) (nodeID string, valPubKey cryptotypes.PubKey, err error) {
- return InitializeNodeValidatorFilesFromMnemonic(config, "")
+func InitializeNodeValidatorFiles(config *cfg.Config, keyType string) (nodeID string, valPubKey cryptotypes.PubKey, err error) {
+ return InitializeNodeValidatorFilesFromMnemonic(config, "", keyType)
}
// InitializeNodeValidatorFilesFromMnemonic creates private validator and p2p configuration files using the given mnemonic.
// If no valid mnemonic is given, a random one will be used instead.
-func InitializeNodeValidatorFilesFromMnemonic(config *cfg.Config, mnemonic string) (nodeID string, valPubKey cryptotypes.PubKey, err error) {
+func InitializeNodeValidatorFilesFromMnemonic(config *cfg.Config, mnemonic, keyType string) (nodeID string, valPubKey cryptotypes.PubKey, err error) {
if len(mnemonic) > 0 && !bip39.IsMnemonicValid(mnemonic) {
return "", nil, fmt.Errorf("invalid mnemonic")
}
@@ -71,15 +73,38 @@ func InitializeNodeValidatorFilesFromMnemonic(config *cfg.Config, mnemonic strin
return "", nil, fmt.Errorf("could not create directory %q: %w", filepath.Dir(pvStateFile), err)
}
- var filePV *privval.FilePV
+ var (
+ filePV *privval.FilePV
+ privKey cmtcrypto.PrivKey
+ )
+
if len(mnemonic) == 0 {
- filePV = privval.LoadOrGenFilePV(pvKeyFile, pvStateFile)
+ switch keyType {
+ case "ed25519":
+ privKey = tmed25519.GenPrivKey()
+ case "bls12_381":
+ privKey, err = cmtbls12381.GenPrivKey()
+ if err != nil {
+ return "", nil, err
+ }
+ default:
+ privKey = tmed25519.GenPrivKey()
+ }
} else {
- privKey := tmed25519.GenPrivKeyFromSecret([]byte(mnemonic))
- filePV = privval.NewFilePV(privKey, pvKeyFile, pvStateFile)
- filePV.Save()
+ switch keyType {
+ case "ed25519":
+ privKey = tmed25519.GenPrivKeyFromSecret([]byte(mnemonic))
+ case "bls12_381":
+ // TODO: need to add support for getting from mnemonic in Comet.
+ return "", nil, fmt.Errorf("BLS key type does not support mnemonic")
+ default:
+ privKey = tmed25519.GenPrivKeyFromSecret([]byte(mnemonic))
+ }
}
+ filePV = privval.NewFilePV(privKey, pvKeyFile, pvStateFile)
+ filePV.Save()
+
tmValPubKey, err := filePV.GetPubKey()
if err != nil {
return "", nil, err
diff --git a/x/genutil/utils_test.go b/x/genutil/utils_test.go
index 7e0dd4b17d4a..af2963df41fd 100644
--- a/x/genutil/utils_test.go
+++ b/x/genutil/utils_test.go
@@ -53,7 +53,7 @@ func TestInitializeNodeValidatorFilesFromMnemonic(t *testing.T) {
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
- _, _, err := InitializeNodeValidatorFilesFromMnemonic(cfg, tt.mnemonic)
+ _, _, err := InitializeNodeValidatorFilesFromMnemonic(cfg, tt.mnemonic, "ed25519")
if tt.expError {
require.Error(t, err)
diff --git a/x/gov/proto/cosmos/gov/v1/gov.proto b/x/gov/proto/cosmos/gov/v1/gov.proto
index b23243208763..e402e5cff0be 100644
--- a/x/gov/proto/cosmos/gov/v1/gov.proto
+++ b/x/gov/proto/cosmos/gov/v1/gov.proto
@@ -130,7 +130,7 @@ message Proposal {
string failed_reason = 15 [(cosmos_proto.field_added_in) = "cosmos-sdk 0.50"];
// proposal_type defines the type of the proposal
- ProposalType proposal_type = 16 [(cosmos_proto.field_added_in) = "x/gov v1.0.0"];
+ ProposalType proposal_type = 16 [(cosmos_proto.field_added_in) = "x/gov v0.2.0"];
}
// ProposalStatus enumerates the valid statuses of a proposal.
@@ -157,7 +157,7 @@ enum ProposalStatus {
// ProposalVoteOptions defines the stringified vote options for proposals.
// This allows to support multiple choice options for a given proposal.
message ProposalVoteOptions {
- option (cosmos_proto.message_added_in) = "x/gov v1.0.0";
+ option (cosmos_proto.message_added_in) = "x/gov v0.2.0";
// option_one is the first option of the proposal
string option_one = 1;
@@ -324,32 +324,32 @@ message Params {
// depositors, according to the proposal_cancel_ratio and proposal_cancel_dest parameters.
// After the max cancel period, the proposal cannot be cancelled anymore.
string proposal_cancel_max_period = 17
- [(cosmos_proto.scalar) = "cosmos.Dec", (cosmos_proto.field_added_in) = "x/gov v1.0.0"];
+ [(cosmos_proto.scalar) = "cosmos.Dec", (cosmos_proto.field_added_in) = "x/gov v0.2.0"];
// optimistic_authorized_addresses is an optional governance parameter that limits the authorized accounts than can
// submit optimistic proposals
repeated string optimistic_authorized_addresses = 18
- [(cosmos_proto.scalar) = "cosmos.AddressString", (cosmos_proto.field_added_in) = "x/gov v1.0.0"];
+ [(cosmos_proto.scalar) = "cosmos.AddressString", (cosmos_proto.field_added_in) = "x/gov v0.2.0"];
// optimistic rejected threshold defines at which percentage of NO votes, the optimistic proposal should fail and be
// converted to a standard proposal. The threshold is expressed as a percentage of the total bonded tokens.
string optimistic_rejected_threshold = 19
- [(cosmos_proto.scalar) = "cosmos.Dec", (cosmos_proto.field_added_in) = "x/gov v1.0.0"];
+ [(cosmos_proto.scalar) = "cosmos.Dec", (cosmos_proto.field_added_in) = "x/gov v0.2.0"];
// yes_quorum defines the minimum percentage of Yes votes in quorum for proposal to pass.
// Default value: 0 (disabled).
- string yes_quorum = 20 [(cosmos_proto.scalar) = "cosmos.Dec", (cosmos_proto.field_added_in) = "x/gov v1.0.0"];
+ string yes_quorum = 20 [(cosmos_proto.scalar) = "cosmos.Dec", (cosmos_proto.field_added_in) = "x/gov v0.2.0"];
// Minimum percentage of total stake needed to vote for a result to be
// considered valid for an expedited proposal.
- string expedited_quorum = 21 [(cosmos_proto.scalar) = "cosmos.Dec", (cosmos_proto.field_added_in) = "x/gov v1.0.0"];
+ string expedited_quorum = 21 [(cosmos_proto.scalar) = "cosmos.Dec", (cosmos_proto.field_added_in) = "x/gov v0.2.0"];
}
// MessageBasedParams defines the parameters of specific messages in a proposal.
// It is used to define the parameters of a proposal that is based on a specific message.
// Once a message has message based params, it only supports a standard proposal type.
message MessageBasedParams {
- option (cosmos_proto.message_added_in) = "x/gov v1.0.0";
+ option (cosmos_proto.message_added_in) = "x/gov v0.2.0";
// Duration of the voting period.
google.protobuf.Duration voting_period = 1 [(gogoproto.stdduration) = true];
diff --git a/x/gov/proto/cosmos/gov/v1/query.proto b/x/gov/proto/cosmos/gov/v1/query.proto
index 6a0956704777..1e9d89c83788 100644
--- a/x/gov/proto/cosmos/gov/v1/query.proto
+++ b/x/gov/proto/cosmos/gov/v1/query.proto
@@ -59,13 +59,13 @@ service Query {
// ProposalVoteOptions queries the valid voting options for a proposal.
rpc ProposalVoteOptions(QueryProposalVoteOptionsRequest) returns (QueryProposalVoteOptionsResponse) {
option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/vote_options";
- option (cosmos_proto.method_added_in) = "x/gov v1.0.0";
+ option (cosmos_proto.method_added_in) = "x/gov v0.2.0";
}
// MessageBasedParams queries the message specific governance params based on a msg url.
rpc MessageBasedParams(QueryMessageBasedParamsRequest) returns (QueryMessageBasedParamsResponse) {
option (google.api.http).get = "/cosmos/gov/v1/params/{msg_url}";
- option (cosmos_proto.method_added_in) = "x/gov v1.0.0";
+ option (cosmos_proto.method_added_in) = "x/gov v0.2.0";
}
}
diff --git a/x/gov/proto/cosmos/gov/v1/tx.proto b/x/gov/proto/cosmos/gov/v1/tx.proto
index 787b78fb8b03..5eb5e5b6edee 100644
--- a/x/gov/proto/cosmos/gov/v1/tx.proto
+++ b/x/gov/proto/cosmos/gov/v1/tx.proto
@@ -98,7 +98,7 @@ message MsgSubmitProposal {
// proposal_type defines the type of proposal
// When not set defaults to PROPOSAL_TYPE_STANDARD
- ProposalType proposal_type = 8 [(cosmos_proto.field_added_in) = "x/gov v1.0.0"];
+ ProposalType proposal_type = 8 [(cosmos_proto.field_added_in) = "x/gov v0.2.0"];
}
// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type.
diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go
index 02accb41d0eb..80797e0381ec 100644
--- a/x/gov/types/v1/gov.pb.go
+++ b/x/gov/types/v1/gov.pb.go
@@ -1292,129 +1292,129 @@ func init() { proto.RegisterFile("cosmos/gov/v1/gov.proto", fileDescriptor_e05cb
var fileDescriptor_e05cb1c0d030febb = []byte{
// 1971 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x4d, 0x6f, 0x1b, 0xc7,
- 0x19, 0xf6, 0x92, 0x14, 0x25, 0xbe, 0x22, 0xa9, 0xd5, 0x48, 0x8a, 0xd6, 0x52, 0x44, 0xc9, 0x44,
- 0x11, 0xa8, 0x4e, 0x44, 0x4a, 0x49, 0xd5, 0xa6, 0x6e, 0x72, 0x20, 0xc5, 0x75, 0xbc, 0x86, 0x25,
- 0xb2, 0xcb, 0xb5, 0x6c, 0xb7, 0x28, 0x16, 0x2b, 0xed, 0x58, 0xda, 0x84, 0xbb, 0xc3, 0xee, 0x0e,
- 0xf5, 0xd1, 0x5f, 0x91, 0x63, 0x4f, 0x45, 0x6f, 0xcd, 0xb1, 0x07, 0xa3, 0xf7, 0xde, 0x82, 0x1e,
- 0x8a, 0xc0, 0xa7, 0x22, 0x40, 0xdd, 0xc2, 0x3e, 0x14, 0xc8, 0x4f, 0x28, 0x0a, 0xb4, 0x98, 0xd9,
- 0x59, 0xee, 0xf2, 0x43, 0x16, 0x15, 0xf4, 0x62, 0x53, 0xf3, 0x3e, 0xcf, 0x33, 0xef, 0xbc, 0x5f,
- 0x33, 0x24, 0x2c, 0x1f, 0x93, 0xc0, 0x25, 0x41, 0xf5, 0x84, 0x9c, 0x55, 0xcf, 0x76, 0xd8, 0x7f,
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcf, 0x6f, 0xdb, 0xc8,
+ 0x15, 0x0e, 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0c, 0xa5, 0x61, 0x40, 0x43, 0x6d,
+ 0x35, 0xdb, 0x9a, 0x61, 0xb6, 0x54, 0x5d, 0x6b, 0x0e, 0xa7, 0x4c, 0x60, 0x0e, 0x9b, 0x86, 0x76,
+ 0xf0, 0x59, 0x04, 0x49, 0x0d, 0x64, 0x5c, 0x40, 0x5a, 0xb5, 0x76, 0x5b, 0x6d, 0x84, 0x87, 0x1c,
+ 0xb6, 0xe9, 0xea, 0x43, 0x75, 0x8f, 0x67, 0x6c, 0x1c, 0xf3, 0x7e, 0x4d, 0x7b, 0xa4, 0x36, 0xe4,
+ 0xa9, 0xfa, 0xee, 0xd7, 0x6f, 0x4a, 0xd2, 0x37, 0x6f, 0x4a, 0xd2, 0x3f, 0xdf, 0x94, 0xa4, 0x2f,
+ 0xdf, 0x96, 0x6e, 0x7c, 0xf3, 0xb6, 0x74, 0xe3, 0x6f, 0x6f, 0x4b, 0x37, 0x7e, 0xb1, 0x1a, 0x96,
+ 0x6f, 0x60, 0x7f, 0x51, 0x71, 0x48, 0x95, 0x17, 0x6b, 0x95, 0x7d, 0xf5, 0x0f, 0xaa, 0x67, 0x3b,
+ 0x47, 0x59, 0xde, 0xa3, 0x1f, 0xff, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xeb, 0xae, 0x28, 0x84,
0x15, 0x00, 0x00,
}
diff --git a/x/gov/types/v1/query.pb.go b/x/gov/types/v1/query.pb.go
index 6d0bcaf7a9c0..fcb29c8b7e78 100644
--- a/x/gov/types/v1/query.pb.go
+++ b/x/gov/types/v1/query.pb.go
@@ -1185,84 +1185,84 @@ func init() {
func init() { proto.RegisterFile("cosmos/gov/v1/query.proto", fileDescriptor_46a436d1109b50d0) }
var fileDescriptor_46a436d1109b50d0 = []byte{
- // 1217 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x5f, 0x6f, 0xdb, 0x54,
- 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x24, 0x20, 0x9d, 0xdd, 0x9c, 0x94, 0xd2, 0x44,
+ 0x75, 0x1d, 0x3e, 0xb2, 0xda, 0x2f, 0x3c, 0xa8, 0x85, 0xd4, 0x10, 0x16, 0xc8, 0x7c, 0xea, 0x63,
+ 0xd1, 0x8e, 0x70, 0xb2, 0x1d, 0x6f, 0x6d, 0xfc, 0x7e, 0x5a, 0x90, 0x9e, 0x9d, 0x16, 0xa4, 0xbf,
+ 0x4f, 0x0b, 0xd2, 0x4f, 0x67, 0x85, 0x4b, 0xcf, 0xce, 0x0a, 0x97, 0xfe, 0x3a, 0x2b, 0x5c, 0xfa,
+ 0x7c, 0x56, 0x58, 0xb2, 0xfa, 0x03, 0xd5, 0xa2, 0x1a, 0xe7, 0xd6, 0xfc, 0x55, 0x9c, 0x69, 0x5e,
+ 0x65, 0x6f, 0x98, 0xff, 0xef, 0x5f, 0xfb, 0x37, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x80, 0xa3, 0x3c,
+ 0xa1, 0x10, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
diff --git a/x/gov/types/v1/tx.pb.go b/x/gov/types/v1/tx.pb.go
index 8d307f7da25c..2aaafca74478 100644
--- a/x/gov/types/v1/tx.pb.go
+++ b/x/gov/types/v1/tx.pb.go
@@ -1195,100 +1195,100 @@ func init() {
func init() { proto.RegisterFile("cosmos/gov/v1/tx.proto", fileDescriptor_9ff8f4a63b6fc9a9) }
var fileDescriptor_9ff8f4a63b6fc9a9 = []byte{
- // 1480 bytes of a gzipped FileDescriptorProto
+ // 1481 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x6f, 0x1b, 0x45,
0x14, 0xcf, 0xc6, 0x89, 0xed, 0x4c, 0xdc, 0xa4, 0xd9, 0xb8, 0xc9, 0x66, 0x9b, 0xda, 0xee, 0x16,
0xa8, 0x49, 0xf1, 0x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x44, 0x4f, 0xc3, 0x88, 0x23, 0x37, 0x4a, 0xfc, 0xd7, 0x1c, 0x58, 0x1d, 0x3b,
+ 0x64, 0xe4, 0x51, 0x2d, 0x17, 0x6d, 0x2f, 0x5e, 0x7c, 0x3e, 0x7b, 0x2f, 0xbb, 0xe3, 0x7b, 0xfd,
+ 0x42, 0x2a, 0x37, 0xf0, 0x50, 0xf8, 0xcf, 0xc1, 0x62, 0x14, 0x13, 0xbe, 0x3c, 0x0a, 0xe1, 0x21,
+ 0x33, 0xb1, 0x70, 0x24, 0xb3, 0x31, 0xc7, 0xdf, 0x01, 0x49, 0x8f, 0x8f, 0xc4, 0xa8, 0xa2, 0x1c,
+ 0x9d, 0x28, 0x8d, 0xd6, 0x8d, 0x8e, 0x2e, 0x4e, 0x7f, 0x41, 0xa6, 0x68, 0x75, 0xe3, 0xc1, 0xd3,
+ 0x0c, 0xf7, 0xf0, 0x69, 0x86, 0xfb, 0xfd, 0x69, 0x86, 0xbb, 0xff, 0x2c, 0x33, 0xf1, 0xf0, 0x59,
+ 0x66, 0xe2, 0xb7, 0x67, 0x99, 0x89, 0x8f, 0x4f, 0x3a, 0x51, 0xb1, 0x76, 0x57, 0x36, 0x10, 0x5b,
+ 0xe8, 0xe8, 0x54, 0x2e, 0x76, 0xcb, 0x5b, 0x71, 0x4a, 0x69, 0xe7, 0xff, 0x09, 0x00, 0x00, 0xff,
+ 0xff, 0x7b, 0xac, 0x54, 0xba, 0x09, 0x12, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
diff --git a/x/group/client/cli/tx_test.go b/x/group/client/cli/tx_test.go
index d820242113c4..938d57014932 100644
--- a/x/group/client/cli/tx_test.go
+++ b/x/group/client/cli/tx_test.go
@@ -7,7 +7,7 @@ import (
"io"
"testing"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
rpcclientmock "github.com/cometbft/cometbft/rpc/client/mock"
"github.com/stretchr/testify/suite"
diff --git a/x/group/go.mod b/x/group/go.mod
index fe55e321ad64..ce0ad4f7500b 100644
--- a/x/group/go.mod
+++ b/x/group/go.mod
@@ -20,6 +20,7 @@ require (
cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000
github.com/cockroachdb/apd/v2 v2.0.2
github.com/cometbft/cometbft v1.0.0-alpha.2.0.20240530055211-ae27f7eb3c08
+ github.com/cometbft/cometbft/api v1.0.0-rc.1
github.com/cosmos/cosmos-db v1.0.2
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.51.0
@@ -43,6 +44,7 @@ require (
cosmossdk.io/collections v0.4.0 // indirect
cosmossdk.io/core/testing v0.0.0-00010101000000-000000000000 // indirect
cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5 // indirect
+ cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337 // indirect
cosmossdk.io/x/tx v0.13.3 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
@@ -61,7 +63,6 @@ require (
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cometbft/cometbft-db v0.12.0 // indirect
- github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/crypto v0.0.0-20240309083813-82ed2537802e // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
diff --git a/x/group/go.sum b/x/group/go.sum
index d9cc54575ff2..c4d6d9369dfe 100644
--- a/x/group/go.sum
+++ b/x/group/go.sum
@@ -12,6 +12,8 @@ cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc h1:R9O9d75e0qZYUsVV0zzi+
cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc/go.mod h1:amTTatOUV3u1PsKmNb87z6/galCxrRbz9kRdJkL0DyU=
cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5 h1:eb0kcGyaYHSS0do7+MIWg7UKlskSH01biRNENbm/zDA=
cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5/go.mod h1:drzY4oVisyWvSgpsM7ccQ7IX3efMuVIvd9Eij1Gm/6o=
+cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337 h1:GuBrfHsK3RD5vlD4DuBz3DXslR6VlnzrYmHOC3L679Q=
+cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337/go.mod h1:PhLn1pMBilyRC4GfRkoYhm+XVAYhF4adVrzut8AdpJI=
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs=
diff --git a/x/group/keeper/msg_server_test.go b/x/group/keeper/msg_server_test.go
index fed87820bf99..20eb8a7b184b 100644
--- a/x/group/keeper/msg_server_test.go
+++ b/x/group/keeper/msg_server_test.go
@@ -8,7 +8,7 @@ import (
"strings"
"time"
- abci "github.com/cometbft/cometbft/abci/types"
+ abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
"github.com/golang/mock/gomock"
"cosmossdk.io/core/header"
diff --git a/x/mint/CHANGELOG.md b/x/mint/CHANGELOG.md
index ad9b78b53ed1..014ac8759a9d 100644
--- a/x/mint/CHANGELOG.md
+++ b/x/mint/CHANGELOG.md
@@ -27,12 +27,14 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Features
-* [19896](https://github.com/cosmos/cosmos-sdk/pull/19896) Added a new max supply genesis param to existing params.
+* [#20363](https://github.com/cosmos/cosmos-sdk/pull/20363) Implemented epoched minting, configurable through `MintFn`. Now `MintFn` doesn't do any assumptions on how tokens are minted, users can define their own minting logic.
+* [#19896](https://github.com/cosmos/cosmos-sdk/pull/19896) Added a new max supply genesis param to existing params.
### Improvements
### API Breaking Changes
+* [#20363](https://github.com/cosmos/cosmos-sdk/pull/20363) Deprecated InflationCalculationFn in favor of MintFn, `keeper.DefaultMintFn` wrapper must be used in order to continue using it in `NewAppModule`. This is not breaking for depinject users, as both `MintFn` and `InflationCalculationFn` are accepted.
* [#19367](https://github.com/cosmos/cosmos-sdk/pull/19398) `appmodule.Environment` is received on the Keeper to get access to different application services
### Bug Fixes
diff --git a/x/mint/README.md b/x/mint/README.md
index ff2467d7542a..aac6d52ff686 100644
--- a/x/mint/README.md
+++ b/x/mint/README.md
@@ -6,10 +6,15 @@ sidebar_position: 1
## Contents
+* [Concepts](#concepts)
+ * [The Minting Mechanism](#the-minting-mechanism)
* [State](#state)
* [Minter](#minter)
* [Params](#params)
-* [Begin-Block](#begin-block)
+* [Epoch minting](#epoch-minting)
+ * [MintFn](#mintfn)
+* [Block based minting](#block-based-minting)
+ * [Default configuration](#default-configuration)
* [NextInflationRate](#nextinflationrate)
* [NextAnnualProvisions](#nextannualprovisions)
* [BlockProvision](#blockprovision)
@@ -51,12 +56,13 @@ It can be broken down in the following way:
### Minter
-The minter is a space for holding current inflation information.
+The minter is a space for holding current inflation information and any other data
+related to minting (in the `data` field)
* Minter: `0x00 -> ProtocolBuffer(minter)`
```protobuf reference
-https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/mint/v1beta1/mint.proto#L10-L24
+https://github.com/cosmos/cosmos-sdk/blob/ace7bca105a8d5363782cfd19c6f169b286cd3b2/x/mint/proto/cosmos/mint/v1beta1/mint.proto#L11-L29
```
### Params
@@ -72,11 +78,43 @@ A value of `0` indicates an unlimited supply.
https://github.com/cosmos/cosmos-sdk/blob/7068d0da52d954430054768b2c56aff44666933b/x/mint/proto/cosmos/mint/v1beta1/mint.proto#L26-L68
```
-## Begin-Block
+## Epoch minting
-Minting parameters are recalculated and inflation paid at the beginning of each block.
+In the latest release of x/mint, the minting logic has been refactored to allow for more flexibility in the minting process. The `InflationCalculationFn` has been deprecated in favor of `MintFn`. The `MintFn` function is passed to the `NewAppModule` function and is used to mint tokens on the configured epoch beginning. This change allows users to define their own minting logic and removes any assumptions on how tokens are minted.
-The minting logic in the `BeginBlocker` function provides an optional feature for controlling token minting based on the maximum allowable supply (MaxSupply). This feature allows users to adjust the minting process according to their specific requirements and use cases. However, it's important to note that the MaxSupply parameter is independent of the minting process and assumes that any adjustments to the total supply, including burning tokens, are handled by external modules.
+```mermaid
+flowchart LR
+ A[BeforeEpochStart] --> B[MintFn]
+
+ subgraph B["MintFn (user defined)"]
+ direction LR
+ C[Get x/staking info] --> D[Calculate Inflation]
+ D --> E[Mint Tokens]
+ end
+```
+
+### MintFn
+
+The `MintFn` function is called at the beginning of each epoch and is responsible for minting tokens. The function signature is as follows:
+
+```go
+type MintFn func(ctx context.Context, env appmodule.Environment, minter *Minter, epochId string, epochNumber int64) error
+```
+
+How this function mints tokens is defined by the app developers, meaning they can query state and perform any calculations they deem necessary. [This implementation](https://github.com/cosmos/cosmos-sdk/blob/ace7bca105a8d5363782cfd19c6f169b286cd3b2/simapp/mint_fn.go#L25) in SimApp contains examples of how to use `QueryRouterService` and the Minter's `data`.
+
+:::warning
+Note that BeginBlock will keep calling the MintFn for every block, so it is important to ensure that MintFn returns early if the epoch ID does not match the expected one.
+:::
+
+
+## Block based minting
+
+In addition to minting based on epoch, minting based on block is also possible. This is achieved through calling the `MintFn` in `BeginBlock` with an epochID and epochNumber of `"block"` and `-1`, respectively.
+
+### Default configuration
+
+If no `MintFn` is passed to the `NewAppModule` function, the minting logic defaults to block-based minting, corresponding to `mintKeeper.DefaultMintFn(types.DefaultInflationCalculationFn)`.
### Inflation rate calculation
@@ -95,8 +133,7 @@ type InflationCalculationFn func(ctx sdk.Context, minter Minter, params Params,
The target annual inflation rate is recalculated each block.
The inflation is also subject to a rate change (positive or negative)
depending on the distance from the desired ratio (67%). The maximum rate change
-possible is defined to be 13% per year, however, the annual inflation is capped
-as between 7% and 20%.
+possible is defined to be 5% per year, however, the annual inflation is capped between 0% and 5%.
```go
NextInflationRate(params Params, bondedRatio math.LegacyDec) (inflation math.LegacyDec) {
diff --git a/x/mint/depinject.go b/x/mint/depinject.go
index 556a7c4b7a81..4b430f0e8052 100644
--- a/x/mint/depinject.go
+++ b/x/mint/depinject.go
@@ -6,6 +6,7 @@ import (
"cosmossdk.io/depinject"
"cosmossdk.io/depinject/appconfig"
authtypes "cosmossdk.io/x/auth/types"
+ epochstypes "cosmossdk.io/x/epochs/types"
"cosmossdk.io/x/mint/keeper"
"cosmossdk.io/x/mint/types"
@@ -30,7 +31,8 @@ type ModuleInputs struct {
Config *modulev1.Module
Environment appmodule.Environment
Cdc codec.Codec
- InflationCalculationFn types.InflationCalculationFn `optional:"true"`
+ MintFn types.MintFn `optional:"true"`
+ InflationCalculationFn types.InflationCalculationFn `optional:"true"` // deprecated
AccountKeeper types.AccountKeeper
BankKeeper types.BankKeeper
@@ -42,6 +44,7 @@ type ModuleOutputs struct {
MintKeeper keeper.Keeper
Module appmodule.AppModule
+ EpochHooks epochstypes.EpochHooksWrapper
}
func ProvideModule(in ModuleInputs) ModuleOutputs {
@@ -71,8 +74,21 @@ func ProvideModule(in ModuleInputs) ModuleOutputs {
as,
)
- // when no inflation calculation function is provided it will use the default types.DefaultInflationCalculationFn
- m := NewAppModule(in.Cdc, k, in.AccountKeeper, in.InflationCalculationFn)
+ if in.MintFn != nil && in.InflationCalculationFn != nil {
+ panic("MintFn and InflationCalculationFn cannot both be set")
+ }
+
+ // if no mintFn is provided, use the default minting function
+ if in.MintFn == nil {
+ // if no inflationCalculationFn is provided, use the default inflation calculation function
+ if in.InflationCalculationFn == nil {
+ in.InflationCalculationFn = types.DefaultInflationCalculationFn
+ }
+
+ in.MintFn = k.DefaultMintFn(in.InflationCalculationFn)
+ }
+
+ m := NewAppModule(in.Cdc, k, in.AccountKeeper, in.MintFn)
- return ModuleOutputs{MintKeeper: k, Module: m}
+ return ModuleOutputs{MintKeeper: k, Module: m, EpochHooks: epochstypes.EpochHooksWrapper{EpochHooks: m}}
}
diff --git a/x/mint/epoch_hooks.go b/x/mint/epoch_hooks.go
new file mode 100644
index 000000000000..28ae5a26b195
--- /dev/null
+++ b/x/mint/epoch_hooks.go
@@ -0,0 +1,34 @@
+package mint
+
+import (
+ "context"
+
+ epochstypes "cosmossdk.io/x/epochs/types"
+)
+
+var _ epochstypes.EpochHooks = AppModule{}
+
+// GetModuleName implements types.EpochHooks.
+func (am AppModule) GetModuleName() string {
+ return am.Name()
+}
+
+// BeforeEpochStart calls the mint function.
+func (am AppModule) BeforeEpochStart(ctx context.Context, epochIdentifier string, epochNumber int64) error {
+ minter, err := am.keeper.Minter.Get(ctx)
+ if err != nil {
+ return err
+ }
+
+ err = am.mintFn(ctx, am.keeper.Environment, &minter, epochIdentifier, epochNumber)
+ if err != nil {
+ return err
+ }
+
+ return am.keeper.Minter.Set(ctx, minter)
+}
+
+// AfterEpochEnd is a noop
+func (am AppModule) AfterEpochEnd(ctx context.Context, epochIdentifier string, epochNumber int64) error {
+ return nil
+}
diff --git a/x/mint/go.mod b/x/mint/go.mod
index e1f4b0861275..9c7c08e552eb 100644
--- a/x/mint/go.mod
+++ b/x/mint/go.mod
@@ -12,6 +12,7 @@ require (
cosmossdk.io/math v1.3.0
cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc
cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91 // indirect
+ cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.51.0
diff --git a/x/mint/go.sum b/x/mint/go.sum
index ca4e47166b63..3d8b9af73759 100644
--- a/x/mint/go.sum
+++ b/x/mint/go.sum
@@ -14,6 +14,8 @@ cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc h1:R9O9d75e0qZYUsVV0zzi+
cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc/go.mod h1:amTTatOUV3u1PsKmNb87z6/galCxrRbz9kRdJkL0DyU=
cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5 h1:eb0kcGyaYHSS0do7+MIWg7UKlskSH01biRNENbm/zDA=
cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5/go.mod h1:drzY4oVisyWvSgpsM7ccQ7IX3efMuVIvd9Eij1Gm/6o=
+cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337 h1:GuBrfHsK3RD5vlD4DuBz3DXslR6VlnzrYmHOC3L679Q=
+cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337/go.mod h1:PhLn1pMBilyRC4GfRkoYhm+XVAYhF4adVrzut8AdpJI=
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs=
diff --git a/x/mint/keeper/abci.go b/x/mint/keeper/abci.go
index 9c8ec7261262..8fbeb4050f83 100644
--- a/x/mint/keeper/abci.go
+++ b/x/mint/keeper/abci.go
@@ -3,15 +3,13 @@ package keeper
import (
"context"
- "cosmossdk.io/core/event"
"cosmossdk.io/x/mint/types"
"github.com/cosmos/cosmos-sdk/telemetry"
- sdk "github.com/cosmos/cosmos-sdk/types"
)
// BeginBlocker mints new tokens for the previous block.
-func (k Keeper) BeginBlocker(ctx context.Context, ic types.InflationCalculationFn) error {
+func (k Keeper) BeginBlocker(ctx context.Context, mintFn types.MintFn) error {
defer telemetry.ModuleMeasureSince(types.ModuleName, telemetry.Now(), telemetry.MetricKeyBeginBlocker)
// fetch stored minter & params
@@ -20,76 +18,12 @@ func (k Keeper) BeginBlocker(ctx context.Context, ic types.InflationCalculationF
return err
}
- params, err := k.Params.Get(ctx)
+ // we pass -1 as epoch number to indicate that this is not an epoch minting,
+ // but a regular block minting. Same with epoch id "block".
+ err = mintFn(ctx, k.Environment, &minter, "block", -1)
if err != nil {
return err
}
- // recalculate inflation rate
- totalStakingSupply, err := k.StakingTokenSupply(ctx)
- if err != nil {
- return err
- }
-
- bondedRatio, err := k.BondedRatio(ctx)
- if err != nil {
- return err
- }
-
- // update minter's inflation and annual provisions
- minter.Inflation = ic(ctx, minter, params, bondedRatio)
- minter.AnnualProvisions = minter.NextAnnualProvisions(params, totalStakingSupply)
- if err = k.Minter.Set(ctx, minter); err != nil {
- return err
- }
-
- // calculate minted coins
- mintedCoin := minter.BlockProvision(params)
- mintedCoins := sdk.NewCoins(mintedCoin)
-
- maxSupply := params.MaxSupply
- totalSupply := k.bankKeeper.GetSupply(ctx, params.MintDenom).Amount // fetch total supply from the bank module
-
- // if maxSupply is not infinite, check against max_supply parameter
- if !maxSupply.IsZero() {
- if totalSupply.Add(mintedCoins.AmountOf(params.MintDenom)).GT(maxSupply) {
- // calculate the difference between maxSupply and totalSupply
- diff := maxSupply.Sub(totalSupply)
- // mint the difference
- diffCoin := sdk.NewCoin(params.MintDenom, diff)
- diffCoins := sdk.NewCoins(diffCoin)
-
- // mint coins
- if err := k.MintCoins(ctx, diffCoins); err != nil {
- return err
- }
- mintedCoins = diffCoins
- }
- }
-
- // mint coins if maxSupply is infinite or total staking supply is less than maxSupply
- if maxSupply.IsZero() || totalSupply.Add(mintedCoins.AmountOf(params.MintDenom)).LT(maxSupply) {
- // mint coins
- if err := k.MintCoins(ctx, mintedCoins); err != nil {
- return err
- }
- }
-
- // send the minted coins to the fee collector account
- err = k.AddCollectedFees(ctx, mintedCoins)
- if err != nil {
- return err
- }
-
- if mintedCoin.Amount.IsInt64() {
- defer telemetry.ModuleSetGauge(types.ModuleName, float32(mintedCoin.Amount.Int64()), "minted_tokens")
- }
-
- return k.EventService.EventManager(ctx).EmitKV(
- types.EventTypeMint,
- event.NewAttribute(types.AttributeKeyBondedRatio, bondedRatio.String()),
- event.NewAttribute(types.AttributeKeyInflation, minter.Inflation.String()),
- event.NewAttribute(types.AttributeKeyAnnualProvisions, minter.AnnualProvisions.String()),
- event.NewAttribute(sdk.AttributeKeyAmount, mintedCoin.Amount.String()),
- )
+ return k.Minter.Set(ctx, minter)
}
diff --git a/x/mint/keeper/keeper.go b/x/mint/keeper/keeper.go
index f7306a131bea..3f31a3ff3252 100644
--- a/x/mint/keeper/keeper.go
+++ b/x/mint/keeper/keeper.go
@@ -6,11 +6,13 @@ import (
"cosmossdk.io/collections"
"cosmossdk.io/core/appmodule"
+ "cosmossdk.io/core/event"
"cosmossdk.io/log"
"cosmossdk.io/math"
"cosmossdk.io/x/mint/types"
"github.com/cosmos/cosmos-sdk/codec"
+ "github.com/cosmos/cosmos-sdk/telemetry"
sdk "github.com/cosmos/cosmos-sdk/types"
)
@@ -101,3 +103,85 @@ func (k Keeper) MintCoins(ctx context.Context, newCoins sdk.Coins) error {
func (k Keeper) AddCollectedFees(ctx context.Context, fees sdk.Coins) error {
return k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, k.feeCollectorName, fees)
}
+
+func (k Keeper) DefaultMintFn(ic types.InflationCalculationFn) types.MintFn {
+ return func(ctx context.Context, env appmodule.Environment, minter *types.Minter, epochId string, epochNumber int64) error {
+ // the default mint function is called every block, so we only check if epochId is "block" which is
+ // a special value to indicate that this is not an epoch minting, but a regular block minting.
+ if epochId != "block" {
+ return nil
+ }
+
+ stakingTokenSupply, err := k.StakingTokenSupply(ctx)
+ if err != nil {
+ return err
+ }
+
+ bondedRatio, err := k.BondedRatio(ctx)
+ if err != nil {
+ return err
+ }
+
+ params, err := k.Params.Get(ctx)
+ if err != nil {
+ return err
+ }
+
+ minter.Inflation = ic(ctx, *minter, params, bondedRatio)
+ minter.AnnualProvisions = minter.NextAnnualProvisions(params, stakingTokenSupply)
+
+ mintedCoin := minter.BlockProvision(params)
+ mintedCoins := sdk.NewCoins(mintedCoin)
+ maxSupply := params.MaxSupply
+ totalSupply := stakingTokenSupply
+
+ // if maxSupply is not infinite, check against max_supply parameter
+ if !maxSupply.IsZero() {
+ if totalSupply.Add(mintedCoins.AmountOf(params.MintDenom)).GT(maxSupply) {
+ // calculate the difference between maxSupply and totalSupply
+ diff := maxSupply.Sub(totalSupply)
+ if diff.LTE(math.ZeroInt()) {
+ k.logger.Info("max supply reached, no new tokens will be minted")
+ return nil
+ }
+
+ // mint the difference
+ diffCoin := sdk.NewCoin(params.MintDenom, diff)
+ diffCoins := sdk.NewCoins(diffCoin)
+
+ // mint coins
+ if err := k.MintCoins(ctx, diffCoins); err != nil {
+ return err
+ }
+ mintedCoins = diffCoins
+ }
+ }
+
+ // mint coins if maxSupply is infinite or total staking supply is less than maxSupply
+ if maxSupply.IsZero() || totalSupply.Add(mintedCoins.AmountOf(params.MintDenom)).LT(maxSupply) {
+ // mint coins
+ if err := k.MintCoins(ctx, mintedCoins); err != nil {
+ return err
+ }
+ }
+
+ // send the minted coins to the fee collector account
+ // TODO: figure out a better way to do this
+ err = k.AddCollectedFees(ctx, mintedCoins)
+ if err != nil {
+ return err
+ }
+
+ if mintedCoin.Amount.IsInt64() {
+ defer telemetry.ModuleSetGauge(types.ModuleName, float32(mintedCoin.Amount.Int64()), "minted_tokens")
+ }
+
+ return env.EventService.EventManager(ctx).EmitKV(
+ types.EventTypeMint,
+ event.NewAttribute(types.AttributeKeyBondedRatio, bondedRatio.String()),
+ event.NewAttribute(types.AttributeKeyInflation, minter.Inflation.String()),
+ event.NewAttribute(types.AttributeKeyAnnualProvisions, minter.AnnualProvisions.String()),
+ event.NewAttribute(sdk.AttributeKeyAmount, mintedCoin.Amount.String()),
+ )
+ }
+}
diff --git a/x/mint/keeper/keeper_test.go b/x/mint/keeper/keeper_test.go
index e5ddd1b0d469..971ce5c830b1 100644
--- a/x/mint/keeper/keeper_test.go
+++ b/x/mint/keeper/keeper_test.go
@@ -24,7 +24,7 @@ import (
const govModuleNameStr = "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn"
-type IntegrationTestSuite struct {
+type KeeperTestSuite struct {
suite.Suite
mintKeeper keeper.Keeper
@@ -35,10 +35,10 @@ type IntegrationTestSuite struct {
}
func TestKeeperTestSuite(t *testing.T) {
- suite.Run(t, new(IntegrationTestSuite))
+ suite.Run(t, new(KeeperTestSuite))
}
-func (s *IntegrationTestSuite) SetupTest() {
+func (s *KeeperTestSuite) SetupTest() {
encCfg := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}, mint.AppModule{})
key := storetypes.NewKVStoreKey(types.StoreKey)
storeService := runtime.NewKVStoreService(key)
@@ -67,31 +67,106 @@ func (s *IntegrationTestSuite) SetupTest() {
s.bankKeeper = bankKeeper
err := s.mintKeeper.Params.Set(s.ctx, types.DefaultParams())
- s.Require().NoError(err)
+ s.NoError(err)
- s.Require().NoError(s.mintKeeper.Minter.Set(s.ctx, types.DefaultInitialMinter()))
+ s.NoError(s.mintKeeper.Minter.Set(s.ctx, types.DefaultInitialMinter()))
s.msgServer = keeper.NewMsgServerImpl(s.mintKeeper)
}
-func (s *IntegrationTestSuite) TestAliasFunctions() {
+func (s *KeeperTestSuite) TestAliasFunctions() {
stakingTokenSupply := math.NewIntFromUint64(100000000000)
s.stakingKeeper.EXPECT().StakingTokenSupply(s.ctx).Return(stakingTokenSupply, nil)
tokenSupply, err := s.mintKeeper.StakingTokenSupply(s.ctx)
- s.Require().NoError(err)
- s.Require().Equal(tokenSupply, stakingTokenSupply)
+ s.NoError(err)
+ s.Equal(tokenSupply, stakingTokenSupply)
bondedRatio := math.LegacyNewDecWithPrec(15, 2)
s.stakingKeeper.EXPECT().BondedRatio(s.ctx).Return(bondedRatio, nil)
ratio, err := s.mintKeeper.BondedRatio(s.ctx)
- s.Require().NoError(err)
- s.Require().Equal(ratio, bondedRatio)
+ s.NoError(err)
+ s.Equal(ratio, bondedRatio)
coins := sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(1000000)))
s.bankKeeper.EXPECT().MintCoins(s.ctx, types.ModuleName, coins).Return(nil)
- s.Require().Equal(s.mintKeeper.MintCoins(s.ctx, sdk.NewCoins()), nil)
- s.Require().Nil(s.mintKeeper.MintCoins(s.ctx, coins))
+ s.Equal(s.mintKeeper.MintCoins(s.ctx, sdk.NewCoins()), nil)
+ s.Nil(s.mintKeeper.MintCoins(s.ctx, coins))
fees := sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(1000)))
s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(s.ctx, types.ModuleName, authtypes.FeeCollectorName, fees).Return(nil)
- s.Require().Nil(s.mintKeeper.AddCollectedFees(s.ctx, fees))
+ s.Nil(s.mintKeeper.AddCollectedFees(s.ctx, fees))
+}
+
+func (s *KeeperTestSuite) TestDefaultMintFn() {
+ s.stakingKeeper.EXPECT().StakingTokenSupply(s.ctx).Return(math.NewIntFromUint64(100000000000), nil).AnyTimes()
+ bondedRatio := math.LegacyNewDecWithPrec(15, 2)
+ s.stakingKeeper.EXPECT().BondedRatio(s.ctx).Return(bondedRatio, nil).AnyTimes()
+ s.bankKeeper.EXPECT().MintCoins(s.ctx, types.ModuleName, sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(792)))).Return(nil)
+ s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(s.ctx, types.ModuleName, authtypes.FeeCollectorName, gomock.Any()).Return(nil)
+
+ minter, err := s.mintKeeper.Minter.Get(s.ctx)
+ s.NoError(err)
+
+ err = s.mintKeeper.DefaultMintFn(types.DefaultInflationCalculationFn)(s.ctx, s.mintKeeper.Environment, &minter, "block", 0)
+ s.NoError(err)
+
+ // set a maxsupply and call again
+ params, err := s.mintKeeper.Params.Get(s.ctx)
+ s.NoError(err)
+ params.MaxSupply = math.NewInt(10000000000)
+ err = s.mintKeeper.Params.Set(s.ctx, params)
+ s.NoError(err)
+
+ err = s.mintKeeper.DefaultMintFn(types.DefaultInflationCalculationFn)(s.ctx, s.mintKeeper.Environment, &minter, "block", 0)
+ s.NoError(err)
+
+ // modify max supply to be almost reached
+ // we tried to mint 2059stake but we only get to mint 2000stake
+ params, err = s.mintKeeper.Params.Get(s.ctx)
+ s.NoError(err)
+ params.MaxSupply = math.NewInt(100000000000 + 2000)
+ err = s.mintKeeper.Params.Set(s.ctx, params)
+ s.NoError(err)
+
+ s.bankKeeper.EXPECT().MintCoins(s.ctx, types.ModuleName, sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(792)))).Return(nil)
+ s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(s.ctx, types.ModuleName, authtypes.FeeCollectorName, gomock.Any()).Return(nil)
+
+ err = s.mintKeeper.DefaultMintFn(types.DefaultInflationCalculationFn)(s.ctx, s.mintKeeper.Environment, &minter, "block", 0)
+ s.NoError(err)
+}
+
+func (s *KeeperTestSuite) TestBeginBlocker() {
+ s.stakingKeeper.EXPECT().StakingTokenSupply(s.ctx).Return(math.NewIntFromUint64(100000000000), nil).AnyTimes()
+ bondedRatio := math.LegacyNewDecWithPrec(15, 2)
+ s.stakingKeeper.EXPECT().BondedRatio(s.ctx).Return(bondedRatio, nil).AnyTimes()
+ s.bankKeeper.EXPECT().MintCoins(s.ctx, types.ModuleName, sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(792)))).Return(nil)
+ s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(s.ctx, types.ModuleName, authtypes.FeeCollectorName, gomock.Any()).Return(nil)
+
+ // get minter (it should get modified aftwerwards)
+ minter, err := s.mintKeeper.Minter.Get(s.ctx)
+ s.NoError(err)
+
+ err = s.mintKeeper.BeginBlocker(s.ctx, s.mintKeeper.DefaultMintFn(types.DefaultInflationCalculationFn))
+ s.NoError(err)
+
+ // get minter again and compare
+ newMinter, err := s.mintKeeper.Minter.Get(s.ctx)
+ s.NoError(err)
+ s.NotEqual(minter, newMinter)
+}
+
+func (s *KeeperTestSuite) TestMigrator() {
+ m := keeper.NewMigrator(s.mintKeeper)
+ s.NoError(m.Migrate1to2(s.ctx)) // just to get the coverage up
+
+ // set max supply to one and migrate (should get it to zero)
+ params, err := s.mintKeeper.Params.Get(s.ctx)
+ s.NoError(err)
+ params.MaxSupply = math.OneInt()
+ s.NoError(s.mintKeeper.Params.Set(s.ctx, params))
+
+ s.NoError(m.Migrate2to3(s.ctx))
+
+ newParams, err := s.mintKeeper.Params.Get(s.ctx)
+ s.NoError(err)
+ s.Equal(math.ZeroInt(), newParams.MaxSupply)
}
diff --git a/x/mint/keeper/msg_server_test.go b/x/mint/keeper/msg_server_test.go
index a999150207f0..10423e26e2c6 100644
--- a/x/mint/keeper/msg_server_test.go
+++ b/x/mint/keeper/msg_server_test.go
@@ -7,7 +7,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
-func (s *IntegrationTestSuite) TestUpdateParams() {
+func (s *KeeperTestSuite) TestUpdateParams() {
testCases := []struct {
name string
request *types.MsgUpdateParams
diff --git a/x/mint/module.go b/x/mint/module.go
index 8c0d69bce55a..990f281edc4a 100644
--- a/x/mint/module.go
+++ b/x/mint/module.go
@@ -44,28 +44,31 @@ type AppModule struct {
keeper keeper.Keeper
authKeeper types.AccountKeeper
- // inflationCalculator is used to calculate the inflation rate during BeginBlock.
- // If inflationCalculator is nil, the default inflation calculation logic is used.
- inflationCalculator types.InflationCalculationFn
+ // mintFn is used to mint new coins during BeginBlock. This function is in charge of
+ // minting new coins based on arbitrary logic, previously done through InflationCalculationFn.
+ // If mintFn is nil, the default minting logic is used.
+ mintFn types.MintFn
}
// NewAppModule creates a new AppModule object.
-// If the InflationCalculationFn argument is nil, then the SDK's default inflation function will be used.
+// If the mintFn argument is nil, then the SDK's default minting function will be used.
func NewAppModule(
cdc codec.Codec,
keeper keeper.Keeper,
ak types.AccountKeeper,
- ic types.InflationCalculationFn,
+ mintFn types.MintFn,
) AppModule {
- if ic == nil {
- ic = types.DefaultInflationCalculationFn
+ // If mintFn is nil, use the default minting function.
+ // This check also happens in ProvideModule when used with depinject.
+ if mintFn == nil {
+ mintFn = keeper.DefaultMintFn(types.DefaultInflationCalculationFn)
}
return AppModule{
- cdc: cdc,
- keeper: keeper,
- authKeeper: ak,
- inflationCalculator: ic,
+ cdc: cdc,
+ keeper: keeper,
+ authKeeper: ak,
+ mintFn: mintFn,
}
}
@@ -157,7 +160,7 @@ func (AppModule) ConsensusVersion() uint64 { return ConsensusVersion }
// BeginBlock returns the begin blocker for the mint module.
func (am AppModule) BeginBlock(ctx context.Context) error {
- return am.keeper.BeginBlocker(ctx, am.inflationCalculator)
+ return am.keeper.BeginBlocker(ctx, am.mintFn)
}
// AppModuleSimulation functions
diff --git a/x/mint/module_test.go b/x/mint/module_test.go
new file mode 100644
index 000000000000..9dc9e75e2ada
--- /dev/null
+++ b/x/mint/module_test.go
@@ -0,0 +1,92 @@
+package mint_test
+
+import (
+ "testing"
+
+ "github.com/golang/mock/gomock"
+ "github.com/stretchr/testify/suite"
+
+ "cosmossdk.io/log"
+ "cosmossdk.io/math"
+ storetypes "cosmossdk.io/store/types"
+ authtypes "cosmossdk.io/x/auth/types"
+ "cosmossdk.io/x/mint"
+ "cosmossdk.io/x/mint/keeper"
+ minttestutil "cosmossdk.io/x/mint/testutil"
+ "cosmossdk.io/x/mint/types"
+
+ codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
+ "github.com/cosmos/cosmos-sdk/runtime"
+ "github.com/cosmos/cosmos-sdk/testutil"
+ sdk "github.com/cosmos/cosmos-sdk/types"
+ moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
+)
+
+const govModuleNameStr = "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn"
+
+type ModuleTestSuite struct {
+ suite.Suite
+
+ mintKeeper keeper.Keeper
+ ctx sdk.Context
+ msgServer types.MsgServer
+ stakingKeeper *minttestutil.MockStakingKeeper
+ bankKeeper *minttestutil.MockBankKeeper
+
+ appmodule mint.AppModule
+}
+
+func TestKeeperTestSuite(t *testing.T) {
+ suite.Run(t, new(ModuleTestSuite))
+}
+
+func (s *ModuleTestSuite) SetupTest() {
+ encCfg := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}, mint.AppModule{})
+ key := storetypes.NewKVStoreKey(types.StoreKey)
+ storeService := runtime.NewKVStoreService(key)
+ env := runtime.NewEnvironment(storeService, log.NewNopLogger())
+ testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test"))
+ s.ctx = testCtx.Ctx
+
+ // gomock initializations
+ ctrl := gomock.NewController(s.T())
+ accountKeeper := minttestutil.NewMockAccountKeeper(ctrl)
+ bankKeeper := minttestutil.NewMockBankKeeper(ctrl)
+ stakingKeeper := minttestutil.NewMockStakingKeeper(ctrl)
+
+ accountKeeper.EXPECT().GetModuleAddress(types.ModuleName).Return(sdk.AccAddress{})
+
+ s.mintKeeper = keeper.NewKeeper(
+ encCfg.Codec,
+ env,
+ stakingKeeper,
+ accountKeeper,
+ bankKeeper,
+ authtypes.FeeCollectorName,
+ govModuleNameStr,
+ )
+ s.stakingKeeper = stakingKeeper
+ s.bankKeeper = bankKeeper
+
+ err := s.mintKeeper.Params.Set(s.ctx, types.DefaultParams())
+ s.NoError(err)
+
+ s.NoError(s.mintKeeper.Minter.Set(s.ctx, types.DefaultInitialMinter()))
+ s.msgServer = keeper.NewMsgServerImpl(s.mintKeeper)
+
+ s.appmodule = mint.NewAppModule(encCfg.Codec, s.mintKeeper, accountKeeper, s.mintKeeper.DefaultMintFn(types.DefaultInflationCalculationFn))
+}
+
+func (s *ModuleTestSuite) TestEpochHooks() {
+ s.stakingKeeper.EXPECT().StakingTokenSupply(s.ctx).Return(math.NewIntFromUint64(100000000000), nil).AnyTimes()
+ bondedRatio := math.LegacyNewDecWithPrec(15, 2)
+ s.stakingKeeper.EXPECT().BondedRatio(s.ctx).Return(bondedRatio, nil).AnyTimes()
+ s.bankKeeper.EXPECT().MintCoins(s.ctx, types.ModuleName, sdk.NewCoins(sdk.NewCoin("stake", math.NewInt(792)))).Return(nil)
+ s.bankKeeper.EXPECT().SendCoinsFromModuleToModule(s.ctx, types.ModuleName, authtypes.FeeCollectorName, gomock.Any()).Return(nil)
+
+ err := s.appmodule.BeforeEpochStart(s.ctx, "block", -1)
+ s.NoError(err)
+
+ err = s.appmodule.AfterEpochEnd(s.ctx, "epochIdentifier", 1) // just to get coverage up
+ s.NoError(err)
+}
diff --git a/x/mint/proto/cosmos/mint/v1beta1/mint.proto b/x/mint/proto/cosmos/mint/v1beta1/mint.proto
index da2bfcbc8db6..d7b577ec617c 100644
--- a/x/mint/proto/cosmos/mint/v1beta1/mint.proto
+++ b/x/mint/proto/cosmos/mint/v1beta1/mint.proto
@@ -6,6 +6,7 @@ option go_package = "cosmossdk.io/x/mint/types";
import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "amino/amino.proto";
+import "google/protobuf/any.proto";
// Minter represents the minting state.
message Minter {
@@ -21,6 +22,10 @@ message Minter {
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
];
+
+ // data is any custom data that the user might want to put in the minter, to
+ // be used in the minting process.
+ bytes data = 3;
}
// Params defines the parameters for the x/mint module.
diff --git a/x/mint/types/genesis.go b/x/mint/types/genesis.go
index 6ed2f38a18ec..44e77bb4cc4c 100644
--- a/x/mint/types/genesis.go
+++ b/x/mint/types/genesis.go
@@ -3,6 +3,7 @@ package types
import (
"context"
+ "cosmossdk.io/core/appmodule"
"cosmossdk.io/math"
)
@@ -11,9 +12,14 @@ import (
// bondedRatio and returns the newly calculated inflation rate.
// It can be used to specify a custom inflation calculation logic, instead of relying on the
// default logic provided by the sdk.
+// Deprecated: use MintFn instead.
type InflationCalculationFn func(ctx context.Context, minter Minter, params Params, bondedRatio math.LegacyDec) math.LegacyDec
+// MintFn defines the function that needs to be implemented in order to customize the minting process.
+type MintFn func(ctx context.Context, env appmodule.Environment, minter *Minter, epochId string, epochNumber int64) error
+
// DefaultInflationCalculationFn is the default function used to calculate inflation.
+// Deprecated: use DefaultMintFn instead.
func DefaultInflationCalculationFn(_ context.Context, minter Minter, params Params, bondedRatio math.LegacyDec) math.LegacyDec {
return minter.NextInflationRate(params, bondedRatio)
}
diff --git a/x/mint/types/genesis_test.go b/x/mint/types/genesis_test.go
new file mode 100644
index 000000000000..950c2ca43432
--- /dev/null
+++ b/x/mint/types/genesis_test.go
@@ -0,0 +1,21 @@
+package types
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/require"
+)
+
+func TestGenesis(t *testing.T) {
+ minter := DefaultInitialMinter()
+ params := DefaultParams()
+
+ gs := NewGenesisState(minter, params)
+ err := ValidateGenesis(*gs)
+ require.NoError(t, err)
+
+ defaultGs := DefaultGenesisState()
+ err = ValidateGenesis(*defaultGs)
+ require.NoError(t, err)
+ require.Equal(t, gs, defaultGs)
+}
diff --git a/x/mint/types/mint.pb.go b/x/mint/types/mint.pb.go
index 7ce197d326ab..35cd40591a27 100644
--- a/x/mint/types/mint.pb.go
+++ b/x/mint/types/mint.pb.go
@@ -10,6 +10,7 @@ import (
_ "github.com/cosmos/cosmos-sdk/types/tx/amino"
_ "github.com/cosmos/gogoproto/gogoproto"
proto "github.com/cosmos/gogoproto/proto"
+ _ "github.com/cosmos/gogoproto/types/any"
io "io"
math "math"
math_bits "math/bits"
@@ -32,6 +33,9 @@ type Minter struct {
Inflation cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=inflation,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"inflation"`
// current annual expected provisions
AnnualProvisions cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=annual_provisions,json=annualProvisions,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"annual_provisions"`
+ // data is any custom data that the user might want to put in the minter, to
+ // be used in the minting process.
+ Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}
func (m *Minter) Reset() { *m = Minter{} }
@@ -67,6 +71,13 @@ func (m *Minter) XXX_DiscardUnknown() {
var xxx_messageInfo_Minter proto.InternalMessageInfo
+func (m *Minter) GetData() []byte {
+ if m != nil {
+ return m.Data
+ }
+ return nil
+}
+
// Params defines the parameters for the x/mint module.
type Params struct {
// type of coin to mint
@@ -140,36 +151,38 @@ func init() {
func init() { proto.RegisterFile("cosmos/mint/v1beta1/mint.proto", fileDescriptor_2df116d183c1e223) }
var fileDescriptor_2df116d183c1e223 = []byte{
- // 461 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x4f, 0x6b, 0xd4, 0x40,
- 0x18, 0xc6, 0x37, 0xba, 0xae, 0xec, 0x68, 0xd1, 0x4e, 0x2d, 0x4c, 0x2b, 0x4d, 0x4b, 0x0f, 0x52,
- 0x2a, 0xdd, 0xb0, 0x14, 0x3c, 0x78, 0x5c, 0xf7, 0x52, 0xb1, 0xb8, 0xc4, 0x83, 0xa8, 0xe0, 0xf0,
- 0x6e, 0x32, 0xa6, 0xe3, 0x66, 0x66, 0xc2, 0xcc, 0xb4, 0x64, 0xbf, 0x82, 0x27, 0x3f, 0x86, 0xc7,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A []byte, err error) {
@@ -192,6 +205,13 @@ func (m *Minter) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if len(m.Data) > 0 {
+ i -= len(m.Data)
+ copy(dAtA[i:], m.Data)
+ i = encodeVarintMint(dAtA, i, uint64(len(m.Data)))
+ i--
+ dAtA[i] = 0x1a
+ }
{
size := m.AnnualProvisions.Size()
i -= size
@@ -321,6 +341,10 @@ func (m *Minter) Size() (n int) {
n += 1 + l + sovMint(uint64(l))
l = m.AnnualProvisions.Size()
n += 1 + l + sovMint(uint64(l))
+ l = len(m.Data)
+ if l > 0 {
+ n += 1 + l + sovMint(uint64(l))
+ }
return n
}
@@ -453,6 +477,40 @@ func (m *Minter) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
+ }
+ var byteLen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowMint
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ byteLen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if byteLen < 0 {
+ return ErrInvalidLengthMint
+ }
+ postIndex := iNdEx + byteLen
+ if postIndex < 0 {
+ return ErrInvalidLengthMint
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
+ if m.Data == nil {
+ m.Data = []byte{}
+ }
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipMint(dAtA[iNdEx:])
diff --git a/x/mint/types/minter_test.go b/x/mint/types/minter_test.go
index dbfdf4cd2a94..8bff2334995a 100644
--- a/x/mint/types/minter_test.go
+++ b/x/mint/types/minter_test.go
@@ -23,31 +23,31 @@ func TestNextInflation(t *testing.T) {
bondedRatio, setInflation, expChange math.LegacyDec
}{
// with 0% bonded atom supply the inflation should increase by InflationRateChange
- {math.LegacyZeroDec(), math.LegacyNewDecWithPrec(7, 2), params.InflationRateChange.Quo(blocksPerYr)},
+ {math.LegacyZeroDec(), math.LegacyNewDecWithPrec(0, 2), params.InflationRateChange.Quo(blocksPerYr)},
// 100% bonded, starting at 20% inflation and being reduced
// (1 - (1/0.67))*(0.13/8667)
{
- math.LegacyOneDec(), math.LegacyNewDecWithPrec(20, 2),
+ math.LegacyOneDec(), math.LegacyNewDecWithPrec(5, 2),
math.LegacyOneDec().Sub(math.LegacyOneDec().Quo(params.GoalBonded)).Mul(params.InflationRateChange).Quo(blocksPerYr),
},
// 50% bonded, starting at 10% inflation and being increased
{
- math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(10, 2),
+ math.LegacyNewDecWithPrec(5, 1), math.LegacyNewDecWithPrec(2, 2),
math.LegacyOneDec().Sub(math.LegacyNewDecWithPrec(5, 1).Quo(params.GoalBonded)).Mul(params.InflationRateChange).Quo(blocksPerYr),
},
- // test 7% minimum stop (testing with 100% bonded)
- {math.LegacyOneDec(), math.LegacyNewDecWithPrec(7, 2), math.LegacyZeroDec()},
- {math.LegacyOneDec(), math.LegacyNewDecWithPrec(700000001, 10), math.LegacyNewDecWithPrec(-1, 10)},
+ // test 0% minimum stop (testing with 100% bonded)
+ {math.LegacyOneDec(), math.LegacyNewDecWithPrec(0, 2), math.LegacyZeroDec()},
+ {math.LegacyOneDec(), math.LegacyNewDecWithPrec(1, 10), math.LegacyNewDecWithPrec(-1, 10)},
- // test 20% maximum stop (testing with 0% bonded)
- {math.LegacyZeroDec(), math.LegacyNewDecWithPrec(20, 2), math.LegacyZeroDec()},
- {math.LegacyZeroDec(), math.LegacyNewDecWithPrec(1999999999, 10), math.LegacyNewDecWithPrec(1, 10)},
+ // test 5% maximum stop (testing with 0% bonded)
+ {math.LegacyZeroDec(), math.LegacyNewDecWithPrec(5, 2), math.LegacyZeroDec()},
+ {math.LegacyZeroDec(), math.LegacyNewDecWithPrec(499999999, 10), math.LegacyNewDecWithPrec(1, 10)},
// perfect balance shouldn't change inflation
- {math.LegacyNewDecWithPrec(67, 2), math.LegacyNewDecWithPrec(15, 2), math.LegacyZeroDec()},
+ {math.LegacyNewDecWithPrec(67, 2), math.LegacyNewDecWithPrec(5, 2), math.LegacyZeroDec()},
}
for i, tc := range tests {
minter.Inflation = tc.setInflation
@@ -55,6 +55,9 @@ func TestNextInflation(t *testing.T) {
inflation := minter.NextInflationRate(params, tc.bondedRatio)
diffInflation := inflation.Sub(tc.setInflation)
+ annualProvisions := minter.NextAnnualProvisions(params, math.NewInt(100000000000000))
+ require.Equal(t, minter.Inflation.MulInt(math.NewInt(100000000000000)), annualProvisions)
+
require.True(t, diffInflation.Equal(tc.expChange),
"Test Index: %v\nDiff: %v\nExpected: %v\n", i, diffInflation, tc.expChange)
}
@@ -88,6 +91,25 @@ func TestBlockProvision(t *testing.T) {
}
}
+func TestValidateMinter(t *testing.T) {
+ tests := []struct {
+ minter Minter
+ expErr bool
+ }{
+ {InitialMinter(math.LegacyNewDecWithPrec(1, 1)), false},
+ {InitialMinter(math.LegacyNewDecWithPrec(-1, 1)), true},
+ {InitialMinter(math.LegacyZeroDec()), false},
+ }
+ for i, tc := range tests {
+ err := ValidateMinter(tc.minter)
+ if tc.expErr {
+ require.Error(t, err, "test: %v", i)
+ } else {
+ require.NoError(t, err, "test: %v", i)
+ }
+ }
+}
+
// Benchmarking :)
// previously using math.Int operations:
// BenchmarkBlockProvision-4 5000000 220 ns/op
diff --git a/x/mint/types/params.go b/x/mint/types/params.go
index 9c5c483671d6..dfc00348b3db 100644
--- a/x/mint/types/params.go
+++ b/x/mint/types/params.go
@@ -28,8 +28,8 @@ func DefaultParams() Params {
return Params{
MintDenom: sdk.DefaultBondDenom,
InflationRateChange: math.LegacyNewDecWithPrec(13, 2),
- InflationMax: math.LegacyNewDecWithPrec(20, 2),
- InflationMin: math.LegacyNewDecWithPrec(7, 2),
+ InflationMax: math.LegacyNewDecWithPrec(5, 2),
+ InflationMin: math.LegacyNewDecWithPrec(0, 2),
GoalBonded: math.LegacyNewDecWithPrec(67, 2),
BlocksPerYear: uint64(60 * 60 * 8766 / 5), // assuming 5 second block times
MaxSupply: math.ZeroInt(), // assuming zero is infinite
@@ -69,12 +69,7 @@ func (p Params) Validate() error {
return nil
}
-func validateMintDenom(i interface{}) error {
- v, ok := i.(string)
- if !ok {
- return fmt.Errorf("invalid parameter type: %T", i)
- }
-
+func validateMintDenom(v string) error {
if strings.TrimSpace(v) == "" {
return errors.New("mint denom cannot be blank")
}
@@ -85,12 +80,7 @@ func validateMintDenom(i interface{}) error {
return nil
}
-func validateInflationRateChange(i interface{}) error {
- v, ok := i.(math.LegacyDec)
- if !ok {
- return fmt.Errorf("invalid parameter type: %T", i)
- }
-
+func validateInflationRateChange(v math.LegacyDec) error {
if v.IsNil() {
return fmt.Errorf("inflation rate change cannot be nil: %s", v)
}
@@ -104,12 +94,7 @@ func validateInflationRateChange(i interface{}) error {
return nil
}
-func validateInflationMax(i interface{}) error {
- v, ok := i.(math.LegacyDec)
- if !ok {
- return fmt.Errorf("invalid parameter type: %T", i)
- }
-
+func validateInflationMax(v math.LegacyDec) error {
if v.IsNil() {
return fmt.Errorf("max inflation cannot be nil: %s", v)
}
@@ -123,12 +108,7 @@ func validateInflationMax(i interface{}) error {
return nil
}
-func validateInflationMin(i interface{}) error {
- v, ok := i.(math.LegacyDec)
- if !ok {
- return fmt.Errorf("invalid parameter type: %T", i)
- }
-
+func validateInflationMin(v math.LegacyDec) error {
if v.IsNil() {
return fmt.Errorf("min inflation cannot be nil: %s", v)
}
@@ -142,12 +122,7 @@ func validateInflationMin(i interface{}) error {
return nil
}
-func validateGoalBonded(i interface{}) error {
- v, ok := i.(math.LegacyDec)
- if !ok {
- return fmt.Errorf("invalid parameter type: %T", i)
- }
-
+func validateGoalBonded(v math.LegacyDec) error {
if v.IsNil() {
return fmt.Errorf("goal bonded cannot be nil: %s", v)
}
@@ -161,12 +136,7 @@ func validateGoalBonded(i interface{}) error {
return nil
}
-func validateBlocksPerYear(i interface{}) error {
- v, ok := i.(uint64)
- if !ok {
- return fmt.Errorf("invalid parameter type: %T", i)
- }
-
+func validateBlocksPerYear(v uint64) error {
if v == 0 {
return fmt.Errorf("blocks per year must be positive: %d", v)
}
@@ -174,12 +144,7 @@ func validateBlocksPerYear(i interface{}) error {
return nil
}
-func validateMaxSupply(i interface{}) error {
- v, ok := i.(math.Int)
- if !ok {
- return fmt.Errorf("invalid parameter type: %T", i)
- }
-
+func validateMaxSupply(v math.Int) error {
if v.IsNegative() {
return fmt.Errorf("max supply must be positive: %d", v)
}
diff --git a/x/mint/types/params_test.go b/x/mint/types/params_test.go
new file mode 100644
index 000000000000..b43c6212d058
--- /dev/null
+++ b/x/mint/types/params_test.go
@@ -0,0 +1,112 @@
+package types
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/require"
+
+ "cosmossdk.io/math"
+)
+
+func TestValidate(t *testing.T) {
+ params := DefaultParams()
+ err := params.Validate()
+ require.NoError(t, err)
+
+ params2 := NewParams(
+ params.MintDenom,
+ params.InflationRateChange,
+ params.InflationMax,
+ params.InflationMin,
+ params.GoalBonded,
+ params.BlocksPerYear,
+ params.MaxSupply,
+ )
+ err = params2.Validate()
+ require.NoError(t, err)
+ require.Equal(t, params, params2)
+
+ params.MintDenom = ""
+ err = params.Validate()
+ require.Error(t, err)
+
+ params.MintDenom = "asd/$%!@#"
+ err = params.Validate()
+ require.Error(t, err)
+
+ params = DefaultParams()
+ params.InflationRateChange = math.LegacyNewDec(123)
+ err = params.Validate()
+ require.Error(t, err)
+
+ params = DefaultParams()
+ params.InflationRateChange = math.LegacyNewDec(-123)
+ err = params.Validate()
+ require.Error(t, err)
+
+ params = DefaultParams()
+ params.InflationRateChange = math.LegacyDec{}
+ err = params.Validate()
+ require.Error(t, err)
+
+ params = DefaultParams()
+ params.InflationMax = math.LegacyNewDec(123)
+ err = params.Validate()
+ require.Error(t, err)
+
+ params = DefaultParams()
+ params.InflationMax = math.LegacyNewDec(-123)
+ err = params.Validate()
+ require.Error(t, err)
+
+ params = DefaultParams()
+ params.InflationMax = math.LegacyDec{}
+ err = params.Validate()
+ require.Error(t, err)
+
+ params = DefaultParams()
+ params.InflationMin = math.LegacyNewDec(123)
+ err = params.Validate()
+ require.Error(t, err)
+
+ params = DefaultParams()
+ params.InflationMin = math.LegacyNewDec(-123)
+ err = params.Validate()
+ require.Error(t, err)
+
+ params = DefaultParams()
+ params.InflationMin = math.LegacyDec{}
+ err = params.Validate()
+ require.Error(t, err)
+
+ params = DefaultParams()
+ params.GoalBonded = math.LegacyNewDec(123)
+ err = params.Validate()
+ require.Error(t, err)
+
+ params = DefaultParams()
+ params.GoalBonded = math.LegacyNewDec(-123)
+ err = params.Validate()
+ require.Error(t, err)
+
+ params = DefaultParams()
+ params.GoalBonded = math.LegacyDec{}
+ err = params.Validate()
+ require.Error(t, err)
+
+ params = DefaultParams()
+ params.BlocksPerYear = 0
+ err = params.Validate()
+ require.Error(t, err)
+
+ params = DefaultParams()
+ params.MaxSupply = math.NewInt(-1)
+ err = params.Validate()
+ require.Error(t, err)
+
+ params = DefaultParams()
+ params.InflationMax = math.LegacyNewDecWithPrec(1, 2)
+ params.InflationMin = math.LegacyNewDecWithPrec(2, 2)
+ err = params.Validate()
+ require.Error(t, err)
+}
diff --git a/x/simulation/doc.go b/x/simulation/doc.go
index f92a6cac8bab..e01040c3590c 100644
--- a/x/simulation/doc.go
+++ b/x/simulation/doc.go
@@ -113,7 +113,7 @@ To export the simulation app state (i.e genesis) to a file:
# Params
-Params that are provided to simulation from a JSON file are used to used to set
+Params that are provided to simulation from a JSON file are used to set
both module parameters and simulation parameters. See sim_test.go for the full
set of parameters that can be provided.
*/
diff --git a/x/upgrade/CHANGELOG.md b/x/upgrade/CHANGELOG.md
index 35113c3611b7..c098e5a24827 100644
--- a/x/upgrade/CHANGELOG.md
+++ b/x/upgrade/CHANGELOG.md
@@ -37,6 +37,11 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (x/upgrade) [#16244](https://github.com/cosmos/cosmos-sdk/pull/16244) Upgrade module no longer stores the app version but gets and sets the app version stored in the `ParamStore` of baseapp.
+## [v0.1.3](https://github.com/cosmos/cosmos-sdk/releases/tag/x/upgrade/v0.1.3) - 2024-06-04
+
+* (deps) [#20530](https://github.com/cosmos/cosmos-sdk/pull/20530) Bump vulnerable `github.com/hashicorp/go-getter` to v1.7.4.
+ * In theory, we do not need a new release for this, but we are doing it as `x/upgrade` is used in Cosmovisor.
+
## [v0.1.2](https://github.com/cosmos/cosmos-sdk/releases/tag/x/upgrade/v0.1.2) - 2024-04-22
### Improvements