Skip to content

Commit

Permalink
Merge branch 'main' into ziscky/11008-baseapp-default-genesis-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ziscky committed Sep 21, 2024
2 parents 83b248a + 763e4d6 commit 8f18445
Show file tree
Hide file tree
Showing 662 changed files with 13,919 additions and 21,713 deletions.
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
/server/v2/stf/ @testinginprod @kocubinski @cosmos/sdk-core-dev
/server/v2/appmanager/ @testinginprod @facundomedica @cosmos/sdk-core-dev
/server/v2/cometbft/ @facundomedica @sontrinh16 @cosmos/sdk-core-dev
/simsx @alpe @facundomedica @kocubinski @cosmos/sdk-core-dev
/simapp/ @facundomedica @julienrbrt @cosmos/sdk-core-dev
/simapp/v2/ @kocubinski @julienrbrt @cosmos/sdk-core-dev
/store/ @cool-develope @kocubinski @cosmos/sdk-core-dev
Expand All @@ -37,11 +38,13 @@
/tools/hubl @julienrbrt @JulianToledano @cosmos/sdk-core-dev
/tools/cosmovisor @julienrbrt @facundomedica @cosmos/sdk-core-dev
/tools/confix @julienrbrt @akhilkumarpilli @cosmos/sdk-core-dev
/tests/integration/aminojson @kocubinski @cosmos/sdk-core-dev

# x modules

/x/accounts/ @testinginprod @sontrinh16 @cosmos/sdk-core-dev
/x/auth/ @facundomedica @testinginprod @aaronc @cosmos/sdk-core-dev
/x/auth/tx/config @julienrbrt @akhilkumarpilli @kocubinski @cosmos/sdk-core-dev
/x/authz/ @akhilkumarpilli @raynaudoe @cosmos/sdk-core-dev
/x/bank/ @julienrbrt @sontrinh16 @cosmos/sdk-core-dev
/x/bank/v2 @julienrbrt @hieuvubk @akhilkumarpilli @cosmos/sdk-core-dev
Expand All @@ -63,6 +66,7 @@
/x/staking/ @facundomedica @testinginprod @JulianToledano @ziscky @cosmos/sdk-core-dev
/x/tx/ @kocubinski @testinginprod @aaronc @cosmos/sdk-core-dev
/x/upgrade/ @facundomedica @cool-develope @akhilkumarpilli @lucaslopezf @cosmos/sdk-core-dev
/x/validate @julienrbrt @akhilkumarpilli @kocubinski @cosmos/sdk-core-dev

# go mods

Expand Down
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/qa.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,20 @@ v without deliberation
* [ ] Audit x/auth
* [ ] Audit x/authz
* [ ] Audit x/bank
* [ ] Audit x/bank/v2
* [ ] Audit x/circuit
* [ ] Audit x/consensus
* [ ] Audit x/crisis
* [ ] Audit x/distribution
* [ ] Audit x/evidence
* [ ] Audit x/epochs
* [ ] Audit x/feegrant
* [ ] Audit x/genutil
* [ ] Audit x/gov
* [ ] Audit x/group
* [ ] Audit x/mint
* [ ] Audit x/nft
* [ ] Audit x/simulation
* [ ] Audit x/protocolpool
* [ ] Audit x/slashing
* [ ] Audit x/staking
* [ ] Audit x/tx
Expand Down
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,15 @@ updates:
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "x/accounts/defaults/base"
schedule:
interval: weekly
day: wednesday
time: "02:45"
labels:
- "A:automerge"
- dependencies
- package-ecosystem: gomod
directory: "x/accounts/defaults/multisig"
schedule:
Expand Down
6 changes: 6 additions & 0 deletions .github/pr_labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
"C:Keys":
- client/keys/**/*
"C:Simulations":
- types/simulation/**/*
- x/simulation/**/*
- x/*/simulation/**/*
- simsx/**/*
"C:Store":
- store/**/*
"C:collections":
Expand All @@ -28,6 +30,8 @@
- indexer/postgres/**/*
"C:x/accounts":
- x/accounts/**/*
"C:x/accounts/base":
- x/accounts/defaults/base/**/*
"C:x/accounts/multisig":
- x/accounts/defaults/multisig/**/*
"C:x/accounts/lockup":
Expand Down Expand Up @@ -76,6 +80,8 @@
- x/upgrade/**/*
"C:x/epochs":
- x/epochs/**/*
"C:x/validate":
- x/validate/**/*
"C:server/v2":
- server/v2/**/*
"C:server/v2 stf":
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/sims-052.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ jobs:
sims-notify-success:
needs:
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
[
test-sim-multi-seed-short,
test-sim-after-import,
test-sim-import-export,
test-sim-deterministic,
]
runs-on: large-sdk-runner
if: ${{ success() }}
steps:
Expand All @@ -120,7 +125,12 @@ jobs:
permissions:
contents: none
needs:
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
[
test-sim-multi-seed-short,
test-sim-after-import,
test-sim-import-export,
test-sim-deterministic,
]
runs-on: large-sdk-runner
if: ${{ failure() }}
steps:
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/sims.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ jobs:
sims-notify-success:
needs:
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
[
test-sim-multi-seed-short,
test-sim-after-import,
test-sim-import-export,
test-sim-deterministic,
]
runs-on: large-sdk-runner
if: ${{ success() }}
steps:
Expand Down Expand Up @@ -111,7 +116,12 @@ jobs:
permissions:
contents: none
needs:
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
[
test-sim-multi-seed-short,
test-sim-after-import,
test-sim-import-export,
test-sim-deterministic,
]
runs-on: large-sdk-runner
if: ${{ failure() }}
steps:
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,29 @@ jobs:
with:
projectBaseDir: x/accounts/

