diff --git a/CHANGELOG.md b/CHANGELOG.md index 96402f387da..2ecd0baf8b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,13 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +- [#1447](https://github.com/cosmos/gaia/pull/1447) Support custom message types to bypass minimum fee checks for. + If a transaction contains only bypassed message types, the transaction will not have minimum fee + checks performed during `CheckTx`. Operators can supply these message types via the `bypass-min-fee-msg-types` + configuration in `app.toml`. Note, by default they include various IBC message types. + ## [v7.0.0] - 2022-03-24 + - (gaia) bump [cosmos-sdk](https://github.com/cosmos/cosmos-sdk) to [v0.45.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.45.1). See [CHANGELOG.md](https://github.com/cosmos/cosmos-sdk/blob/v0.45.1/CHANGELOG.md#v0451---2022-02-03) for details. - (gaia) bump [ibc-go](https://github.com/cosmos/ibc-go) module to [v3.0.0](https://github.com/cosmos/ibc-go/releases/tag/v3.0.0). See [CHANGELOG.md](https://github.com/cosmos/ibc-go/blob/v3.0.0/CHANGELOG.md#v300---2022-03-15) for details. - (gaia) add [interchain account](https://github.com/cosmos/ibc-go/tree/main/modules/apps/27-interchain-accounts) module (interhchain-account module is part of ibc-go module). @@ -45,6 +51,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ - (gaia) add migration logs for upgrade process. ## [v6.0.4] - 2022-03-10 + * (gaia) Bump [Liquidity](https://github.com/gravity-devs/liquidity) module to [v1.4.6](https://github.com/Gravity-Devs/liquidity/releases/tag/v1.4.6). * (gaia) Bump [IBC](https://github.com/cosmos/ibc-go) module to [2.0.3](https://github.com/cosmos/ibc-go/releases/tag/v2.0.3). * (gaia) [#1230](https://github.com/cosmos/gaia/pull/1230) Fix: update gRPC Web Configuration in `contrib/testnets/test_platform`. diff --git a/app/ante_handler.go b/ante/ante.go similarity index 55% rename from app/ante_handler.go rename to ante/ante.go index fb0dc91f3e0..ae54c73794c 100644 --- a/app/ante_handler.go +++ b/ante/ante.go @@ -1,4 +1,4 @@ -package gaia +package ante import ( sdk "github.com/cosmos/cosmos-sdk/types" @@ -12,21 +12,23 @@ import ( // channel keeper. type HandlerOptions struct { ante.HandlerOptions - IBCkeeper *ibckeeper.Keeper + + IBCkeeper *ibckeeper.Keeper + BypassMinFeeMsgTypes []string } -func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { - if options.AccountKeeper == nil { +func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error) { + if opts.AccountKeeper == nil { return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "account keeper is required for AnteHandler") } - if options.BankKeeper == nil { + if opts.BankKeeper == nil { return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "bank keeper is required for AnteHandler") } - if options.SignModeHandler == nil { + if opts.SignModeHandler == nil { return nil, sdkerrors.Wrap(sdkerrors.ErrLogic, "sign mode handler is required for ante builder") } - var sigGasConsumer = options.SigGasConsumer + var sigGasConsumer = opts.SigGasConsumer if sigGasConsumer == nil { sigGasConsumer = ante.DefaultSigVerificationGasConsumer } @@ -34,19 +36,19 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { anteDecorators := []sdk.AnteDecorator{ ante.NewSetUpContextDecorator(), ante.NewRejectExtensionOptionsDecorator(), - ante.NewMempoolFeeDecorator(), + NewMempoolFeeDecorator(opts.BypassMinFeeMsgTypes), ante.NewValidateBasicDecorator(), ante.NewTxTimeoutHeightDecorator(), - ante.NewValidateMemoDecorator(options.AccountKeeper), - ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper), - ante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper), + ante.NewValidateMemoDecorator(opts.AccountKeeper), + ante.NewConsumeGasForTxSizeDecorator(opts.AccountKeeper), + ante.NewDeductFeeDecorator(opts.AccountKeeper, opts.BankKeeper, opts.FeegrantKeeper), // SetPubKeyDecorator must be called before all signature verification decorators - ante.NewSetPubKeyDecorator(options.AccountKeeper), - ante.NewValidateSigCountDecorator(options.AccountKeeper), - ante.NewSigGasConsumeDecorator(options.AccountKeeper, sigGasConsumer), - ante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), - ante.NewIncrementSequenceDecorator(options.AccountKeeper), - ibcante.NewAnteDecorator(options.IBCkeeper), + ante.NewSetPubKeyDecorator(opts.AccountKeeper), + ante.NewValidateSigCountDecorator(opts.AccountKeeper), + ante.NewSigGasConsumeDecorator(opts.AccountKeeper, sigGasConsumer), + ante.NewSigVerificationDecorator(opts.AccountKeeper, opts.SignModeHandler), + ante.NewIncrementSequenceDecorator(opts.AccountKeeper), + ibcante.NewAnteDecorator(opts.IBCkeeper), } return sdk.ChainAnteDecorators(anteDecorators...), nil diff --git a/ante/ante_test.go b/ante/ante_test.go new file mode 100644 index 00000000000..c0e5b08d3ab --- /dev/null +++ b/ante/ante_test.go @@ -0,0 +1,99 @@ +package ante_test + +import ( + "fmt" + "testing" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/tx" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" + "github.com/stretchr/testify/suite" + tmrand "github.com/tendermint/tendermint/libs/rand" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + gaiaapp "github.com/cosmos/gaia/v7/app" + gaiahelpers "github.com/cosmos/gaia/v7/app/helpers" +) + +type IntegrationTestSuite struct { + suite.Suite + + app *gaiaapp.GaiaApp + anteHandler sdk.AnteHandler + ctx sdk.Context + clientCtx client.Context + txBuilder client.TxBuilder +} + +func TestIntegrationTestSuite(t *testing.T) { + suite.Run(t, new(IntegrationTestSuite)) +} + +func (s *IntegrationTestSuite) SetupTest() { + app := gaiahelpers.Setup(s.T(), false, 1) + ctx := app.BaseApp.NewContext(false, tmproto.Header{ + ChainID: fmt.Sprintf("test-chain-%s", tmrand.Str(4)), + Height: 1, + }) + + encodingConfig := simapp.MakeTestEncodingConfig() + encodingConfig.Amino.RegisterConcrete(&testdata.TestMsg{}, "testdata.TestMsg", nil) + testdata.RegisterInterfaces(encodingConfig.InterfaceRegistry) + + s.app = app + s.ctx = ctx + s.clientCtx = client.Context{}.WithTxConfig(encodingConfig.TxConfig) +} + +func (s *IntegrationTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, accNums []uint64, accSeqs []uint64, chainID string) (xauthsigning.Tx, error) { + var sigsV2 []signing.SignatureV2 + for i, priv := range privs { + sigV2 := signing.SignatureV2{ + PubKey: priv.PubKey(), + Data: &signing.SingleSignatureData{ + SignMode: s.clientCtx.TxConfig.SignModeHandler().DefaultMode(), + Signature: nil, + }, + Sequence: accSeqs[i], + } + + sigsV2 = append(sigsV2, sigV2) + } + + if err := s.txBuilder.SetSignatures(sigsV2...); err != nil { + return nil, err + } + + sigsV2 = []signing.SignatureV2{} + for i, priv := range privs { + signerData := xauthsigning.SignerData{ + ChainID: chainID, + AccountNumber: accNums[i], + Sequence: accSeqs[i], + } + sigV2, err := tx.SignWithPrivKey( + s.clientCtx.TxConfig.SignModeHandler().DefaultMode(), + signerData, + s.txBuilder, + priv, + s.clientCtx.TxConfig, + accSeqs[i], + ) + if err != nil { + return nil, err + } + + sigsV2 = append(sigsV2, sigV2) + } + + if err := s.txBuilder.SetSignatures(sigsV2...); err != nil { + return nil, err + } + + return s.txBuilder.GetTx(), nil +} diff --git a/ante/fee.go b/ante/fee.go new file mode 100644 index 00000000000..2d1cb083358 --- /dev/null +++ b/ante/fee.go @@ -0,0 +1,75 @@ +package ante + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + tmstrings "github.com/tendermint/tendermint/libs/strings" +) + +const maxBypassMinFeeMsgGasUsage = uint64(200_000) + +// MempoolFeeDecorator will check if the transaction's fee is at least as large +// as the local validator's minimum gasFee (defined in validator config). +// +// If fee is too low, decorator returns error and tx is rejected from mempool. +// Note this only applies when ctx.CheckTx = true. If fee is high enough or not +// CheckTx, then call next AnteHandler. +// +// CONTRACT: Tx must implement FeeTx to use MempoolFeeDecorator +type MempoolFeeDecorator struct { + BypassMinFeeMsgTypes []string +} + +func NewMempoolFeeDecorator(bypassMsgTypes []string) MempoolFeeDecorator { + return MempoolFeeDecorator{ + BypassMinFeeMsgTypes: bypassMsgTypes, + } +} + +func (mfd MempoolFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { + feeTx, ok := tx.(sdk.FeeTx) + if !ok { + return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") + } + + feeCoins := feeTx.GetFee() + gas := feeTx.GetGas() + msgs := feeTx.GetMsgs() + + // Only check for minimum fees if the execution mode is CheckTx and the tx does + // not contain operator configured bypass messages. If the tx does contain + // operator configured bypass messages only, it's total gas must be less than + // or equal to a constant, otherwise minimum fees are checked to prevent spam. + if ctx.IsCheckTx() && !simulate && !(mfd.bypassMinFeeMsgs(msgs) && gas <= uint64(len(msgs))*maxBypassMinFeeMsgGasUsage) { + minGasPrices := ctx.MinGasPrices() + if !minGasPrices.IsZero() { + requiredFees := make(sdk.Coins, len(minGasPrices)) + + // Determine the required fees by multiplying each required minimum gas + // price by the gas limit, where fee = ceil(minGasPrice * gasLimit). + glDec := sdk.NewDec(int64(gas)) + for i, gp := range minGasPrices { + fee := gp.Amount.Mul(glDec) + requiredFees[i] = sdk.NewCoin(gp.Denom, fee.Ceil().RoundInt()) + } + + if !feeCoins.IsAnyGTE(requiredFees) { + return ctx, sdkerrors.Wrapf(sdkerrors.ErrInsufficientFee, "insufficient fees; got: %s required: %s", feeCoins, requiredFees) + } + } + } + + return next(ctx, tx, simulate) +} + +func (mfd MempoolFeeDecorator) bypassMinFeeMsgs(msgs []sdk.Msg) bool { + for _, msg := range msgs { + if tmstrings.StringInSlice(sdk.MsgTypeURL(msg), mfd.BypassMinFeeMsgTypes) { + continue + } + + return false + } + + return true +} diff --git a/ante/fee_test.go b/ante/fee_test.go new file mode 100644 index 00000000000..0d454868d56 --- /dev/null +++ b/ante/fee_test.go @@ -0,0 +1,59 @@ +package ante_test + +import ( + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + ibcclienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + ibcchanneltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + + "github.com/cosmos/gaia/v7/ante" +) + +func (s *IntegrationTestSuite) TestMempoolFeeDecorator() { + s.SetupTest() + s.txBuilder = s.clientCtx.TxConfig.NewTxBuilder() + + mfd := ante.NewMempoolFeeDecorator([]string{ + sdk.MsgTypeURL(&ibcchanneltypes.MsgRecvPacket{}), + sdk.MsgTypeURL(&ibcchanneltypes.MsgAcknowledgement{}), + sdk.MsgTypeURL(&ibcclienttypes.MsgUpdateClient{}), + }) + antehandler := sdk.ChainAnteDecorators(mfd) + priv1, _, addr1 := testdata.KeyTestPubAddr() + + msg := testdata.NewTestMsg(addr1) + feeAmount := testdata.NewTestFeeAmount() + gasLimit := testdata.NewTestGasLimit() + s.Require().NoError(s.txBuilder.SetMsgs(msg)) + s.txBuilder.SetFeeAmount(feeAmount) + s.txBuilder.SetGasLimit(gasLimit) + + privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{0}, []uint64{0} + tx, err := s.CreateTestTx(privs, accNums, accSeqs, s.ctx.ChainID()) + s.Require().NoError(err) + + // Set high gas price so standard test fee fails + feeAmt := sdk.NewDecCoinFromDec("uatom", sdk.NewDec(200).Quo(sdk.NewDec(100000))) + minGasPrice := []sdk.DecCoin{feeAmt} + s.ctx = s.ctx.WithMinGasPrices(minGasPrice).WithIsCheckTx(true) + + // antehandler errors with insufficient fees + _, err = antehandler(s.ctx, tx, false) + s.Require().Error(err, "expected error due to low fee") + + // ensure no fees for certain IBC msgs + s.Require().NoError(s.txBuilder.SetMsgs( + ibcchanneltypes.NewMsgRecvPacket(ibcchanneltypes.Packet{}, nil, ibcclienttypes.Height{}, ""), + )) + + oracleTx, err := s.CreateTestTx(privs, accNums, accSeqs, s.ctx.ChainID()) + _, err = antehandler(s.ctx, oracleTx, false) + s.Require().NoError(err, "expected min fee bypass for IBC messages") + + s.ctx = s.ctx.WithIsCheckTx(false) + + // antehandler should not error since we do not check min gas prices in DeliverTx + _, err = antehandler(s.ctx, tx, false) + s.Require().NoError(err, "unexpected error during DeliverTx") +} diff --git a/app/app.go b/app/app.go index 31d7534c499..8b2ee1b7cea 100644 --- a/app/app.go +++ b/app/app.go @@ -104,11 +104,13 @@ import ( tmos "github.com/tendermint/tendermint/libs/os" dbm "github.com/tendermint/tm-db" - gaiaappparams "github.com/cosmos/gaia/v7/app/params" "github.com/strangelove-ventures/packet-forward-middleware/v2/router" routerkeeper "github.com/strangelove-ventures/packet-forward-middleware/v2/router/keeper" routertypes "github.com/strangelove-ventures/packet-forward-middleware/v2/router/types" + gaiaante "github.com/cosmos/gaia/v7/ante" + gaiaappparams "github.com/cosmos/gaia/v7/app/params" + // unnamed import of statik for swagger UI support _ "github.com/cosmos/cosmos-sdk/client/docs/statik" ) @@ -602,8 +604,8 @@ func NewGaiaApp( app.MountTransientStores(tkeys) app.MountMemoryStores(memKeys) - anteHandler, err := NewAnteHandler( - HandlerOptions{ + anteHandler, err := gaiaante.NewAnteHandler( + gaiaante.HandlerOptions{ HandlerOptions: ante.HandlerOptions{ AccountKeeper: app.AccountKeeper, BankKeeper: app.BankKeeper, @@ -611,7 +613,8 @@ func NewGaiaApp( SignModeHandler: encodingConfig.TxConfig.SignModeHandler(), SigGasConsumer: ante.DefaultSigVerificationGasConsumer, }, - IBCkeeper: app.IBCKeeper, + IBCkeeper: app.IBCKeeper, + BypassMinFeeMsgTypes: cast.ToStringSlice(appOpts.Get(gaiaappparams.BypassMinFeeMsgTypesKey)), }, ) if err != nil { diff --git a/app/helpers/test_helpers.go b/app/helpers/test_helpers.go index 4f6ec87af43..d131e7ed654 100644 --- a/app/helpers/test_helpers.go +++ b/app/helpers/test_helpers.go @@ -1,6 +1,87 @@ package helpers +import ( + "encoding/json" + "testing" + "time" + + "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmtypes "github.com/tendermint/tendermint/types" + dbm "github.com/tendermint/tm-db" + + gaiaapp "github.com/cosmos/gaia/v7/app" +) + // SimAppChainID hardcoded chainID for simulation const ( SimAppChainID = "gaia-app" ) + +// DefaultConsensusParams defines the default Tendermint consensus params used +// in GaiaApp testing. +var DefaultConsensusParams = &abci.ConsensusParams{ + Block: &abci.BlockParams{ + MaxBytes: 200000, + MaxGas: 2000000, + }, + Evidence: &tmproto.EvidenceParams{ + MaxAgeNumBlocks: 302400, + MaxAgeDuration: 504 * time.Hour, // 3 weeks is the max duration + MaxBytes: 10000, + }, + Validator: &tmproto.ValidatorParams{ + PubKeyTypes: []string{ + tmtypes.ABCIPubKeyTypeEd25519, + }, + }, +} + +type EmptyAppOptions struct{} + +func (EmptyAppOptions) Get(o string) interface{} { return nil } + +func Setup(t *testing.T, isCheckTx bool, invCheckPeriod uint) *gaiaapp.GaiaApp { + t.Helper() + + app, genesisState := setup(!isCheckTx, invCheckPeriod) + if !isCheckTx { + // InitChain must be called to stop deliverState from being nil + stateBytes, err := json.MarshalIndent(genesisState, "", " ") + require.NoError(t, err) + + // Initialize the chain + app.InitChain( + abci.RequestInitChain{ + Validators: []abci.ValidatorUpdate{}, + ConsensusParams: DefaultConsensusParams, + AppStateBytes: stateBytes, + }, + ) + } + + return app +} + +func setup(withGenesis bool, invCheckPeriod uint) (*gaiaapp.GaiaApp, gaiaapp.GenesisState) { + db := dbm.NewMemDB() + encCdc := gaiaapp.MakeEncodingConfig() + app := gaiaapp.NewGaiaApp( + log.NewNopLogger(), + db, + nil, + true, + map[int64]bool{}, + gaiaapp.DefaultNodeHome, + invCheckPeriod, + encCdc, + EmptyAppOptions{}, + ) + if withGenesis { + return app, gaiaapp.NewDefaultGenesisState() + } + + return app, gaiaapp.GenesisState{} +} diff --git a/app/params/config.go b/app/params/config.go new file mode 100644 index 00000000000..aead6b5e680 --- /dev/null +++ b/app/params/config.go @@ -0,0 +1,35 @@ +package params + +import ( + serverconfig "github.com/cosmos/cosmos-sdk/server/config" +) + +var ( + // BypassMinFeeMsgTypesKey defines the configuration key for the + // BypassMinFeeMsgTypes value. + // nolint: gosec + BypassMinFeeMsgTypesKey = "bypass-min-fee-msg-types" + + // CustomConfigTemplate defines Gaia's custom application configuration TOML + // template. It extends the core SDK template. + CustomConfigTemplate = serverconfig.DefaultConfigTemplate + ` +############################################################################### +### Custom Gaia Configuration ### +############################################################################### +# bypass-min-fee-msg-types defines custom message types the operator may set that +# will bypass minimum fee checks during CheckTx. +# +# Example: +# ["/ibc.core.channel.v1.MsgRecvPacket", "/ibc.core.channel.v1.MsgAcknowledgement", ...] +bypass-min-fee-msg-types = [{{ range .BypassMinFeeMsgTypes }}{{ printf "%q, " . }}{{end}}] +` +) + +// CustomAppConfig defines Gaia's custom application configuration. +type CustomAppConfig struct { + serverconfig.Config + + // BypassMinFeeMsgTypes defines custom message types the operator may set that + // will bypass minimum fee checks during CheckTx. + BypassMinFeeMsgTypes []string `mapstructure:"bypass-min-fee-msg-types"` +} diff --git a/cmd/gaiad/cmd/root.go b/cmd/gaiad/cmd/root.go index 251ef05884f..111ad1e86b0 100644 --- a/cmd/gaiad/cmd/root.go +++ b/cmd/gaiad/cmd/root.go @@ -24,6 +24,8 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" + ibcclienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + ibcchanneltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" "github.com/spf13/cast" "github.com/spf13/cobra" tmcli "github.com/tendermint/tendermint/libs/cli" @@ -77,21 +79,18 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { } func initAppConfig() (string, interface{}) { - - type CustomAppConfig struct { - serverconfig.Config - } - - // Allow overrides to the SDK default server config srvCfg := serverconfig.DefaultConfig() srvCfg.StateSync.SnapshotInterval = 1000 srvCfg.StateSync.SnapshotKeepRecent = 10 - GaiaAppCfg := CustomAppConfig{Config: *srvCfg} - - GaiaAppTemplate := serverconfig.DefaultConfigTemplate - - return GaiaAppTemplate, GaiaAppCfg + return params.CustomConfigTemplate, params.CustomAppConfig{ + Config: *srvCfg, + BypassMinFeeMsgTypes: []string{ + sdk.MsgTypeURL(&ibcchanneltypes.MsgRecvPacket{}), + sdk.MsgTypeURL(&ibcchanneltypes.MsgAcknowledgement{}), + sdk.MsgTypeURL(&ibcclienttypes.MsgUpdateClient{}), + }, + } } func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { diff --git a/cmd/gaiad/cmd/root_test.go b/cmd/gaiad/cmd/root_test.go index 1077e98bac8..b88cdbb8a15 100644 --- a/cmd/gaiad/cmd/root_test.go +++ b/cmd/gaiad/cmd/root_test.go @@ -4,14 +4,13 @@ import ( "testing" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" + "github.com/stretchr/testify/require" app "github.com/cosmos/gaia/v7/app" "github.com/cosmos/gaia/v7/cmd/gaiad/cmd" - "github.com/stretchr/testify/require" ) func TestRootCmdConfig(t *testing.T) { - rootCmd, _ := cmd.NewRootCmd() rootCmd.SetArgs([]string{ "config", // Test the config cmd diff --git a/cmd/gaiad/cmd/testnet.go b/cmd/gaiad/cmd/testnet.go index 8dcd767ae3c..063f37fc5b4 100644 --- a/cmd/gaiad/cmd/testnet.go +++ b/cmd/gaiad/cmd/testnet.go @@ -33,6 +33,10 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + ibcclienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" + ibcchanneltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" + + "github.com/cosmos/gaia/v7/app/params" ) var ( @@ -121,13 +125,20 @@ func InitTestnet( nodeIDs := make([]string, numValidators) valPubKeys := make([]cryptotypes.PubKey, numValidators) - simappConfig := srvconfig.DefaultConfig() + simappConfig := params.CustomAppConfig{ + Config: *srvconfig.DefaultConfig(), + } simappConfig.MinGasPrices = minGasPrices simappConfig.API.Enable = true simappConfig.Telemetry.Enabled = true simappConfig.Telemetry.PrometheusRetentionTime = 60 simappConfig.Telemetry.EnableHostnameLabel = false simappConfig.Telemetry.GlobalLabels = [][]string{{"chain_id", chainID}} + simappConfig.BypassMinFeeMsgTypes = []string{ + sdk.MsgTypeURL(&ibcchanneltypes.MsgRecvPacket{}), + sdk.MsgTypeURL(&ibcchanneltypes.MsgAcknowledgement{}), + sdk.MsgTypeURL(&ibcclienttypes.MsgUpdateClient{}), + } var ( genAccounts []authtypes.GenesisAccount diff --git a/docs/governance/formatting.md b/docs/governance/formatting.md index cfe6a951858..07ab8df51a0 100644 --- a/docs/governance/formatting.md +++ b/docs/governance/formatting.md @@ -88,7 +88,8 @@ You use can also use [Hubble](https://hubble.figment.network/cosmos/chains/cosmo ## Params Change -**Note:** Changes to the [`gov` module](https://docs.cosmos.network/v0.45/modules/gov/) are different from the other kinds of parameter changes because `gov` has subkeys, [as discussed here](https://github.com/cosmos/cosmos-sdk/issues/5800). Only the `key` part of the JSON file is different for `gov` parameter-change proposals. + +**Note:** Changes to the [`gov` module](https://docs.cosmos.network/main/modules/gov/) are different from the other kinds of parameter changes because `gov` has subkeys, [as discussed here](https://github.com/cosmos/cosmos-sdk/issues/5800). Only the `key` part of the JSON file is different for `gov` parameter-change proposals. For parameter-change proposals, there are seven (7) components: @@ -131,7 +132,9 @@ The deposit `denom` is `uatom` and `amount` is `100000`. Since 1,000,000 micro-A ### Mainnet Example -To date, the Cosmos Hub's parameters have not been changed by a parameter-change governance proposal. This is a hypothetical example of the JSON file that would be used with a command line transaction to create a new proposal. This is an example of a proposal that changes two parameters, and both parameters are from the [`slashing` module](https://docs.cosmos.network/v0.45/modules/slashing/). A single parameter-change governance proposal can reportedly change any number of parameters. + +To date, the Cosmos Hub's parameters have not been changed by a parameter-change governance proposal. This is a hypothetical example of the JSON file that would be used with a command line transaction to create a new proposal. This is an example of a proposal that changes two parameters, and both parameters are from the [`slashing` module](https://docs.cosmos.network/main/modules/slashing/). A single parameter-change governance proposal can reportedly change any number of parameters. + ```json { diff --git a/docs/governance/params-change/Crisis.md b/docs/governance/params-change/Crisis.md index 69d1349596a..00d42ac0b32 100644 --- a/docs/governance/params-change/Crisis.md +++ b/docs/governance/params-change/Crisis.md @@ -20,7 +20,7 @@ The `crisis` module is responsible for halting the blockchain under the circumst ### `ConstantFee` **The amount required to send a message to halt the Cosmos Hub chain if an invariant is broken, in micro-ATOM.** -A Cosmos account (address) can send a transaction message that will halt the Cosmos Hub chain if an invariant is broken. An example of this would be if all of the account balances in total did not equal the total supply. This kind of transaction could consume excessive amounts of gas to compute, beyond the maximum allowable block gas limit. `ConstantFee` makes it possible to bypass the gas limit in order to process this transaction, while setting a cost to disincentivize using the function to attack the network. The cost of the transaction is `1333000000` `uatom` (1,333 ATOM) and will effectively not be paid if the chain halts due to a broken invariant (which similar to being refunded). If the invariant is not broken, then `ConstantFee` will be paid. All in Bits has published more information about the [crisis module here](https://docs.cosmos.network/v0.45/modules/crisis/). +A Cosmos account (address) can send a transaction message that will halt the Cosmos Hub chain if an invariant is broken. An example of this would be if all of the account balances in total did not equal the total supply. This kind of transaction could consume excessive amounts of gas to compute, beyond the maximum allowable block gas limit. `ConstantFee` makes it possible to bypass the gas limit in order to process this transaction, while setting a cost to disincentivize using the function to attack the network. The cost of the transaction is `1333000000` `uatom` (1,333 ATOM) and will effectively not be paid if the chain halts due to a broken invariant (which similar to being refunded). If the invariant is not broken, then `ConstantFee` will be paid. All in Bits has published more information about the [crisis module here](https://docs.cosmos.network/main/modules/crisis/). * on-chain value: `{{ $themeConfig.currentParameters.crisis.ConstantFee }}` * `cosmoshub-4` default: `1333000000` `uatom` @@ -33,4 +33,4 @@ Decreasing the value of the `ConstantFee` parameter will reduce the cost of chec Increasing the value of the `ConstantFee` parameter will increase the cost of checking an invariant. This will likely make it more difficult to halt the chain if an invariant is actually broken, but it will increase the cost for an attacker to use this function to slow block production. #### Notes -Only registered invariants may be checked with this transaction message. Validators are reportedly performant enough to handle large computations like invariant checks, and the likely outcome of multiple invariant checks would be longer block times. In the code, there is a comment that indicates that the designers were targeting $5000 USD as the required amount of ATOMs to run an invariant check. \ No newline at end of file +Only registered invariants may be checked with this transaction message. Validators are reportedly performant enough to handle large computations like invariant checks, and the likely outcome of multiple invariant checks would be longer block times. In the code, there is a comment that indicates that the designers were targeting $5000 USD as the required amount of ATOMs to run an invariant check. diff --git a/docs/governance/params-change/Slashing.md b/docs/governance/params-change/Slashing.md index f92e5a2c8fe..80fd109bd6c 100644 --- a/docs/governance/params-change/Slashing.md +++ b/docs/governance/params-change/Slashing.md @@ -26,7 +26,7 @@ If a validator in the active set is offline for too long, the validator will be How long is being offline for too long? There are two components: `SignedBlocksWindow` and [`MinSignedPerWindow`](#MinSignedPerWindow). Since `MinSignedPerWindow` is 5% and `SignedBlocksWindow` is 10,000, a validator must have signed at least 5% of 10,000 blocks (500 out of 10,000) at any given time to comply with protocol rules. That means a validator that misses 9,500 consecutive blocks will be considered by the system to have committed a liveness violation. The time window for being offline without breaking system rules is proportional to this parameter. -All in Bits has published more about liveness [here](https://docs.cosmos.network/v0.45/modules/slashing/04_begin_block.html). +All in Bits has published more about liveness [here](https://docs.cosmos.network/main/modules/slashing/04_begin_block.html). #### Decreasing the value of `SignedBlocksWindow` Decreasing the value of the `SignedBlocksWindow` parameter will decrease the window for complying with the system's liveness rules. This will make it more likely that offline validators will be slashed by [`SlashFractionDowntime`](#SlashFractionDowntime) and temporarily removed from the active set for at least [`DowntimeJailDuration`](#DowntimeJailDuration). While out of the active set, the votes of the validator and its delegators do not count toward governance proposals. @@ -61,7 +61,8 @@ If a validator in the active set is offline for too long, the validator will be How long is being offline for too long? There are two components: [`SignedBlocksWindow`](#SignedBlocksWindow) and `MinSignedPerWindow`. Since `MinSignedPerWindow` is 5% and `SignedBlocksWindow` is 10,000, a validator must have signed at least 5% of 10,000 blocks (500 out of 10,000) at any given time to comply with protocol rules. That means a validator that misses 9,500 consecutive blocks will be considered by the system to have committed a liveness violation. The threshold-proportion of blocks is determined by this parameter, so the greater that `MinSignedPerWindow` is, the lower the tolerance for missed blocks by the system. -All in Bits has published more about liveness [here](https://docs.cosmos.network/v0.45/modules/slashing/04_begin_block.html). + +All in Bits has published more about liveness [here](https://docs.cosmos.network/main/modules/slashing/04_begin_block.html). #### Decreasing the value of `MinSignedPerWindow` Decreasing the value of the `MinSignedPerWindow` parameter will increase the threshold for complying with the system's liveness rules. This will make it less likely that offline validators will be slashed by [`SlashFractionDowntime`](#5-SlashFractionDowntime) and temporarily removed from the active set for at least [`DowntimeJailDuration`](#3-DowntimeJailDuration). While out of the active set, the votes of the validator and its delegators do not count toward governance proposals. @@ -92,9 +93,11 @@ That's ~17.5 hours instead of ~18.5 hours, assuming 7s block times. * `cosmoshub-4` default: `600000000000` * `cosmoshub-3` default: `600000000000` -A validator in the active set that's offline for too long, besides being slashed, will be temporarily removed from the active set (aka "[jailed](https://docs.cosmos.network/v0.45/modules/slashing/03_messages.html#unjail)") for at least [`DowntimeJailDuration`](#DowntimeJailDuration), which is 10 minutes (`600000000000` nanoseconds). During this time, a validator is not able to sign blocks and its delegators will not earn staking rewards. After the `DowntimeJailDuration` period has passed, the validator operator may send an "[unjail](https://docs.cosmos.network/v0.45/modules/slashing/03_messages.html#unjail)" transaction to resume validator operations. -All in Bits has published more about liveness [here](https://docs.cosmos.network/v0.45/modules/slashing/04_begin_block.html). +A validator in the active set that's offline for too long, besides being slashed, will be temporarily removed from the active set (aka "[jailed](https://docs.cosmos.network/main/modules/slashing/03_messages.html#unjail)") for at least [`DowntimeJailDuration`](#DowntimeJailDuration), which is 10 minutes (`600000000000` nanoseconds). During this time, a validator is not able to sign blocks and its delegators will not earn staking rewards. After the `DowntimeJailDuration` period has passed, the validator operator may send an "[unjail](https://docs.cosmos.network/main/modules/slashing/03_messages.html#unjail)" transaction to resume validator operations. + +All in Bits has published more about liveness [here](https://docs.cosmos.network/main/modules/slashing/04_begin_block.html). + #### Decreasing the value of `DowntimeJailDuration` Decreasing the value of the `DowntimeJailDuration` parameter will require a validator to wait less time before resuming validator operations. During this time, a validator is not able to sign blocks and its delegators will not earn staking rewards. @@ -109,7 +112,8 @@ Increasing the value of the `DowntimeJailDuration` parameter will require a vali * `cosmoshub-4` default: `0.050000000000000000` * `cosmoshub-3` default: `0.050000000000000000` -A validator proven to have signed two blocks at the same height is considered to have committed equivocation, and the system will then permanently burn ("slash") that validator's total delegations (aka stake-backing) by `0.050000000000000000` (5%). All delegators to an offending validator will lose 5% of all ATOMs delegated to this validator. At this point the validator will be "[tombstoned](https://docs.cosmos.network/v0.45/modules/slashing/01_concepts.html)," which means the validator will be permanently removed from the active set of validators, and the validator's stake-backing will only be slashed one time (regardless of how many equivocations). + +A validator proven to have signed two blocks at the same height is considered to have committed equivocation, and the system will then permanently burn ("slash") that validator's total delegations (aka stake-backing) by `0.050000000000000000` (5%). All delegators to an offending validator will lose 5% of all ATOMs delegated to this validator. At this point the validator will be "[tombstoned](https://docs.cosmos.network/main/modules/slashing/01_concepts.html)," which means the validator will be permanently removed from the active set of validators, and the validator's stake-backing will only be slashed one time (regardless of how many equivocations). #### Decreasing the value of `SlashFractionDoubleSign` Decreasing the value of the `SlashFractionDoubleSign` parameter will lessen the penalty for equivocation, and offending validators will have a smaller proportion of their stake-backing burned. This may reduce the motivation for operators to ensure that their validators are secure. @@ -124,7 +128,7 @@ Increasing the value of the `SlashFractionDoubleSign` parameter will heighten th * `cosmoshub-4` default: `0.000100000000000000` * `cosmoshub-3` default: `0.000100000000000000` -If a validator in the active set is offline for too long, the system will permanently burn ("slash") that validator's total delegations (aka stake-backing) by a `SlashFractionDowntime` of `0.000100000000000000` (0.01%). All delegators to an offending validator will lose 0.01% of all ATOMs delegated to this validator. At this point the validator will be "[jailed](https://docs.cosmos.network/v0.45/modules/slashing/03_messages.html#unjail)," which means the validator will be temporarily removed from the active set of validators so the validator's stake-backing will only be slashed one time. +If a validator in the active set is offline for too long, the system will permanently burn ("slash") that validator's total delegations (aka stake-backing) by a `SlashFractionDowntime` of `0.000100000000000000` (0.01%). All delegators to an offending validator will lose 0.01% of all ATOMs delegated to this validator. At this point the validator will be "[jailed](https://docs.cosmos.network/main/modules/slashing/03_messages.html#unjail)," which means the validator will be temporarily removed from the active set of validators so the validator's stake-backing will only be slashed one time. #### Decreasing the value of `SlashFractionDowntime` Decreasing the value of the `SlashFractionDowntime` parameter will lessen the penalty for liveness violations, and offending validators will have a smaller proportion of their stake-backing burned. This may reduce the motivation for operators to ensure that their validators are online. @@ -137,4 +141,4 @@ Increasing the value of the `SlashFractionDowntime` parameter will heighten the * `cosmoshub-3` default: `1814400000000000` -This parameter was present in `cosmoshub-3`, but was [deprecated](https://github.com/cosmos/cosmos-sdk/pull/5952) for `cosmoshub-4` genesis. \ No newline at end of file +This parameter was present in `cosmoshub-3`, but was [deprecated](https://github.com/cosmos/cosmos-sdk/pull/5952) for `cosmoshub-4` genesis. diff --git a/docs/governance/params-change/param-index.md b/docs/governance/params-change/param-index.md index 575442977e2..6b4440ea8fb 100644 --- a/docs/governance/params-change/param-index.md +++ b/docs/governance/params-change/param-index.md @@ -11,7 +11,8 @@ Given a subspace and an associated key, you can query on chain parameters using ``` bash gaiad query params subspace --node --chain-id ``` -For more information on specific modules, refer to the [Cosmos SDK documentation on modules](https://docs.cosmos.network/v0.45/). + +For more information on specific modules, refer to the [Cosmos SDK documentation on modules](https://docs.cosmos.network/main/). ## Current subspaces, keys, and values diff --git a/docs/governance/proposals/2021-09-hub-ibc-router/README.md b/docs/governance/proposals/2021-09-hub-ibc-router/README.md index adf504b2e57..78775efa7cf 100644 --- a/docs/governance/proposals/2021-09-hub-ibc-router/README.md +++ b/docs/governance/proposals/2021-09-hub-ibc-router/README.md @@ -43,7 +43,7 @@ This is a proposal to include a new feature to IBC on the Hub that allows for mu Strangelove Ventures has delivered an [IBC Middleware module](https://github.com/cosmos/ibc-go/pull/373) that will allow the hub to play the role of IBC Router that was always envisioned for it. Passing of this propsal will begin the era of the Hub offering interchain services to other chains and profiting from those relationships. -To pay the hub validators and stakers, this proposal implements a governance configurable fee (which we propose should be initially set to 0.0 to encourage adoption) that will be taken out of each packet and given to the community pool. The community pool will then periodically trade these fees for ATOM and distribute them to staked holders. The exact distribution method of these fees is left TBD in this proposal as it is not initially required and can be implemented in a future governance proposal. One way to do this would be using the [Groups module](https://docs.cosmos.network/v0.45/architecture/adr-042-group-module.html), Community spend proposals and the Gravity DEX. +To pay the hub validators and stakers, this proposal implements a governance configurable fee (which we propose should be initially set to 0.0 to encourage adoption) that will be taken out of each packet and given to the community pool. The community pool will then periodically trade these fees for ATOM and distribute them to staked holders. The exact distribution method of these fees is left TBD in this proposal as it is not initially required and can be implemented in a future governance proposal. One way to do this would be using the [Groups module](https://docs.cosmos.network/main/architecture/adr-042-group-module.html), Community spend proposals and the Gravity DEX. A vote YES on this proposal indicates that this feature should be included in the next hub upgrade. We (as the Hub) believe that time is critical right now and we cannot wait to begin providing this service to other chains. A NO vote indicates that this shouldn't be included in the next upgrade. - \ No newline at end of file + diff --git a/docs/governance/state-of-cosmos-governance-2021.md b/docs/governance/state-of-cosmos-governance-2021.md index ff2c19710f4..bf178d5d972 100644 --- a/docs/governance/state-of-cosmos-governance-2021.md +++ b/docs/governance/state-of-cosmos-governance-2021.md @@ -7,7 +7,7 @@ The Cosmos ecosystem emphasizes governance mechanisms in order to achieve the vision of an ecosystem of interoperable blockchains supported by interchain infrastructure and services on the Cosmos Hub and beyond. The intent is that Cosmos Hub is operated by the community of code development teams supported by the Interchain Foundation, validators and ATOM token holders as a form of distributed organization. -Cosmos Hub has a [Governance (x/gov) module](https://docs.cosmos.network/v0.45/modules/gov/) for coordinating various changes to the blockchain through parameters, upgrades and proposals (the [white paper](https://v1.cosmos.network/resources/whitepaper) refers to text amendments to the "human-readable constitution" setting out Cosmos Hub policies). However, the ecosystem also has additional on- and off- chain processes that exist to set technical direction and inculcate social norms. +Cosmos Hub has a [Governance (x/gov) module](https://docs.cosmos.network/main/modules/gov/) for coordinating various changes to the blockchain through parameters, upgrades and proposals (the [white paper](https://v1.cosmos.network/resources/whitepaper) refers to text amendments to the "human-readable constitution" setting out Cosmos Hub policies). However, the ecosystem also has additional on- and off- chain processes that exist to set technical direction and inculcate social norms. Reviewing existing governance documentation and discussion, a few key themes surfaced: @@ -21,7 +21,7 @@ Each blockchain in the Cosmos ecosystem can be tailored to a specific applicatio ### Development of Governance Processes Over Time -The existing [governance module](https://docs.cosmos.network/v0.45/modules/gov/) is described as a minimum viable product for the governance module, with [ideas for future improvement](https://docs.cosmos.network/v0.45/modules/gov/05_future_improvements.html) . For example an active product team is currently aligning [groups and governance functionality](https://docs.google.com/document/d/1w-fwa8i8kkgirbn9DOFklHwcu9xO_IdbMN910ASr2oQ/edit#) will change current governance practices and open up new avenues to explore and support through on- and off- chain processes +The existing [governance module](https://docs.cosmos.network/main/modules/gov/) is described as a minimum viable product for the governance module, with [ideas for future improvement](https://docs.cosmos.network/main/modules/gov/05_future_improvements.html) . For example an active product team is currently aligning [groups and governance functionality](https://docs.google.com/document/d/1w-fwa8i8kkgirbn9DOFklHwcu9xO_IdbMN910ASr2oQ/edit#) will change current governance practices and open up new avenues to explore and support through on- and off- chain processes ## On- and off-chain Governance Structure @@ -33,7 +33,7 @@ Governance practices and decisions are communicated through different types of d - On-chain governance [proposals](https://cosmoscan.net/governance-stats) - Decision records - Cosmos Improvement Proposals ([CIPs](https://cips.cosmos.network/)) - - Cosmos SDK's [ADRs](https://docs.cosmos.network/v0.45/architecture/) + - Cosmos SDK's [ADRs](https://docs.cosmos.network/main/architecture/) - Tendermint's [ADRs](https://github.com/tendermint/tendermint/tree/master/docs/architecture) - Technical standards / specifications - Interchain Standard ([ICS](https://github.com/cosmos/ibc)) @@ -243,7 +243,7 @@ ADRs serve as the main way to propose new feature designs, new processes, and to "An Architectural Decision (AD) is a software design choice that addresses a functional or non-functional requirement that is architecturally significant. An Architecturally Significant Requirement (ASR) is a requirement that has a measurable effect on a software system's architecture and quality. An Architectural Decision Record (ADR) captures a single AD, such as often done when writing personal notes or meeting minutes; the collection of ADRs created and maintained in a project constitute its decision log." -🔗 +🔗 ### Process overview @@ -252,10 +252,10 @@ ADRs serve as the main way to propose new feature designs, new processes, and to 1. Copy the adr-template.md file. Use the following filename pattern: adr-next_number-title.md 1. Create a draft Pull Request if you want to get an early feedback. 1. Make sure the context and a solution is clear and well documented. - 1. Add an entry to a list in the [README](https://docs.cosmos.network/v0.45/architecture/) file. + 1. Add an entry to a list in the [README](https://docs.cosmos.network/main/architecture/) file. 1. Create a Pull Request to propose a new ADR. - `` -- ADRs go through a lifecycle: + `` +- ADRs go through a lifecycle: ``` DRAFT -> PROPOSED -> LAST CALL yyyy-mm-dd -> ACCEPTED | REJECTED -> SUPERSEEDED by ADR-xxx diff --git a/docs/gtm-interchain.md b/docs/gtm-interchain.md index 34073bb9e12..56c496798a1 100644 --- a/docs/gtm-interchain.md +++ b/docs/gtm-interchain.md @@ -72,4 +72,4 @@ Further, we will need technical support that goes beyond the different phase rol The go-to-market team should be tracking the extent to which IBC is succeeding or failing in terms of key metrics. This will require continuous experimentation and coordination between entities. An example of a metric that best represents IBC go to market would be # of distinct IBC connections that transport x amount of value. To get to these metrics we need the developer resources and proven business models that encourage developers to use this technology. -The Cosmos-SDK exposes some [existing metrics for IBC](https://docs.cosmos.network/v0.45/core/telemetry.html#supported-metrics). +The Cosmos-SDK exposes some [existing metrics for IBC](https://docs.cosmos.network/main/core/telemetry.html#supported-metrics). diff --git a/docs/hub-tutorials/upgrade-node.md b/docs/hub-tutorials/upgrade-node.md index 2b1b5773cb2..a19ad13ff0c 100644 --- a/docs/hub-tutorials/upgrade-node.md +++ b/docs/hub-tutorials/upgrade-node.md @@ -8,7 +8,7 @@ This document describes the upgrade procedure of a `gaiad` full-node to a new ve ## Cosmovisor -The CosmosSDK provides a convenient process manager that wraps around the `gaiad` binary and can automatically swap in new binaries upon a successful governance upgrade proposal. Cosmovisor is entirely optional but recommended. More information can be found in [cosmos.network docs](https://docs.cosmos.network/v0.45/run-node/cosmovisor.html) and [cosmos-sdk/cosmovisor/readme](https://github.com/cosmos/cosmos-sdk/blob/master/cosmovisor/README.md). +The CosmosSDK provides a convenient process manager that wraps around the `gaiad` binary and can automatically swap in new binaries upon a successful governance upgrade proposal. Cosmovisor is entirely optional but recommended. More information can be found in [cosmos.network docs](https://docs.cosmos.network/main/run-node/cosmovisor.html) and [cosmos-sdk/cosmovisor/readme](https://github.com/cosmos/cosmos-sdk/blob/master/cosmovisor/README.md). ### Setup diff --git a/docs/launch/blog-2-en.md b/docs/launch/blog-2-en.md index 1ab13b561d9..e70fbe10433 100644 --- a/docs/launch/blog-2-en.md +++ b/docs/launch/blog-2-en.md @@ -65,5 +65,5 @@ To the Moon 🚀 [blog post]: [https://blog.cosmos.network/developer-deep-dive-cosmos-ibc-5855aaf183fe] -[ibc]: [https://docs.cosmos.network/v0.45/ibc/overview.html] - \ No newline at end of file +[ibc]: [https://docs.cosmos.network/main/ibc/overview.html] + diff --git a/docs/migration/cosmoshub-3.md b/docs/migration/cosmoshub-3.md index f90e7048a2a..c313bc9c922 100644 --- a/docs/migration/cosmoshub-3.md +++ b/docs/migration/cosmoshub-3.md @@ -71,7 +71,7 @@ major upgrade (`cosmoshub-3`). These changes notably consist of many new feature protocol changes, and application structural changes that favor developer ergonomics and application development. -First and foremost, [IBC](https://docs.cosmos.network/v0.45/ibc/overview.html) following +First and foremost, [IBC](https://docs.cosmos.network/main/ibc/overview.html) following the [Interchain Standads](https://github.com/cosmos/ics#ibc-quick-references) will be enabled. This upgrade comes with several improvements in efficiency, node synchronization and following blockchain upgrades. More details on the [Stargate Website](https://stargate.cosmos.network/). @@ -375,4 +375,4 @@ snapshot-interval = 0 snapshot-keep-recent = 2 ``` - \ No newline at end of file + diff --git a/docs/migration/cosmoshub-3[ES_es].md b/docs/migration/cosmoshub-3[ES_es].md index 78f0a01a72c..3e18e3841fb 100644 --- a/docs/migration/cosmoshub-3[ES_es].md +++ b/docs/migration/cosmoshub-3[ES_es].md @@ -35,7 +35,7 @@ Si quieres probar el procedimiento antes de que se produzca la actualización el Se han producido muchos cambios en el SDK de Cosmos y en la aplicación Gaia desde la última gran actualización (`cosmoshub-3`). Estos cambios consisten principalmente en muchas nuevas características, cambios de protocolo y cambios estructurales de la aplicación que favorecen la ergonomía del desarrollador y el desarrollo de la aplicación. -En primer lugar, se habilitará [IBC](https://docs.cosmos.network/v0.45/ibc/overview.html) siguiendo los [estándares de Interchain](https://github.com/cosmos/ics#ibc-quick-references). Esta actualización viene con varias mejoras en la eficiencia, la sincronización de nodos y las siguientes actualizaciones de la cadena de bloques. Más detalles en el [sitio web de Stargate](https://stargate.cosmos.network/). +En primer lugar, se habilitará [IBC](https://docs.cosmos.network/main/ibc/overview.html) siguiendo los [estándares de Interchain](https://github.com/cosmos/ics#ibc-quick-references). Esta actualización viene con varias mejoras en la eficiencia, la sincronización de nodos y las siguientes actualizaciones de la cadena de bloques. Más detalles en el [sitio web de Stargate](https://stargate.cosmos.network/). __La aplicación [Gaia](https://github.com/cosmos/gaia) v4.0.0 es lo que los operadores de nodos actualizarán y ejecutarán en esta próxima gran actualización__. Tras la versión v0.41.0 del SDK de Cosmos y la v0.34.3 de Tendermint. @@ -231,4 +231,4 @@ snapshot-interval = 0 snapshot-keep-recent = 2 ``` - \ No newline at end of file + diff --git a/docs/migration/cosmoshub-3[KR_kr].md b/docs/migration/cosmoshub-3[KR_kr].md index 5db1d8bad98..3a64ceea6d0 100644 --- a/docs/migration/cosmoshub-3[KR_kr].md +++ b/docs/migration/cosmoshub-3[KR_kr].md @@ -38,7 +38,7 @@ 지난 코스모스 허브 업그레이드(`cosmoshub-3`) 이후 코스모스 SDK와 Gaia 애플리케이션에 상당한 양의 변경사항이 적용되었습니다. 변경사항에는 신규 기능, 프로토콜 변경사항, 애플리케이션 구조 변경 등이 포함되었으며, 애플리케이션 개발 과정의 개선이 기대됩니다. -우선, [인터체인 표준](https://github.com/cosmos/ics#ibc-quick-references)를 따른 [IBC](https://docs.cosmos.network/v0.45/ibc/overview.html)이 활성화될 예정입니다. 또한 효율성, 노드 동기화, 추후 블록체인 업데이트 과정이 개선됩니다. 자세한 내용은 [스타게이트 웹사이트](https://stargate.cosmos.network/)를 참고하세요. +우선, [인터체인 표준](https://github.com/cosmos/ics#ibc-quick-references)를 따른 [IBC](https://docs.cosmos.network/main/ibc/overview.html)이 활성화될 예정입니다. 또한 효율성, 노드 동기화, 추후 블록체인 업데이트 과정이 개선됩니다. 자세한 내용은 [스타게이트 웹사이트](https://stargate.cosmos.network/)를 참고하세요. __이번 업그레이드에서 풀 노드 운영자 업그레이드를 진행하는 것은 [Gaia](https://github.com/cosmos/gaia) 애플리케이션 v4.0.0입니다. 이번 버전의 Gaia 애플리케이션은 코스모스 SDK v0.41.0 그리고 텐더민트 v0.34.3 기반으로 빌드되었습니다. @@ -237,4 +237,4 @@ snapshot-interval = 0 snapshot-keep-recent = 2 ``` - \ No newline at end of file + diff --git a/docs/validators/validator-faq.md b/docs/validators/validator-faq.md index 96ac673206e..c69682677d7 100644 --- a/docs/validators/validator-faq.md +++ b/docs/validators/validator-faq.md @@ -279,7 +279,7 @@ Running an effective operation is key to avoiding unexpected unbonding or slashi ### What are the maintenance requirements? -Validators are expected to perform regular software updates to accommodate chain upgrades and bug fixes. It is suggested to consider using [Cosmovisor](https://docs.cosmos.network/v0.45/run-node/cosmovisor.html) to partially automate this process. +Validators are expected to perform regular software updates to accommodate chain upgrades and bug fixes. It is suggested to consider using [Cosmovisor](https://docs.cosmos.network/main/run-node/cosmovisor.html) to partially automate this process. During an chain upgrade, progress is discussed in a private channel in the [Cosmos Developer Discord](https://discord.gg/cosmosnetwork). If your validator is in the active set we encourage you to request access to that channel by contacting a moderator. diff --git a/docs/validators/validator-setup.md b/docs/validators/validator-setup.md index 3a138dd791b..06e2565860d 100644 --- a/docs/validators/validator-setup.md +++ b/docs/validators/validator-setup.md @@ -144,7 +144,7 @@ You can find more advanced information about running a node or a validator on th Your validator has become jailed. Validators get jailed, i.e. get removed from the active validator set, if they do not vote on at least `500` of the last `10,000` blocks, or if they double sign. -If you got jailed for downtime, you can get your voting power back to your validator. First, if you're not using [Cosmovisor](https://docs.cosmos.network/v0.45/run-node/cosmovisor.html) and `gaiad` is not running, start it up again: +If you got jailed for downtime, you can get your voting power back to your validator. First, if you're not using [Cosmovisor](https://docs.cosmos.network/main/run-node/cosmovisor.html) and `gaiad` is not running, start it up again: ```bash gaiad start @@ -162,7 +162,7 @@ You may notice that your voting power is less than it used to be. That's because ### Problem #2: My `gaiad` crashes because of `too many open files` -The default number of files Linux can open (per-process) is `1024`. `gaiad` is known to open more than `1024` files. This causes the process to crash. A quick fix is to run `ulimit -n 4096` (increase the number of open files allowed) and then restarting the process with `gaiad start`. If you are using `systemd` or another process manager to launch `gaiad` (such as [Cosmovisor](https://docs.cosmos.network/v0.45/run-node/cosmovisor.html)) this may require some configuration at that level. A sample `systemd` file to fix this issue is below: +The default number of files Linux can open (per-process) is `1024`. `gaiad` is known to open more than `1024` files. This causes the process to crash. A quick fix is to run `ulimit -n 4096` (increase the number of open files allowed) and then restarting the process with `gaiad start`. If you are using `systemd` or another process manager to launch `gaiad` (such as [Cosmovisor](https://docs.cosmos.network/main/run-node/cosmovisor.html)) this may require some configuration at that level. A sample `systemd` file to fix this issue is below: ```toml # /etc/systemd/system/gaiad.service diff --git a/docs/zh/launch/blog-2-cn.md b/docs/zh/launch/blog-2-cn.md index 0f1462c2621..0f51b5c61d9 100644 --- a/docs/zh/launch/blog-2-cn.md +++ b/docs/zh/launch/blog-2-cn.md @@ -81,8 +81,7 @@ Cosmos浏览器是查看治理提案状态的最佳途径,可以在我们的 **摘要:** -第三阶段我们将会发布[IBC协议](https://docs.cosmos.network/v0.45/ibc/overview.html),并且对是否将其纳入Cosmos-SDK的核心模块库进行链上治理投票。 - +第三阶段我们将会发布[IBC协议](https://docs.cosmos.network/main/ibc/overview.html),并且对是否将其纳入Cosmos-SDK的核心模块库进行链上治理投票。 **对开发人员的建议**:使用Cosmos-SDK或Tendermint BFT构建的应用专有链将能够连接到 Cosmos Hub,并与连接到Hubs上的其他任意区块链进行跨链交互。