bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 74쪽
or a comprehensive list of all breaking changes, see the [Changelog](https://github.com/cosmos/cosmos-sdk/blob/release/v0.54.x/CHANGELOG.md).
The store package has been updated to `v2`. Applications using v0.54.0+ of
Cosmos SDK will be required to update imports to
`github.com/cosmos/cosmos-sdk/store/v2`.
`BaseApp.NewUncachedContext()` was deprecated as part of this work. With store v2, writes must go through a cache/branch first; the SDK no longer exposes a helper that lets applications write directly against the root `CommitMultiStore`.
If you previously used `BaseApp.NewUncachedContext()` in tests:
* Replace `app.NewUncachedContext(false, header)` with `app.NewNextBlockContext(header)` when the test needs a writable context between `Commit()` and the next `FinalizeBlock()`.
* Replace `app.NewUncachedContext(true, header)` with `app.NewContext(true)` or `app.NewContextLegacy(true, header)` when the test only needs the `CheckTx` state.
Below is an example of migrating away from `NewUncachedContext`.
```go theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
func TestApp(t *testing.T) {
db := dbm.NewMemDB()
logger := log.NewTestLogger(t)
app := NewSimappWithCustomOptions(t, false, SetupOptions{
Logger: logger.With("instance", "first"),
DB: db,
AppOpts: simtestutil.NewAppOptionsWithFlagHome(t.TempDir()),
})
/*
Before the updates, most code would look like:
ctx := gaiaApp.NewUncachedContext(true, tmproto.Header{}) // CheckTx context
app.MyKeeper.MyMethod(ctx, ...)
The main thing to be aware of is when you are using checkTx state and finalizeState.
NewNextBlockContext will overwrite the finalize state and return a context that writes to that state.
Reading from checkTx state without committing will not reflect the changes made in finalizeBlock state UNLESS you have committed.
*/
ctx := app.BaseApp.NewNextBlockContext(cmtproto.Header{}) // gets finalize block state
app.BankKeeper.SetSendEnabled(ctx, "foobar", true)
_, err := app.Commit() // commit the out-of-band changes.
require.NoError(t, err)
// since we committed, we can now read the out-of-band changes via checkTx state.
// If we didn't commit above, we could read this value by passing `false` to NewContext, which would give us a handle
// on the finalize block state. However, if you DID commit like we did above, you MUST use `true` here.
res, err := app.BankKeeper.SendEnabled(app.BaseApp.NewContext(true), &banktypes.QuerySendEnabledRequest{
Denoms: []string{"foobar"},
Pagination: nil,
})
require.NoError(t, err)
require.Len(t, res.SendEnabled, 1)
require.Equal(t, "foobar", res.SendEnabled[0].Denom)
}
```
## Conditional Changes
These changes apply if your chain uses the affected modules, packages, or integrations.
### Module Deprecations
Cosmos SDK v0.54.0 drops support for the circuit, nft, and crisis modules. Developers can still use these modules,
however, they will no longer be actively maintained by Cosmos Labs.
#### x/circuit
The circuit module is no longer being actively maintained by Cosmos Labs and was moved to `contrib/x/circuit`.
#### x/nft
The nft module is no longer being actively maintained by Cosmos Labs and was moved to `contrib/x/nft`.
#### x/crisis
The crisis module is no longer being actively maintained by Cosmos Labs and was moved to `contrib/x/crisis`.
### Cosmos Enterprise
[Cosmos Enterprise modules](/sdk/latest/enterprise/overview) are hardened Cosmos SDK modules for permissioned and production networks. The module source is published under the Source Available Evaluation License, and production use requires an Enterprise License from Cosmos Labs.
#### Groups Module
The groups module is now maintained under the Cosmos Enterprise offering. If your application uses `x/group`, you will need to migrate your code to the Enterprise-distributed package and obtain a Cosmos Enterprise license to continue using it. Please see [Cosmos Enterprise](/sdk/latest/enterprise/overview) to learn more.
#### PoA Module
Cosmos SDK v0.54 includes a Proof of Authority (POA) module under the Cosmos Enterprise offering. Please see [Cosmos Enterprise](/sdk/latest/enterprise/poa/overview) to learn more about using the PoA module in your application.
## New Features and Non-Breaking Changes
These changes are informational and optional to adopt during the upgrade; they are not required for a successful migration.
### Telemetry
The telemetry package has been deprecated and users are encouraged to switch to OpenTelemetry.
#### OpenTelemetry
Previously, Cosmos SDK telemetry support was provided by `github.com/hashicorp/go-metrics` which was undermaintained and only supported metrics instrumentation.
OpenTelemetry provides an integrated solution for metrics, traces, and logging which is widely adopted and actively maintained.
The existing wrapper functions in the `telemetry` package required acquiring mutex locks and map lookups for every metric operation which is suboptimal. OpenTelemetry's API uses atomic concurrency wherever possible and should introduce less performance overhead during metric collection.
See the [telemetry documentation](https://docs.cosmos.network/sdk/latest/guides/testing/telemetry) to learn how to set up OpenTelemetry with Cosmos SDK v0.54.0+.
Below is a quick reference on setting up and using meters and traces with OpenTelemetry:
```go theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
package mymodule
import (
"context"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/trace"
sdk "github.com/cosmos/cosmos-sdk/types"
)
// Declare package-level meter and tracer using otel.Meter() and otel.Tracer().
// Instruments should be created once at package initialization and reused.
var (
tracer = otel.Tracer("cosmos-sdk/x/mymodule")
meter = otel.Meter("cosmos-sdk/x/mymodule")
txCounter metric.Int64Counter
latencyHist metric.Float64Histogram
)
func init() {
var err error
txCounter, err = meter.Int64Counter(
"mymodule.tx.count",
metric.WithDescription("Number of transactions processed"),
)
if err != nil {
panic(err)
}
latencyHist, err = meter.Float64Histogram(
"mymodule.tx.latency",
metric.WithDescription("Transaction processing latency"),
metric.WithUnit("ms"),
)
if err != nil {
panic(err)
}
}
// ExampleWithContext demonstrates tracing with a standard context.Context.
// Use tracer.Start directly when you have a Go context.
func ExampleWithContext(ctx context.Context) error {
ctx, span := tracer.Start(ctx, "ExampleWithContext",
trace.WithAttributes(attribute.String("key", "value")),
)
defer span.End()
// Record metrics
txCounter.Add(ctx, 1)
if err := doWork(ctx); err != nil {
span.RecordError(err)
span.SetStatus(codes.Error, err.Error())
return err
}
return nil
}
// ExampleWithSDKContext demonstrates tracing with sdk.Context.
// Use ctx.StartSpan to properly propagate the span through the SDK context.
func ExampleWithSDKContext(ctx sdk.Context) error {
ctx, span := ctx.StartSpan(tracer, "ExampleWithSDKContext",
trace.WithAttributes(attribute.String("module", "mymodule")),
)
defer span.End()
// Record metrics (sdk.Context implements context.Context)
txCounter.Add(ctx, 1)
// Create child spans for sub-operations
ctx, childSpan := ctx.StartSpan(tracer, "ExampleWithSDKContext.SubOperation")
// ... do sub-operation work ...
childSpan.End()
return nil
}
```
### Centralized Authority via Consensus Params
Authority management can now be centralized via the `x/consensus` module. A new `AuthorityParams` field in `ConsensusParams` stores the authority address on-chain. When set, it takes precedence over the per-keeper authority parameter.
**This feature introduces no breaking changes**: Keeper constructors still accept the `authority` parameter. It is now used as a **fallback** when no authority is configured in consensus params. Existing code continues to work without changes.
#### How AuthorityParams Works
When a module validates authority (e.g., in `UpdateParams`), it checks consensus params first. If no authority is set there, it falls back to the keeper's `authority` field:
```go theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
authority := sdkCtx.Authority() // from consensus params
if authority == "" {
authority = k.authority // fallback to keeper field
}
if authority != msg.Authority {
return nil, errors.Wrapf(...)
}
```
To enable centralized authority, set the `AuthorityParams` in consensus params via a governance proposal targeting the `x/consensus` module's `MsgUpdateParams`.
## Upgrade Handler
This section provides a reference example for implementing the on-chain upgrade itself.
The following is an example upgrade handler for upgrading from **v0.53.6** to **v0.54.0**.
```go theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
const UpgradeName = "v0.53.6-to-v0.54.0"
func (app SimApp) RegisterUpgradeHandlers() {
app.UpgradeKeeper.SetUpgradeHandler(
UpgradeName,
func(ctx context.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return app.ModuleManager.RunMigrations(ctx, app.Configurator(), fromVM)
},
)
upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
if err != nil {
panic(err)
}
if upgradeInfo.Name == UpgradeName && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
storeUpgrades := storetypes.StoreUpgrades{
Added: []string{},
}
// configure store loader that checks if version == upgradeHeight and applies store upgrades
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
}
}
```
## IBC v11 Updates
IBC v11 introduces several improvements, removes long-deprecated APIs (`ParamSubspace` from all Keeper constructors, `MsgSubmitMisbehaviour`, and `ibcwasmtypes.Checksums`), and adds custom address codec support in the transfer module to enable Cosmos EVM compatibility with IBC transfers.
Read the [Changelog](https://github.com/cosmos/ibc-go/blob/main/CHANGELOG.md) and [v11 Migration Guide](https://docs.cosmos.network/ibc/latest/migrations/v10-to-v11) for more information.
## Cosmos Performance Upgrades (Experimental)
For Q1 of 2026, Cosmos Labs has been focusing on greatly improving performance of Cosmos SDK applications. v0.54 of Cosmos SDK introduces support for several performance-related features across the stack. The SDK introduces [BlockSTM](#blockstm) for concurrent transactions, and CometBFT introduces [LibP2P](#libp2p) and [`AdaptiveSync`](#adaptivesync).
NOTE: It is important to emphasize that the following are **experimental** features. We DO NOT recommend running chains with these features enabled in production without extensive testing.
### Cosmos SDK
#### BlockSTM
BlockSTM enables deterministic, concurrent execution of transactions, improving block execution speeds and throughput.
Developers interested in experimenting with BlockSTM should read the [documentation](https://docs.cosmos.network/sdk/latest/experimental/blockstm).
Below is an example of setting up BlockSTM:
> **⚠️ Warning:** BlockSTM is experimental. Ensure thorough testing before enabling in production.
```go theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
import (
"runtime"
"github.com/cosmos/cosmos-sdk/baseapp/blockstm"
)
oKeys := storetypes.NewObjectStoreKeys(banktypes.ObjectStoreKey)
keys := storetypes.NewKVStoreKeys(
authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey,
// ... other store keys
)
// Collect non-transient store keys
var nonTransientKeys []storetypes.StoreKey
for _, k := range keys {
nonTransientKeys = append(nonTransientKeys, k)
}
for _, k := range oKeys {
nonTransientKeys = append(nonTransientKeys, k)
}
// Enable BlockSTM runner
bApp.SetBlockSTMTxRunner(blockstm.NewSTMRunner(
txConfig.TxDecoder(),
nonTransientKeys,
min(runtime.GOMAXPROCS(0), runtime.NumCPU()),
true, // debug logging
sdk.DefaultBondDenom,
))
// Optionally disable block gas meter for better performance
bApp.SetDisableBlockGasMeter(true)
// Set ObjectStoreKey on bank module
app.BankKeeper = app.BankKeeper.WithObjStoreKey(oKeys[banktypes.ObjectStoreKey])
```
### CometBFT v0.39 Updates
#### LibP2P
libp2p replaces CometBFT's legacy `comet-p2p` transport layer with [go-libp2p](https://libp2p.io/). It adds native stream-oriented transport, concurrent receive pipelines, and autoscaled worker pools per reactor, reducing queue pressure and improving message flow under load. In benchmarks, libp2p has been a key contributor to reaching over 2000 TPS. Beyond raw throughput, it improves network liveness by making peer communication and block propagation more resilient under sustained congestion and sudden load spikes.
Unlike other opt-in features, **to opt-in to libp2p, every validator in the network must upgrade together**. CometBFT p2p and libp2p are fundamentally incompatible and cannot interoperate. Because of this, a coordinated network-wide migration at a specific upgrade height is required.
See the [libp2p page](https://docs.cosmos.network/cometbft/latest/docs/experimental/lib-p2p) in the CometBFT documentation for details.
#### `AdaptiveSync`
`AdaptiveSync` allows a node to run `blocksync` and consensus at the same time for faster recovery behavior. In the default flow, a node starts in `blocksync`, catches up, then switches to consensus. Under sustained load, a node can remain behind and struggle to catch up. With `adaptive_sync` enabled, consensus still works normally, but it can also ingest already available blocks from `blocksync`, allowing nodes to recover more quickly during traffic spikes. `AdaptiveSync` does not change consensus safety or finality rules.
See the [`AdaptiveSync` documentation](https://docs.cosmos.network/cometbft/latest/docs/core/block-sync#adaptivesync) for details.
# v0.54 Release Notes
Source: https://docs.cosmos.network/sdk/latest/upgrade/v0.54-release
What's new in the latest Cosmos SDK release, including performance improvements, new features, and removals.
<Note>
If you are upgrading to v0.54, see the [upgrade guide](/sdk/latest/upgrade/v0.54). For a full list of changes, see the [changelog](https://github.com/cosmos/cosmos-sdk/blob/release/v0.54.x/CHANGELOG.md).
</Note>
## Overview
This release introduces order of magnitude improvements to network stability and throughput. In testing, we are able to support sustained 1K TPS on a variety of network configurations with no degradation in block time, whereas previously block production would have slowed / halted almost immediately after 200+ TPS.
This is made possible through 2 critical performance improvements targeting different layers of the stack:
* **Parallel transactions (BlockSTM)**: When applied to blocks containing fully parallelizable transactions, Block STM shows between 5-10x improvements in execution time depending on the available CPUs, size of the blocks, and types of transactions being run. We have modified the underlying implementations of Cosmos bank sends and EVM native sends to ensure they are parallelizable, so you will benefit from speed ups of these transactions immediately. It is possible to do the same for other common kinds of Cosmos transactions (e.g. governance, staking, auth), but we haven’t optimized them yet. Custom transaction types and EVM smart contracts may similarly require implementation modifications to benefit from parallelization. See our guide [here](/sdk/latest/experimental/blockstm) for more information.
* **Enhanced Networking (LibP2P):** The lib-p2p based reactor implementation outperforms Comet’s existing p2p implementation on latency benchmarks across a variety of workloads, reducing p99 latency metrics by a factor of 100 and up to 1000 in some cases. libp2p is industry-standard in peer-to-peer data exchange. Under the hood, it leverages QUIC, a modern low-latency UDP-based communication protocol. At this time, lib-p2p is meant for usage in centrally managed Cosmos networks, as peer exchange and upgradeability from comet’s networking stack are not supported yet. Please reach out if you are interested in testing libp2p in devnet or testnet environments and potentially contributing these improvements. We want to work closely with teams to gather feedback. See the [LibP2P guide](/cometbft/latest/docs/experimental/lib-p2p) for more information.
## Additional Features
1. **AdaptiveSync** helps nodes catchup when they fall behind by letting consensus and blocksync work simultaneously. During traffic spikes or short block times, this keeps nodes progressing with the network while preserving normal consensus safety and finality behavior. Especially valuable for RPC-heavy nodes. See the [block sync guide](/cometbft/latest/docs/core/block-sync#adaptivesync) for more information.
2. **Log/v2** supports the transition of the Cosmos SDK’s observability to OpenTelemetry, enabling automatic trace correlation across all log output (show via the logged keys `trace_id`, `span_id`, and `trace_flags`, if a span is present in the `ctx`). This is powered by four new required contextual logging methods on the `Logger` interface (`InfoContext`, `WarnContext`, etc). Additionally, a new `MultiLogger` allows fanning out to multiple logging backends simultaneously, which the server now uses automatically when OpenTelemetry is configured. See the [logging guide](/sdk/latest/guides/testing/log) and [telemetry guide](/sdk/latest/guides/testing/telemetry) for more information.
3. **IBC General Message Passing (GMP)**: General Message Passing in IBC enables calling arbitrary smart contracts on remote networks. Unlike Interchain Accounts, the caller does not need to own an account on the destination chain (though it is general enough to support this usage pattern). Instead, GMP directly calls contracts on the destination chain. This makes it especially useful for implementing mint/burn bridges (See [below](#upcoming-features-available-soon-in-minor-releases) for more details)
## Enterprise Features
The following features are released as part of [Cosmos Enterprise](/sdk/latest/enterprise/overview):
1. The **Groups module** enables on-chain multisig and collective decision-making for any set of accounts. Groups are formed with weighted members and one or more configurable decision policies that define how proposals pass. Members submit proposals containing arbitrary SDK messages, vote, and any account can trigger execution once a proposal is accepted. Two built-in decision policies are included: threshold (absolute weighted vote count) and percentage (proportion of YES votes), each with configurable voting and minimum execution periods. The decision policy interface supports custom extensions. See the [Groups module docs](/sdk/latest/enterprise/group/overview) for more information.
2. The **POA module** provides an admin-managed validator set as a drop-in replacement for the staking, distribution, and slashing modules. Purpose-built for institutional deployments run by a known set of operators, it offers a streamlined validator lifecycle with no native token required. Fee distribution to validators and full governance compatibility are included out of the box. See the [POA module docs](/sdk/latest/enterprise/poa/overview) for more information.
## Upcoming Features (Available soon in Minor Releases)
1. **Krakatoa mempool (Cosmos EVM only)**: This mempool significantly improves transaction throughput and network stability by making the comet mempool stateless and introducing two new concurrent ABCI methods for transaction processing (`reapTxs` and `insertTx`). The upshot is that transaction processing is more concurrent and more lightweight, resulting in performance and stability gains. This will be available for Cosm프로젝트로 돌아가기