Skip to content

Commit

Permalink
Merge branch 'main' into keyring-backend-keyctl
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle authored Sep 16, 2024
2 parents 88f9500 + 0147347 commit e3e7c26
Show file tree
Hide file tree
Showing 198 changed files with 2,901 additions and 9,736 deletions.
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
* (baseapp) [#20291](https://github.com/cosmos/cosmos-sdk/pull/20291) Simulate nested messages.
* (cli) [#21372](https://github.com/cosmos/cosmos-sdk/pull/21372) Add a `bulk-add-genesis-account` genesis command to add many genesis accounts at once.
* (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.

### Improvements

* (genutil) [#21701](https://github.com/cosmos/cosmos-sdk/pull/21701) Improved error messages for genesis validation.

### Bug Fixes

* (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.
Expand Down
5 changes: 5 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,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 Down
2 changes: 1 addition & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/gogoproto v1.7.0
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117
google.golang.org/grpc v1.66.1
google.golang.org/grpc v1.66.2
google.golang.org/protobuf v1.34.2
)

Expand Down
4 changes: 2 additions & 2 deletions api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 h1:
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117/go.mod h1:OimBR/bc1wPO9iV4NC2bpyjy3VnAwZh5EBPQdtaE5oo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.66.1 h1:hO5qAXR19+/Z44hmvIM4dQFMSYX9XcWsByfoxutBpAM=
google.golang.org/grpc v1.66.1/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo=
google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
38 changes: 19 additions & 19 deletions baseapp/abci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
"github.com/cometbft/cometbft/crypto/secp256k1"
cmttypes "github.com/cometbft/cometbft/types"
dbm "github.com/cosmos/cosmos-db"
protoio "github.com/cosmos/gogoproto/io"
"github.com/cosmos/gogoproto/jsonpb"
"github.com/cosmos/gogoproto/proto"
Expand All @@ -28,6 +27,7 @@ import (
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"

coretesting "cosmossdk.io/core/testing"
errorsmod "cosmossdk.io/errors"
"cosmossdk.io/log"
pruningtypes "cosmossdk.io/store/pruning/types"
Expand Down Expand Up @@ -105,7 +105,7 @@ func TestABCI_First_block_Height(t *testing.T) {

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

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

func TestABCI_InitChain_WithInitialHeight(t *testing.T) {
name := t.Name()
db := dbm.NewMemDB()
db := coretesting.NewMemDB()
app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil)

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

func TestABCI_FinalizeBlock_WithInitialHeight(t *testing.T) {
name := t.Name()
db := dbm.NewMemDB()
db := coretesting.NewMemDB()
app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil)

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

func TestABCI_FinalizeBlock_WithBeginAndEndBlocker(t *testing.T) {
name := t.Name()
db := dbm.NewMemDB()
db := coretesting.NewMemDB()
app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil)

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

func TestABCI_ExtendVote(t *testing.T) {
name := t.Name()
db := dbm.NewMemDB()
db := coretesting.NewMemDB()
app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil)

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

app.SetParamStore(&paramStore{db: dbm.NewMemDB()})
app.SetParamStore(&paramStore{db: coretesting.NewMemDB()})
_, err := app.InitChain(
&abci.InitChainRequest{
InitialHeight: 1,
Expand Down Expand Up @@ -394,7 +394,7 @@ func TestABCI_ExtendVote(t *testing.T) {
// without having called ExtendVote before.
func TestABCI_OnlyVerifyVoteExtension(t *testing.T) {
name := t.Name()
db := dbm.NewMemDB()
db := coretesting.NewMemDB()
app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil)

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

app.SetParamStore(&paramStore{db: dbm.NewMemDB()})
app.SetParamStore(&paramStore{db: coretesting.NewMemDB()})
_, err := app.InitChain(
&abci.InitChainRequest{
InitialHeight: 1,
Expand Down Expand Up @@ -527,7 +527,7 @@ func TestABCI_P2PQuery(t *testing.T) {
}

func TestBaseApp_PrepareCheckState(t *testing.T) {
db := dbm.NewMemDB()
db := coretesting.NewMemDB()
name := t.Name()
logger := log.NewTestLogger(t)

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

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

func TestBaseApp_Precommit(t *testing.T) {
db := dbm.NewMemDB()
db := coretesting.NewMemDB()
name := t.Name()
logger := log.NewTestLogger(t)

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

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

func TestABCI_GetBlockRetentionHeight(t *testing.T) {
logger := log.NewTestLogger(t)
db := dbm.NewMemDB()
db := coretesting.NewMemDB()
name := t.Name()

snapshotStore, err := snapshots.NewStore(dbm.NewMemDB(), testutil.GetTempDir(t))
snapshotStore, err := snapshots.NewStore(coretesting.NewMemDB(), testutil.GetTempDir(t))
require.NoError(t, err)

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

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

logger := log.NewTestLogger(t)
db := dbm.NewMemDB()
db := coretesting.NewMemDB()
name := t.Name()
app := baseapp.NewBaseApp(name, logger, db, nil)

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

logger := log.NewTestLogger(t)
db := dbm.NewMemDB()
db := coretesting.NewMemDB()
name := t.Name()
app := baseapp.NewBaseApp(name, logger, db, nil)

Expand Down Expand Up @@ -2307,7 +2307,7 @@ func TestABCI_HaltChain(t *testing.T) {
}

func TestBaseApp_PreBlocker(t *testing.T) {
db := dbm.NewMemDB()
db := coretesting.NewMemDB()
name := t.Name()
logger := log.NewTestLogger(t)

Expand Down
4 changes: 2 additions & 2 deletions baseapp/abci_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
cmtsecp256k1 "github.com/cometbft/cometbft/crypto/secp256k1"
cmttypes "github.com/cometbft/cometbft/types"
dbm "github.com/cosmos/cosmos-db"
protoio "github.com/cosmos/gogoproto/io"
"github.com/cosmos/gogoproto/proto"
gogotypes "github.com/cosmos/gogoproto/types"
Expand All @@ -21,6 +20,7 @@ import (
"cosmossdk.io/core/address"
"cosmossdk.io/core/comet"
"cosmossdk.io/core/header"
coretesting "cosmossdk.io/core/testing"
"cosmossdk.io/log"

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

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

// create a proposal handler
ph := baseapp.NewDefaultProposalHandler(mempool.NoOpMempool{}, app)
Expand Down
Loading

0 comments on commit e3e7c26

Please sign in to comment.