test-x-accounts-base:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true
cache: true
cache-dependency-path: x/accounts/defaults/base/go.sum
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
x/accounts/defaults/base/**/*.go
x/accounts/defaults/base/go.mod
x/accounts/defaults/base/go.sum
- name: tests
if: env.GIT_DIFF
run: |
cd x/accounts/defaults/base
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
test-x-accounts-lockup:
runs-on: ubuntu-latest
steps:
Expand Down
12 changes: 6 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ linters:
- dogsled
- errcheck
- errorlint
- exportloopref
- copyloopvar
- gci
- goconst
- gocritic
Expand Down Expand Up @@ -45,15 +45,15 @@ issues:
- crypto/keys/secp256k1/internal/*
- types/coin_regex.go
exclude-rules:
- text: "ST1003:"
- text: "ST1003:" # We are fine with our current naming
linters:
- stylecheck
# FIXME: Disabled until golangci-lint updates stylecheck with this fix:
# https://github.com/dominikh/go-tools/issues/389
- text: "ST1016:"
- text: "ST1016:" # Ok with inconsistent receiver names
linters:
- stylecheck
- path: "migrations"
- path: "migrations" # migraitions always use deprecated code
text: "SA1019:"
linters:
- staticcheck
Expand All @@ -72,9 +72,9 @@ issues:
- text: "SA1019: params.SendEnabled is deprecated" # TODO remove once ready to remove from the sdk
linters:
- staticcheck
- text: "SA1029: Inappropriate key in context.WithValue" # TODO remove this when dependency is updated
- text: "G115: integer overflow conversion" # We are doing this everywhere.
linters:
- staticcheck
- gosec
- text: "leading space"
linters:
- nolintlint
Expand Down
42 changes: 40 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,24 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
### Features

* (baseapp) [#20291](https://github.com/cosmos/cosmos-sdk/pull/20291) Simulate nested messages.
* (crypto/keyring) [#21653](https://github.com/cosmos/cosmos-sdk/pull/21653) New Linux-only backend that adds Linux kernel's `keyctl` support.
* (runtime) [#21704](https://github.com/cosmos/cosmos-sdk/pull/21704) Add StoreLoader in simappv2.
* (client/keys) [#21829](https://github.com/cosmos/cosmos-sdk/pull/21829) Add support for importing hex key using standard input.
* (x/validate) [#21822](https://github.com/cosmos/cosmos-sdk/pull/21822) New module solely responsible for providing ante/post handlers and tx validators for v2. It can be extended by the app developer to provide extra tx validators.
* In comparison to x/auth/tx/config, there is no app config to skip ante/post handlers, as overwriting them in baseapp or not injecting the x/validate module has the same effect.

### Improvements

### Bug Fixes
* (sims) [#21613](https://github.com/cosmos/cosmos-sdk/pull/21613) Add sims2 framework and factory methods for simpler message factories in modules

* (baseapp) [#21256](https://github.com/cosmos/cosmos-sdk/pull/21256) Halt height will not commit the block indicated, meaning that if halt-height is set to 10, only blocks until 9 (included) will be committed. This is to go back to the original behavior before a change was introduced in v0.50.0.
### Bug Fixes

### API Breaking Changes

* (types/mempool) [#21744](https://github.com/cosmos/cosmos-sdk/pull/21744) Update types/mempool.Mempool interface to take decoded transactions. This avoid to decode the transaction twice.
* (x/auth/tx/config) [#21822](https://github.com/cosmos/cosmos-sdk/pull/21822) Sign mode textual is no more automatically added to tx config when using runtime. Should be added manually on the server side.
* (x/auth/tx/config) [#21822](https://github.com/cosmos/cosmos-sdk/pull/21822) This depinject module now only provide txconfig and tx config options. `x/validate` now handles the providing of ante/post handlers, alongside tx validators for v2. The corresponding app config options have been removed from the depinject module config.

### Deprecated

## [v0.52.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.52.0) - 2024-XX-XX
Expand Down Expand Up @@ -229,6 +238,28 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
* (module) [#19370](https://github.com/cosmos/cosmos-sdk/pull/19370) Deprecate `module.Configurator`, use `appmodule.HasMigrations` and `appmodule.HasServices` instead from Core API.
* (types) [#21435](https://github.com/cosmos/cosmos-sdk/pull/21435) The `String()` method on `AccAddress`, `ValAddress` and `ConsAddress` have been deprecated. This is done because those are still using the deprecated global `sdk.Config`. Use an `address.Codec` instead.

## [v0.50.10](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.10) - 2024-09-20

## Features

* (cli) [#20779](https://github.com/cosmos/cosmos-sdk/pull/20779) Added `module-hash-by-height` command to query and retrieve module hashes at a specified blockchain height, enhancing debugging capabilities.
* (cli) [#21372](https://github.com/cosmos/cosmos-sdk/pull/21372) Added a `bulk-add-genesis-account` genesis command to add many genesis accounts at once.
* (types/collections) [#21724](https://github.com/cosmos/cosmos-sdk/pull/21724) Added `LegacyDec` collection value.

### Improvements

* (x/bank) [#21460](https://github.com/cosmos/cosmos-sdk/pull/21460) Added `Sender` attribute in `MsgMultiSend` event.
* (genutil) [#21701](https://github.com/cosmos/cosmos-sdk/pull/21701) Improved error messages for genesis validation.
* (testutil/integration) [#21816](https://github.com/cosmos/cosmos-sdk/pull/21816) Allow to pass baseapp options in `NewIntegrationApp`.

### Bug Fixes

* (runtime) [#21769](https://github.com/cosmos/cosmos-sdk/pull/21769) Fix baseapp options ordering to avoid overwriting options set by modules.
* (x/consensus) [#21493](https://github.com/cosmos/cosmos-sdk/pull/21493) Fix regression that prevented to upgrade to > v0.50.7 without consensus version params.
* (baseapp) [#21256](https://github.com/cosmos/cosmos-sdk/pull/21256) Halt height will not commit the block indicated, meaning that if halt-height is set to 10, only blocks until 9 (included) will be committed. This is to go back to the original behavior before a change was introduced in v0.50.0.
* (baseapp) [#21444](https://github.com/cosmos/cosmos-sdk/pull/21444) Follow-up, Return PreBlocker events in FinalizeBlockResponse.
* (baseapp) [#21413](https://github.com/cosmos/cosmos-sdk/pull/21413) Fix data race in sdk mempool.

## [v0.50.9](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.9) - 2024-08-07

## Bug Fixes
Expand Down Expand Up @@ -737,6 +768,13 @@ 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.14](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.14) - 2024-09-20

### Improvements

* [#21295](https://github.com/cosmos/cosmos-sdk/pull/21295) Bump to gogoproto v1.7.0.
* [#21295](https://github.com/cosmos/cosmos-sdk/pull/21295) Remove usage of `slices.SortFunc` due to API break in used versions.

## [v0.47.13](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.13) - 2024-07-15

### Bug Fixes
Expand Down
6 changes: 3 additions & 3 deletions RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ Their responsibilities include:

Currently residing Stable Release Managers:

* @tac0turtle - Marko Baricevic
* @julienrbrt - Julien Robert

* [@tac0turtle - Marko Baricevic](https://github.com/tac0turtle)
* [@julienrbrt - Julien Robert](https://github.com/julienrbrt)
## Cosmos SDK Modules Tagging Strategy

The Cosmos SDK repository is a mono-repo where its Go modules have a different release process and cadence than the Cosmos SDK itself.
Expand Down
25 changes: 21 additions & 4 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ To be able to simulate nested messages within a transaction, message types conta
the nested messages. By implementing this interface, the BaseApp can simulate these nested messages during
transaction simulation.

## [v0.52.x](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.52.0-alpha.0)
## [v0.52.x](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.52.0-beta.1)

Documentation to migrate an application from v0.50.x to server/v2 is available elsewhere.
It is additional to the changes described here.
Expand All @@ -53,7 +53,7 @@ It is additional to the changes described here.

In this section we describe the changes made in Cosmos SDK' SimApp.
**These changes are directly applicable to your application wiring.**
Please read this section first, but for an exhaustive list of changes, refer to the [CHANGELOG](./simapp/CHANGELOG.md).
Please read this section first, but for an exhaustive list of changes, refer to the [CHANGELOG](https://github.com/cosmos/cosmos-sdk/blob/main/simapp/CHANGELOG.md).

#### Client (`root.go`)

Expand Down Expand Up @@ -106,7 +106,7 @@ For non depinject users, simply call `RegisterLegacyAminoCodec` and `RegisterInt

Additionally, thanks to the genesis simplification, as explained in [the genesis interface update](#genesis-interface), the module manager `InitGenesis` and `ExportGenesis` methods do not require the codec anymore.

##### GRPC WEB
##### gRPC Web

Grpc-web embedded client has been removed from the server. If you would like to use grpc-web, you can use the [envoy proxy](https://www.envoyproxy.io/docs/envoy/latest/start/start). Here's how to set it up:

Expand Down Expand Up @@ -195,7 +195,9 @@ Grpc-web embedded client has been removed from the server. If you would like to

This indicates that Envoy has started and is ready to proxy requests.

<!-- markdown-link-check-disable -->
6. Update your client applications to connect to Envoy (http://localhost:8080 by default).
<!-- markdown-link-check-enable -->

</details>

Expand Down Expand Up @@ -317,6 +319,11 @@ used as a TTL for the transaction and is used to provide replay protection. See
[ADR-070](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-070-unordered-transactions.md)
for more details.

#### Sign Mode Textual

With the split of `x/auth/tx/config` in two (x/auth/tx/config as depinject module for txconfig and tx options) and `x/validate`, sign mode textual is no more automatically configured when using runtime (it was previously the case).
For the same instructions than for legacy app wiring to enable sign mode textual (see in v0.50 UPGRADING documentation).

### Depinject `app_config.go` / `app.yml`

With the introduction of [environment in modules](#core-api), depinject automatically creates the environment for all modules.
Expand Down Expand Up @@ -439,6 +446,11 @@ 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/auth`

Vesting accounts messages (and CLIs) have been removed. Existing vesting accounts will keep working but no new vesting accounts can be created.
Use `x/accounts` lockup accounts or implement an `x/accounts` vesting account instead.

#### `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.
Expand All @@ -452,7 +464,7 @@ if err != nil {
}
```

### `x/crisis`
#### `x/crisis`

The `x/crisis` module was removed due to it not being supported or functional any longer.

Expand Down Expand Up @@ -496,6 +508,11 @@ storetypes.StoreUpgrades{
}
```

#### `x/validate`

Introducing `x/validate` a module that is solely used for registering default ante/post handlers and global tx validators when using runtime and runtime/v2. If you wish to set your custom ante/post handlers, no need to use this module.
You can however always extend them by adding extra tx validators (see `x/validate` documentation).

## [v0.50.x](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.0-alpha.0)

### Migration to CometBFT (Part 2)
Expand Down
Loading

0 comments on commit 8f18445

Please sign in to comment.