本页跟踪 v0.54.1 的发布与变更。完整发布历史请参阅 GitHub 上的更新日志。
破坏性变更
- (x/consensus) #25607 为共识参数新增
AuthorityParams。设置后,共识参数权限将优先于各 keeper 的独立权限,用于所有模块参数更新。Keeper 构造函数签名不变。 - (x/staking) #25724 在
MsgUpdateParams中校验BondDenom,防止设置不存在或总供应量为零的 denom。 - #25778 将
log升级为 log v2。 - #25090 已将弃用模块移动到
./contrib。这些模块仍然可用,但将不再主动维护,也不再纳入 Cosmos SDK 漏洞赏金计划支持范围。 x/groupx/nftx/circuitx/crisis- (crypto) #24414 移除对 sr25519 的支持,因为该支持已在 CometBFT v1.x 中被移除(参见:CometBFT #3646)。
- (x/mint) #25599 新增最大供应量参数。
- (x/gov) #25615 通过将
CalculateVoteResultsAndVotingPowerFn设为keeper.NewKeeper的必填参数,而不是使用StakingKeeper,使x/gov与x/staking解耦。 - (x/gov) #25617
AfterProposalSubmissionhook 现在将提案人地址作为参数传入。 - (x/gov) #25616
DistrKeeperx/distribution现在是可选项。创世校验会确保:如果将 distribution 模块用作提案取消目标,则必须设置distrKeeper。 - (systemtests) #25930 将
systemtests移入testutil,不再单独拥有自己的go.mod。 - (baseapp) #26060 移除
BaseApp.SetStoreMetrics。由于StoreMetrics接口实际上从未生效,因此删除这部分无用代码。 - (store) #26061 移除 store tracing API 及其所有相关配套逻辑:
- 从
MultiStore接口中移除SetTracer、SetTracingContext和TracingEnabled。 - 从
CacheWrapper接口中移除CacheWrapWithTrace。 - 移除
BaseApp.SetCommitMultiStoreTracer,以及BaseApp.cacheTxContext和FinalizeBlock中的 tracing context 逻辑。 - 从
servertypes.AppCreator中移除io.Writer参数,并从servertypes.AppExporter中移除traceWriter io.Writer。 - 从
simapp.NewSimApp和所有 enterprise simapp 构造函数中移除traceStore io.Writer参数。 - 从所有
testutil/simsx应用工厂签名中移除traceStore io.Writer。 - (store) #26042 现在使用
github.com/cosmos/cosmos-sdk/store/v2作为 store 包,而不是cosmossdk.io/store,所有导入路径均已变更。 - (baseapp) #26138 默认禁用区块 gas meter。新增检查以确保在配置 bstm 并行执行时不会启用区块 gas meter,并会在这些场景下于参数赋值阶段触发 panic。
新功能
- #25471 启用完整的 BLS 12-381 支持。
- #24872 为 CLI
init、gentx、collect-gentx提供 BLS 12-381 支持。 - (crypto) #24919 在
secp256r1包中新增NewPubKeyFromBytes函数,用于从字节创建PubKey。 - (server) #24720 新增
verbose_log_level标志,用于在敏感操作(如链升级)期间切换到详细日志模式时配置日志级别。 - (crypto) #24861 新增
PubKeyFromCometTypeAndBytes辅助函数,用于将comet/v2PubKey 转换为cryptotypes.Pubkey接口。 - (abci_utils) #25008 新增能力,可在
DefaultProposalHandler中指定自定义签名者提取适配器。 - (x/distribution) #25650 为
DelegatorStartingInfo、ValidatorHistoricalRewards和ValidatorCurrentRewards新增 gRPC 查询端点与 CLI 命令。 - #25745 通过 gopsutil 新增 DiskIO 遥测。
- (grpc) #25648 在
GetSyncingResponse中新增earliest_block_height和latest_block_height字段。 - (collections/codec) #25614 在 collections/codec 中新增
TimeValue(ValueCodec[time.Time])。 - (enterprise/poa) #25838 在
enterprise目录下新增poa模块。 - (grpc) #25850 新增
GetBlockResults和GetLatestBlockResultsgRPC 端点,用于暴露 CometBFT 区块结果,包括finalize_block_events。
改进
- (ci) 对
main-nightly改用 softprops/action-gh-release,而不是自定义 gh/git,以避免仓库 ruleset 冲突。 - (telemetry) #26006 导出
ExtensionOptions类型,用于以编程方式生成 otel.yaml。 - #25955 直接使用 cosmos/btree,而不是在 go.mods 中替换它。
- (types) #25342 取消
EventManager上EmitEvent和EmitEvents的弃用状态。这些函数将继续维护。 - (types) #24668 将全局配置限定到特定二进制文件,使多个 SDK 二进制可以在同一台机器上正确运行。
- (baseapp) #24655 为
state添加互斥锁,并将lastCommitInfo设为原子变量,以防止Commit与CreateQueryContext之间出现竞态条件。 - (proto) #24161 移除
x/stakingauthz proto 中不必要的注解。 - (x/bank) #24660 提升
GetAllBalances和GetAccountsBalanceskeeper 方法的性能。 - (collections) #25464 为
Multi索引类型新增IterateRaw方法,以满足查询Collection接口的需要。 - (api) #25613 将弃用模块拆分到 contrib 目录,并与 api 分离,以便在不影响遗留代码的情况下启用并放行新的 proto 变更。
- (server) #25740 为
StartGrpcServer新增可变参数grpc.DialOption,用于自定义 gRPC 客户端连接选项。 - (blockstm) #25765 小幅提升 block-stm 代码可读性。
- (blockstm) #25786 在交易状态转换中新增前置状态检查。
- (server/config) #25807 修复(server):拒绝重叠的历史 gRPC 区块范围。
- #25857 缩小
PriorityNonceMempool.Remove中互斥锁的作用范围。 - (baseapp) #25862 对重新检查的交易跳过执行 validateBasic。(从 https://github.com/cosmos/cosmos-sdk/pull/20208 回移植)
- (blockstm) 25883 在预估阶段复用已解码的交易对象。
- (blockstm) #25788 仅校验至少执行过一次的交易。
- (blockstm) #25767 使用位图索引优化 block-stm MVMemory。
问题修复
- (baseapp) #25331 避免在 gRPC 响应头已发送时产生噪声错误;在可能时将区块高度设置为响应头,否则回退为 trailer。
- (blockstm) #25789 当调度器未完成时唤醒挂起的执行器,以防止 goroutine 泄漏。
- (grpc) #25647 在
node.StatusgRPC 端点中返回实际的earliest_store_height,而不是硬编码的0。 - (types/query) #25665 修复使用谓词函数查询集合时的分页偏移量问题。
- (x/staking) #25649 在
IterateDelegatorRedelegations和GetRedelegations中补充缺失的defer iterator.Close()调用,以防止资源泄漏。 - (mempool) #25563 在交易被替换时清理发送者索引。
- (x/epochs) #25425 修复
InvokeSetHooks在 keeper 为 nil 时被调用,以及AppModule持有副本而不是指针的问题(如果像使用 depinject 那样在创建AppModule后再设置 hooks,由于实例不同,设置不会生效)。 - (client, client/rpc, x/auth/tx) #24551 在向客户端方法传入 context 时正确处理取消操作。
- (x/authz) #24638 修复一个小问题:grant key 被强制转换为字符串并直接写入错误消息,导致错误字符串可能包含无效的 UTF-8。
- (client, client/rpc, x/auth/tx) #24551 在向客户端方法传入 context 时正确处理取消操作。
- (x/epochs) #24770 修复
InvokeSetHooks中 epoch hooks 的注册问题。 - (x/epochs) #25087 移除 BeginBlocker 中冗余的错误检查。
- GHSA-p22h-3m2v-cmgh 修复 x/distribution 在历史奖励溢出时可能导致停机的问题。
- (x/staking) #25258 在 redelegate 事件中添加委托人地址。
- (x/bank) #25751 修复事件中的接收方地址。
- (client) [#25811] (https://github.com/cosmos/cosmos-sdk/pull/25811) 修复快照命令中的文件句柄泄漏问题。
- (server/config) #25806 修复:在历史 gRPC 配置模板中补充缺失的逗号。
- (client) #25804 为
grpc客户端添加GetHeightFromMetadataStrictAPI,以改进错误处理。 - (x/staking) #25829 在 x/staking 中校验 authz grant 的大小写敏感性。
- (mempool) #25869 修复(mempool):为
NextSenderTx增加线程安全保护。 - (blockstm) #25912 移除
SigVerificationDecorator的签名 incarnation 缓存,该缓存会在 blockstm 下导致状态分歧。 - (x/group) #25922 为 ThresholdDecisionPolicy 增加总权重为零的检查。
- (x/group) #25917 防止创建权重为零的群组。
- (x/group) #25919 为 group
DecisionPolicygetter 调用增加更安全的类型断言。 - (x/group) #25920 扩展投票期检查,从仅验证非零改为验证其为正值。
- (baseapp) #26063 修复一个问题:在 ante 处理期间嵌入到 context 中的值会在处理器返回后被清除。
已弃用
- #25948 修改默认的
app.go代码,不再使用depinject,因为我们正在逐步淘汰它。 - (baseapp) #26107 弃用 baseapp 测试辅助方法
app.NewUncachedContext,建议改用app.NewNextBlockContext或app.NewContext,更多细节请参见UPGRADING.md。
This page tracks releases and changes for v0.54.1. For the full release history, see the CHANGELOG on GitHub.
Breaking Changes
- (x/consensus) #25607 Add
AuthorityParamsto consensus params. When set, the consensus params authority takes precedence over per-keeper authority for all module parameter updates. Keeper constructor signatures are unchanged. - (x/staking) #25724 Validate
BondDenominMsgUpdateParamsto prevent setting non-existent or zero-supply denoms. - #25778 Update
logto log v2. - #25090 Moved deprecated modules to
./contrib. These modules are still available but will no longer be actively maintained or supported in the Cosmos SDK Bug Bounty program. x/groupx/nftx/circuitx/crisis- (crypto) #24414 Remove sr25519 support, since it was removed in CometBFT v1.x (see: CometBFT #3646).
- (x/mint) #25599 Add max supply param.
- (x/gov) #25615 Decouple
x/govfromx/stakingby makingCalculateVoteResultsAndVotingPowerFna required parameter tokeeper.NewKeeperinstead ofStakingKeeper. - (x/gov) #25617
AfterProposalSubmissionhook now includes proposer address as a parameter. - (x/gov) #25616
DistrKeeperx/distributionis now optional. Genesis validation ensuresdistrKeeperis set if distribution module is used as proposal cancel destination. - (systemtests) [#25930]https://github.com/cosmos/cosmos-sdk/pull/25930) Move
systemtestsintotestutiland no longer under its owngo.mod. - (baseapp) #26060 Remove
BaseApp.SetStoreMetrics. TheStoreMetricsinterface never worked, so removing dead code. - (store) #26061 Remove store tracing API and all related plumbing:
- Remove
SetTracer,SetTracingContext, andTracingEnabledfromMultiStoreinterface. - Remove
CacheWrapWithTracefromCacheWrapperinterface. - Remove
BaseApp.SetCommitMultiStoreTracerand tracing context logic fromBaseApp.cacheTxContextandFinalizeBlock. - Remove
io.Writerparameter fromservertypes.AppCreatorandtraceWriter io.Writerfromservertypes.AppExporter. - Remove
traceStore io.Writerparameter fromsimapp.NewSimAppand all enterprise simapp constructors. - Remove
traceStore io.Writerfrom alltestutil/simsxapp factory signatures. - (store) #26042 We are now importing
github.com/cosmos/cosmos-sdk/store/v2as the store package instead ofcosmossdk.io/storeand all import paths have changed. - (baseapp) #26138 Default block gas meter to disabled. Adds checking to ensure block gas meter is not enabled while bstm parallel execution is configured and panics in these scenarios during parameter assignment.
Features
- #25471 Full BLS 12-381 support enabled.
- #24872 Support BLS 12-381 for cli
init,gentx,collect-gentx - (crypto) #24919 add
NewPubKeyFromBytesfunction to thesecp256r1package to createPubKeyfrom bytes - (server) #24720 add
verbose_log_levelflag for configuring the log level when switching to verbose logging mode during sensitive operations (such as chain upgrades). - (crypto) #24861 add
PubKeyFromCometTypeAndByteshelper function to convert fromcomet/v2PubKeys to thecryptotypes.Pubkeyinterface. - (abci_utils) #25008 add the ability to assign a custom signer extraction adapter in
DefaultProposalHandler. - (x/distribution) #25650 Add new gRPC query endpoints and CLI commands for
DelegatorStartingInfo,ValidatorHistoricalRewards, andValidatorCurrentRewards. - #25745 Add DiskIO telemetry via gopsutil.
- (grpc) #25648 Add
earliest_block_heightandlatest_block_heightfields toGetSyncingResponse. - (collections/codec) [#25614] (https://github.com/cosmos/cosmos-sdk/pull/25827) Add
TimeValue(ValueCodec[time.Time]) to collections/codec. - (enterprise/poa) #25838 Add the
poamodule under theenterprisedirectory. - (grpc) #25850 Add
GetBlockResultsandGetLatestBlockResultsgRPC endpoints to expose CometBFT block results includingfinalize_block_events.
Improvements
- (ci) Use softprops/action-gh-release for main-nightly instead of custom gh/git to avoid repository ruleset conflicts.
- (telemetry) #26006 Export
ExtensionOptionstype for programmatic otel.yaml generation. - #25955 Use cosmos/btree directly instead of replacing it in go.mods
- (types) #25342 Undeprecated
EmitEventandEmitEventson theEventManager. These functions will continue to be maintained. - (types) #24668 Scope the global config to a particular binary so that multiple SDK binaries can be properly run on the same machine.
- (baseapp) #24655 Add mutex locks for
stateand makelastCommitInfoatomic to prevent race conditions betweenCommitandCreateQueryContext. - (proto) #24161 Remove unnecessary annotations from
x/stakingauthz proto. - (x/bank) #24660 Improve performance of the
GetAllBalancesandGetAccountsBalanceskeeper methods. - (collections) #25464 Add
IterateRawmethod toMultiindex type to satisfty queryCollectioninterface. - (api) #25613 Separated deprecated modules into the contrib directory, distinct from api, to enable and unblock new proto changes without affecting legacy code.
- (server) #25740 Add variadic
grpc.DialOptionparameter toStartGrpcServerfor custom gRPC client connection options. - (blockstm) #25765 Minor code readability improvement in block-stm.
- (blockstm) #25786 Add pre-state checking in transaction state transition.
- (server/config) #25807 fix(server): reject overlapping historical gRPC block ranges.
- #25857 Reduce scope of mutex in
PriorityNonceMempool.Remove. - (baseapp) #25862 Skip running validateBasic for rechecking txs. (Backport of https://github.com/cosmos/cosmos-sdk/pull/20208).
- (blockstm) 25883 Re-use decoded tx object in pre-estimates.
- (blockstm) #25788 Only validate transactions that’s executed at lease once.
- (blockstm) #25767 Optimize block-stm MVMemory with bitmap index.
Bug Fixes
- (baseapp) #25331 Avoid noisy errors when gRPC response headers are already sent, set block height as a header when possible and fall back to a trailer.
- (blockstm) #25789 Wake up suspended executors when scheduler doesn’t complete to prevent goroutine leaks.
- (grpc) #25647 Return actual
earliest_store_heightinnode.StatusgRPC endpoint instead of hardcoded0. - (types/query) #25665 Fix pagination offset when querying a collection with predicate function.
- (x/staking) #25649 Add missing
defer iterator.Close()calls inIterateDelegatorRedelegationsandGetRedelegationsto prevent resource leaks. - (mempool) #25563 Cleanup sender indices in case of tx replacement.
- (x/epochs) #25425 Fix
InvokeSetHooksbeing called with a nil keeper andAppModulecontaining a copy instead of a pointer (hooks set post creating theAppModulelike with depinject didn’t apply because it’s a different instance). - (client, client/rpc, x/auth/tx) #24551 Handle cancellation properly when supplying context to client methods.
- (x/authz) #24638 Fixed a minor bug where the grant key was cast as a string and dumped directly into the error message leading to an error string possibly containing invalid UTF-8.
- (client, client/rpc, x/auth/tx) #24551 Handle cancellation properly when supplying context to client methods.
- (x/epochs) #24770 Fix register of epoch hooks in
InvokeSetHooks. - (x/epochs) #25087 Remove redundant error check in BeginBlocker.
- GHSA-p22h-3m2v-cmgh Fix x/distribution can halt when historical rewards overflow.
- (x/staking) #25258 Add delegator address to redelegate event.
- (x/bank) #25751 Fix recipient address in events.
- (client) [#25811] (https://github.com/cosmos/cosmos-sdk/pull/25811) fix(client): fix file handle leaks in snapshot commands.
- (server/config) #25806 fix: add missing commas in historical gRPC config template.
- (client) #25804 Add
GetHeightFromMetadataStrictAPI togrpcclient for better error handling. - (x/staking) #25829 Validates case-sensitivity on authz grands in x/staking.
- (mempool) #25869 fix(mempool): add thread safety to NextSenderTx.
- (blockstm) #25912 Remove
SigVerificationDecoratorsignature incarnation cache causing state divergence under blockstm. - (x/group) #25922 Add zero-total-weight check for ThresholdDecisionPolicy
- (x/group) #25917 Prevent creation of zero-weight groups.
- (x/group) #25919 add safer type assertions to group
DecisionPolicygetter calls. - (x/group) #25920 Expand voting period check to verify period is positive instead of nonzero.
- (baseapp) #26063 Fixes an issue where values embedded in context during ante handling were wiped after the handlers returned.