From 1fe022a418bafbd34f83af374c413193bc51ead4 Mon Sep 17 00:00:00 2001 From: Aleksei Kokinos Date: Tue, 28 Jul 2026 18:05:38 +0700 Subject: [PATCH 1/2] feat(upgrades): add empty v1.6.1 upgrade handler (binary fixes only) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v1.6.1 is a no-op state upgrade: it carries no state migration and exists only so the network can coordinate a version bump to ship binary-level fixes. The handler runs standard module migrations and returns. (Vesting schedule shift / account migration were dropped — not approved by the business/VC — so no vesting logic ships in this upgrade.) --- app/upgrades.go | 2 ++ app/upgrades/v1.6.1/upgrades.go | 45 +++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 app/upgrades/v1.6.1/upgrades.go diff --git a/app/upgrades.go b/app/upgrades.go index 003f372..57477dd 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -14,6 +14,7 @@ import ( v104 "github.com/TacBuild/tacchain/app/upgrades/v1.0.4" v160 "github.com/TacBuild/tacchain/app/upgrades/v1.6.0" v160spbhotfix "github.com/TacBuild/tacchain/app/upgrades/v1.6.0-spb-hotfix" + v161 "github.com/TacBuild/tacchain/app/upgrades/v1.6.1" ) // Upgrades list of chain upgrades @@ -26,6 +27,7 @@ var Upgrades = []upgrades.Upgrade{ v104.Upgrade, // ed25519 precompile v160.Upgrade, // upgrade to cosmos/evm v0.6.0 v160spbhotfix.Upgrade, + v161.Upgrade, // vesting schedule shift (+6mo) & vesting account migration } // RegisterUpgradeHandlers registers the chain upgrade handlers diff --git a/app/upgrades/v1.6.1/upgrades.go b/app/upgrades/v1.6.1/upgrades.go new file mode 100644 index 0000000..a1aeb6c --- /dev/null +++ b/app/upgrades/v1.6.1/upgrades.go @@ -0,0 +1,45 @@ +package v161 + +import ( + "context" + "fmt" + + storetypes "cosmossdk.io/store/types" + upgradetypes "cosmossdk.io/x/upgrade/types" + + "github.com/TacBuild/tacchain/app/upgrades" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" +) + +const UpgradeName = "v1.6.1" + +// Upgrade is a no-op state upgrade: it ships binary-level fixes only and carries +// no state migration. It exists so the network can coordinate a version bump; the +// handler just runs standard module migrations and returns. +var Upgrade = upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: storetypes.StoreUpgrades{}, +} + +func CreateUpgradeHandler( + mm upgrades.ModuleManager, + configurator module.Configurator, + _ *upgrades.AppKeepers, +) upgradetypes.UpgradeHandler { + return func(ctx context.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + logger := sdkCtx.Logger() + + logger.Info("Starting v1.6.1 upgrade (binary fixes only, no state migration)") + + vm, err := mm.RunMigrations(ctx, configurator, fromVM) + if err != nil { + return nil, fmt.Errorf("RunMigrations failed: %w", err) + } + + logger.Info("v1.6.1 upgrade complete") + return vm, nil + } +} From 8d06cdad280117181da93e70dcb28afb53a93d94 Mon Sep 17 00:00:00 2001 From: Aleksei Kokinos Date: Wed, 29 Jul 2026 17:55:11 +0700 Subject: [PATCH 2/2] build(deps): bump forks to cosmos-sdk v0.53.6-tac.3 + evm v0.6.0-tac.10 Pulls the vesting-delegate fix into the tacchaind binary: bank emits a locked_amount attribute on coin_spent (cosmos-sdk tac.3) and the EVM balance handler subtracts only the spendable portion (amount - locked, evm tac.10). Delegating vesting-locked tokens via the staking precompile no longer silently burns (within spendable) or overflow-panics (beyond spendable). Ships in the v1.6.1 upgrade. --- go.mod | 6 ++++-- go.sum | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 549049b..12a302b 100644 --- a/go.mod +++ b/go.mod @@ -283,7 +283,8 @@ replace ( // replace to cosmos-sdk fork for liquid stake support. See: https://github.com/TacBuild/cosmos-sdk/pull/2 // bump to v0.53.6 with all fork specific changes. - github.com/cosmos/cosmos-sdk => github.com/TacBuild/cosmos-sdk v0.53.6-tac.2 + // tac.3: emit locked_amount on coin_spent for vesting-locked delegations (paired evm tac.10). + github.com/cosmos/cosmos-sdk => github.com/TacBuild/cosmos-sdk v0.53.6-tac.3 // replace to cosmos/evm fork // added liquid stake support. See: https://github.com/TacBuild/evm/pull/9 @@ -291,7 +292,8 @@ replace ( // fix liquid stake espilon. See: https://github.com/TacBuild/evm/pull/10 // fix ed25519 precompile gas cost. See: https://github.com/TacBuild/evm/pull/11 // bump to v0.6.0 - github.com/cosmos/evm => github.com/TacBuild/evm v0.6.0-tac.9 + // tac.10: allow delegating vesting-locked tokens via staking precompile (amount-locked; needs cosmos-sdk tac.3). + github.com/cosmos/evm => github.com/TacBuild/evm v0.6.0-tac.10 // replace with our fork using geth v1.16.2 github.com/ethereum/go-ethereum => github.com/cosmos/go-ethereum v1.16.2-cosmos-1 diff --git a/go.sum b/go.sum index 7c095a0..9b2f59b 100644 --- a/go.sum +++ b/go.sum @@ -683,10 +683,10 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/TacBuild/cosmos-sdk v0.53.6-tac.2 h1:XsSuogKqfso4o2geMMUuKZggo0aiZzfw/P5SAMAtY9Q= -github.com/TacBuild/cosmos-sdk v0.53.6-tac.2/go.mod h1:N6YuprhAabInbT3YGumGDKONbvPX5dNro7RjHvkQoKE= -github.com/TacBuild/evm v0.6.0-tac.9 h1:IlGFOWEEWTpuiAOyxqPLP8K6Mq1PejjntH2oOtPIFPk= -github.com/TacBuild/evm v0.6.0-tac.9/go.mod h1:1ftehWYVTdW6XlSIAzRxFrNVDGnLxi17o8b/LTiZhEE= +github.com/TacBuild/cosmos-sdk v0.53.6-tac.3 h1:tKkYpmiVGrCFy3V11fCy/AP+JOu3duawBzQVOIQgl5s= +github.com/TacBuild/cosmos-sdk v0.53.6-tac.3/go.mod h1:N6YuprhAabInbT3YGumGDKONbvPX5dNro7RjHvkQoKE= +github.com/TacBuild/evm v0.6.0-tac.10 h1:XJuFhP+eZK48NgNY2ywnHTdi0tGNJMrjSHMlxGzPezc= +github.com/TacBuild/evm v0.6.0-tac.10/go.mod h1:9DaIfOYirXAQplL677tYEmy0crZWLI4glre84+qi5FQ= github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE=