Skip to content

Commit 1ff734d

Browse files
committed
Merge branch 'main' into alex/sims2_main
* main: test: fix sims (#21735) build: bump proto-builder (#21730) refactor(schema)!: rename IntegerStringKind and DecimalStringKind (#21694) feat(types/collections): add `LegacyDec` collection value (#21693) refactor(server): alias AppOptions to coreserver.DynamicConfig (#21711) refactor(simapp): simplify simapp di (#21718) feat: replace the cosmos-db usecases in the tests with `core/testing` (#21525) feat(runtime/v2): store loader on simappv2 (#21704) docs(x/auth): vesting (#21715) build(deps): Bump google.golang.org/grpc from 1.66.1 to 1.66.2 (#21670) refactor(systemtest): Add cli.RunAndWait for common operations (#21689) fix(runtime/v2): provide default factory options if unset in app builder (#21690) chore: remove duplicate proto files for the same proto file (#21648) feat(x/genutil): add better error messages for genesis validation (#21701) build(deps): Bump cosmossdk.io/core from 1.0.0-alpha.1 to 1.0.0-alpha.2 (#21698) test: migrate e2e/bank to system tests (#21607) chore: fix the gci lint issue in testutil (#21695) docs(x/authz): update grant docs (#21677)
2 parents f367402 + 0147347 commit 1ff734d

197 files changed

Lines changed: 3144 additions & 9737 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/sims-052.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,12 @@ jobs:
9393
9494
sims-notify-success:
9595
needs:
96-
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
96+
[
97+
test-sim-multi-seed-short,
98+
test-sim-after-import,
99+
test-sim-import-export,
100+
test-sim-deterministic,
101+
]
97102
runs-on: large-sdk-runner
98103
if: ${{ success() }}
99104
steps:
@@ -120,7 +125,12 @@ jobs:
120125
permissions:
121126
contents: none
122127
needs:
123-
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
128+
[
129+
test-sim-multi-seed-short,
130+
test-sim-after-import,
131+
test-sim-import-export,
132+
test-sim-deterministic,
133+
]
124134
runs-on: large-sdk-runner
125135
if: ${{ failure() }}
126136
steps:

.github/workflows/sims.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,12 @@ jobs:
8383
8484
sims-notify-success:
8585
needs:
86-
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
86+
[
87+
test-sim-multi-seed-short,
88+
test-sim-after-import,
89+
test-sim-import-export,
90+
test-sim-deterministic,
91+
]
8792
runs-on: large-sdk-runner
8893
if: ${{ success() }}
8994
steps:
@@ -111,7 +116,12 @@ jobs:
111116
permissions:
112117
contents: none
113118
needs:
114-
[test-sim-multi-seed-short, test-sim-after-import, test-sim-import-export]
119+
[
120+
test-sim-multi-seed-short,
121+
test-sim-after-import,
122+
test-sim-import-export,
123+
test-sim-deterministic,
124+
]
115125
runs-on: large-sdk-runner
116126
if: ${{ failure() }}
117127
steps:

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,12 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
4343
### Features
4444

4545
* (baseapp) [#20291](https://github.com/cosmos/cosmos-sdk/pull/20291) Simulate nested messages.
46+
* (runtime) [#21704](https://github.com/cosmos/cosmos-sdk/pull/21704) Add StoreLoader in simappv2.
4647

4748
### Improvements
4849

50+
* (genutil) [#21701](https://github.com/cosmos/cosmos-sdk/pull/21701) Improved error messages for genesis validation.
51+
4952
### Bug Fixes
5053

5154
* (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.

UPGRADING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,11 @@ Most of Cosmos SDK modules have migrated to [collections](https://docs.cosmos.ne
439439
Many functions have been removed due to this changes as the API can be smaller thanks to collections.
440440
For modules that have migrated, verify you are checking against `collections.ErrNotFound` when applicable.
441441

442+
#### `x/auth`
443+
444+
Vesting accounts messages (and CLIs) have been removed. Existing vesting accounts will keep working but no new vesting accounts can be created.
445+
Use `x/accounts` lockup accounts or implement an `x/accounts` vesting account instead.
446+
442447
#### `x/accounts`
443448

444449
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.

api/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/cosmos/cosmos-proto v1.0.0-beta.5
88
github.com/cosmos/gogoproto v1.7.0
99
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117
10-
google.golang.org/grpc v1.66.1
10+
google.golang.org/grpc v1.66.2
1111
google.golang.org/protobuf v1.34.2
1212
)
1313

api/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 h1:
2020
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117/go.mod h1:OimBR/bc1wPO9iV4NC2bpyjy3VnAwZh5EBPQdtaE5oo=
2121
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ=
2222
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
23-
google.golang.org/grpc v1.66.1 h1:hO5qAXR19+/Z44hmvIM4dQFMSYX9XcWsByfoxutBpAM=
24-
google.golang.org/grpc v1.66.1/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
23+
google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo=
24+
google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
2525
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
2626
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=

baseapp/abci_test.go

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
2020
"github.com/cometbft/cometbft/crypto/secp256k1"
2121
cmttypes "github.com/cometbft/cometbft/types"
22-
dbm "github.com/cosmos/cosmos-db"
2322
protoio "github.com/cosmos/gogoproto/io"
2423
"github.com/cosmos/gogoproto/jsonpb"
2524
"github.com/cosmos/gogoproto/proto"
@@ -28,6 +27,7 @@ import (
2827
"github.com/golang/mock/gomock"
2928
"github.com/stretchr/testify/require"
3029

30+
coretesting "cosmossdk.io/core/testing"
3131
errorsmod "cosmossdk.io/errors"
3232
"cosmossdk.io/log"
3333
pruningtypes "cosmossdk.io/store/pruning/types"
@@ -105,7 +105,7 @@ func TestABCI_First_block_Height(t *testing.T) {
105105

106106
func TestABCI_InitChain(t *testing.T) {
107107
name := t.Name()
108-
db := dbm.NewMemDB()
108+
db := coretesting.NewMemDB()
109109
logger := log.NewTestLogger(t)
110110
app := baseapp.NewBaseApp(name, logger, db, nil, baseapp.SetChainID("test-chain-id"))
111111

@@ -205,7 +205,7 @@ func TestABCI_InitChain(t *testing.T) {
205205

206206
func TestABCI_InitChain_WithInitialHeight(t *testing.T) {
207207
name := t.Name()
208-
db := dbm.NewMemDB()
208+
db := coretesting.NewMemDB()
209209
app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil)
210210

211211
_, err := app.InitChain(
@@ -222,7 +222,7 @@ func TestABCI_InitChain_WithInitialHeight(t *testing.T) {
222222

223223
func TestABCI_FinalizeBlock_WithInitialHeight(t *testing.T) {
224224
name := t.Name()
225-
db := dbm.NewMemDB()
225+
db := coretesting.NewMemDB()
226226
app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil)
227227

228228
_, err := app.InitChain(
@@ -244,7 +244,7 @@ func TestABCI_FinalizeBlock_WithInitialHeight(t *testing.T) {
244244

245245
func TestABCI_FinalizeBlock_WithBeginAndEndBlocker(t *testing.T) {
246246
name := t.Name()
247-
db := dbm.NewMemDB()
247+
db := coretesting.NewMemDB()
248248
app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil)
249249

250250
app.SetBeginBlocker(func(ctx sdk.Context) (sdk.BeginBlock, error) {
@@ -311,7 +311,7 @@ func TestABCI_FinalizeBlock_WithBeginAndEndBlocker(t *testing.T) {
311311

312312
func TestABCI_ExtendVote(t *testing.T) {
313313
name := t.Name()
314-
db := dbm.NewMemDB()
314+
db := coretesting.NewMemDB()
315315
app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil)
316316

317317
app.SetExtendVoteHandler(func(ctx sdk.Context, req *abci.ExtendVoteRequest) (*abci.ExtendVoteResponse, error) {
@@ -329,7 +329,7 @@ func TestABCI_ExtendVote(t *testing.T) {
329329
return &abci.VerifyVoteExtensionResponse{Status: abci.VERIFY_VOTE_EXTENSION_STATUS_ACCEPT}, nil
330330
})
331331

332-
app.SetParamStore(&paramStore{db: dbm.NewMemDB()})
332+
app.SetParamStore(&paramStore{db: coretesting.NewMemDB()})
333333
_, err := app.InitChain(
334334
&abci.InitChainRequest{
335335
InitialHeight: 1,
@@ -394,7 +394,7 @@ func TestABCI_ExtendVote(t *testing.T) {
394394
// without having called ExtendVote before.
395395
func TestABCI_OnlyVerifyVoteExtension(t *testing.T) {
396396
name := t.Name()
397-
db := dbm.NewMemDB()
397+
db := coretesting.NewMemDB()
398398
app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil)
399399

400400
app.SetVerifyVoteExtensionHandler(func(ctx sdk.Context, req *abci.VerifyVoteExtensionRequest) (*abci.VerifyVoteExtensionResponse, error) {
@@ -407,7 +407,7 @@ func TestABCI_OnlyVerifyVoteExtension(t *testing.T) {
407407
return &abci.VerifyVoteExtensionResponse{Status: abci.VERIFY_VOTE_EXTENSION_STATUS_ACCEPT}, nil
408408
})
409409

410-
app.SetParamStore(&paramStore{db: dbm.NewMemDB()})
410+
app.SetParamStore(&paramStore{db: coretesting.NewMemDB()})
411411
_, err := app.InitChain(
412412
&abci.InitChainRequest{
413413
InitialHeight: 1,
@@ -527,7 +527,7 @@ func TestABCI_P2PQuery(t *testing.T) {
527527
}
528528

529529
func TestBaseApp_PrepareCheckState(t *testing.T) {
530-
db := dbm.NewMemDB()
530+
db := coretesting.NewMemDB()
531531
name := t.Name()
532532
logger := log.NewTestLogger(t)
533533

@@ -538,7 +538,7 @@ func TestBaseApp_PrepareCheckState(t *testing.T) {
538538
}
539539

540540
app := baseapp.NewBaseApp(name, logger, db, nil)
541-
app.SetParamStore(&paramStore{db: dbm.NewMemDB()})
541+
app.SetParamStore(&paramStore{db: coretesting.NewMemDB()})
542542
_, err := app.InitChain(&abci.InitChainRequest{
543543
ConsensusParams: cp,
544544
})
@@ -556,7 +556,7 @@ func TestBaseApp_PrepareCheckState(t *testing.T) {
556556
}
557557

558558
func TestBaseApp_Precommit(t *testing.T) {
559-
db := dbm.NewMemDB()
559+
db := coretesting.NewMemDB()
560560
name := t.Name()
561561
logger := log.NewTestLogger(t)
562562

@@ -567,7 +567,7 @@ func TestBaseApp_Precommit(t *testing.T) {
567567
}
568568

569569
app := baseapp.NewBaseApp(name, logger, db, nil)
570-
app.SetParamStore(&paramStore{db: dbm.NewMemDB()})
570+
app.SetParamStore(&paramStore{db: coretesting.NewMemDB()})
571571
_, err := app.InitChain(&abci.InitChainRequest{
572572
ConsensusParams: cp,
573573
})
@@ -1499,10 +1499,10 @@ func TestABCI_Query(t *testing.T) {
14991499

15001500
func TestABCI_GetBlockRetentionHeight(t *testing.T) {
15011501
logger := log.NewTestLogger(t)
1502-
db := dbm.NewMemDB()
1502+
db := coretesting.NewMemDB()
15031503
name := t.Name()
15041504

1505-
snapshotStore, err := snapshots.NewStore(dbm.NewMemDB(), testutil.GetTempDir(t))
1505+
snapshotStore, err := snapshots.NewStore(coretesting.NewMemDB(), testutil.GetTempDir(t))
15061506
require.NoError(t, err)
15071507

15081508
testCases := map[string]struct {
@@ -1591,7 +1591,7 @@ func TestABCI_GetBlockRetentionHeight(t *testing.T) {
15911591
for name, tc := range testCases {
15921592
tc := tc
15931593

1594-
tc.bapp.SetParamStore(&paramStore{db: dbm.NewMemDB()})
1594+
tc.bapp.SetParamStore(&paramStore{db: coretesting.NewMemDB()})
15951595
_, err := tc.bapp.InitChain(&abci.InitChainRequest{
15961596
ConsensusParams: &cmtproto.ConsensusParams{
15971597
Evidence: &cmtproto.EvidenceParams{
@@ -1612,7 +1612,7 @@ func TestPrepareCheckStateCalledWithCheckState(t *testing.T) {
16121612
t.Parallel()
16131613

16141614
logger := log.NewTestLogger(t)
1615-
db := dbm.NewMemDB()
1615+
db := coretesting.NewMemDB()
16161616
name := t.Name()
16171617
app := baseapp.NewBaseApp(name, logger, db, nil)
16181618

@@ -1635,7 +1635,7 @@ func TestPrecommiterCalledWithDeliverState(t *testing.T) {
16351635
t.Parallel()
16361636

16371637
logger := log.NewTestLogger(t)
1638-
db := dbm.NewMemDB()
1638+
db := coretesting.NewMemDB()
16391639
name := t.Name()
16401640
app := baseapp.NewBaseApp(name, logger, db, nil)
16411641

@@ -2307,7 +2307,7 @@ func TestABCI_HaltChain(t *testing.T) {
23072307
}
23082308

23092309
func TestBaseApp_PreBlocker(t *testing.T) {
2310-
db := dbm.NewMemDB()
2310+
db := coretesting.NewMemDB()
23112311
name := t.Name()
23122312
logger := log.NewTestLogger(t)
23132313

baseapp/abci_utils_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
1111
cmtsecp256k1 "github.com/cometbft/cometbft/crypto/secp256k1"
1212
cmttypes "github.com/cometbft/cometbft/types"
13-
dbm "github.com/cosmos/cosmos-db"
1413
protoio "github.com/cosmos/gogoproto/io"
1514
"github.com/cosmos/gogoproto/proto"
1615
gogotypes "github.com/cosmos/gogoproto/types"
@@ -21,6 +20,7 @@ import (
2120
"cosmossdk.io/core/address"
2221
"cosmossdk.io/core/comet"
2322
"cosmossdk.io/core/header"
23+
coretesting "cosmossdk.io/core/testing"
2424
"cosmossdk.io/log"
2525

2626
"github.com/cosmos/cosmos-sdk/baseapp"
@@ -478,7 +478,7 @@ func (s *ABCIUtilsTestSuite) TestDefaultProposalHandler_NoOpMempoolTxSelection()
478478

479479
// create a baseapp along with a tx config for tx generation
480480
txConfig := authtx.NewTxConfig(cdc, signingCtx.AddressCodec(), signingCtx.ValidatorAddressCodec(), authtx.DefaultSignModes)
481-
app := baseapp.NewBaseApp(s.T().Name(), log.NewNopLogger(), dbm.NewMemDB(), txConfig.TxDecoder())
481+
app := baseapp.NewBaseApp(s.T().Name(), log.NewNopLogger(), coretesting.NewMemDB(), txConfig.TxDecoder())
482482

483483
// create a proposal handler
484484
ph := baseapp.NewDefaultProposalHandler(mempool.NoOpMempool{}, app)

0 commit comments

Comments
 (0)