You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8d901ea
Browse filesBrowse the repository at this point in the historyBrowse files
Remove the tokenfactory module behind the v6.8 upgrade (#4536)
Tokenfactory is still a fully live module on main. Anyone can create,
mint, burn and re-admin `factory/` denoms, CosmWasm contracts reach it
through the `create_denom`, `mint_tokens`, `burn_tokens`, `change_admin`
and `set_metadata` custom messages and the `tokenfactory` query route,
and both bank keepers enforce its per-denom transfer allowlists. Only
its unused governance route is gone so far (#4431). This removes the
module outright behind the `v6.8` upgrade, the same way #4319 removed
oracle.
`x/tokenfactory` and `proto/tokenfactory` are deleted and the module is
unwired from `app.New`. `retiredtokenfactory.ModuleName` joins
`v68DeletedStores`, so the store loader deletes the `tokenfactory` store
at the upgrade height and the handler drops its version-map entry. The
handler also deletes the module's parameter subspace from the params
store with `pruneTokenfactoryParams` (on v6.7 that is
`tokenfactory/allowlistmaxsize`), so none of its state outlives it. The
module account joins `retiredModuleAccounts` so its address stays
blocked from receiving funds. The six Msg types move to a decode-only
`app/retiredtokenfactory` package with the same type URLs and amino
names, so historical blocks still decode for tx queries and
`debug_trace*`. Their `ValidateBasic` returns `ErrDeprecated` (codespace
`tokenfactory`, code 26, because codes 2 to 25 keep their historical
meanings), so a new tokenfactory transaction is refused at CheckTx
without paying a fee, and `retiredtokenfactory_test.go` pins their amino
sign bytes against bytes captured from the removed module.
The `factory/` transfer allowlist (`IsInDenomAllowList` and its setters)
goes from both `sei-cosmos/x/bank` and `giga/deps/xbank`, and
`pruneDenomAllowLists` deletes the stored entries in the v6.8 handler.
Pacific-1 holds only two: a test denom restricted to its own creator and
an empty list, so lifting the check changes nothing for a real token.
The `AllowList` proto type stays in the sei-cosmos `bank.proto` because
the retired `MsgCreateDenom` and `MsgUpdateDenom` reference it, while
giga's unused generated copy of it is removed. Giga's embedded
`bank.proto` descriptor is left as is: it registers under the same file
name as the sei-cosmos one, so it has to keep describing `AllowList`
whichever registration wins. Contracts that send tokenfactory messages
or queries now get the existing "Unknown Sei Wasm Message" and "Unknown
Sei Query Route" errors.
This is app-hash breaking at the v6.8 height, and unlike oracle there
was no deprecation phase: from that height anything still creating,
minting or burning `factory/` denoms stops working, while existing
balances stay in bank, remain transferable, and have a frozen supply.
The part to scrutinise is `evmrpc/tests/regression_test.go`: two
pacific-1 fixtures (`0x29b9…`, `0x534a…`) executed a CosmWasm contract
through the wasmd precompile that emitted tokenfactory messages, so they
now trace as reverted with different gas, and they move the way #4230's
pointer-creation fixtures did. A third fixture, `0xc2da…`, calls the
same contract but has traced as a revert since #4202, so its gas is
unchanged and it now asserts the revert. More generally, tracing a
pre-v6.8 block no longer reproduces mainnet where a tokenfactory
transaction changed state that a later EVM transaction in the same block
read, the limitation the oracle and vesting retirements already
accepted. Fixtures that created tokenfactory denoms now use genesis
`uatom`, the authz generic-grant test grants `MsgSend` instead, and the
tokenfactory YAML suite, which CI never ran, is deleted. Validated with
the v6.8-tagged and untagged `app` tests, the bank, giga, wasmbinding,
evmrpc, `x/`, precompile, occ and testutil packages, golangci-lint,
`make fmtcheck`, and `make upgrade-test-offline` from `release/v6.7`,
whose fixture snapshots the params store so a v6.7-written database
shows the parameter prune touches nothing else; the cross-version and
docker-cluster suites have not run yet.
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: .github/workflows/integration-test-matrix.json
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -64,11 +64,10 @@
64
64
]
65
65
},
66
66
{
67
-
"_comment": "Suites: SeiDB State Store, Mint & Staking & Bank, Distribution. SeiDB State Store runs first because it asserts absolute wasm code counts (genesis + its own fixtures). TestMintModule asserts an absolute usei total supply, so nothing upstream of it in this row may mint or burn usei (SeiDB SS is safe today: fees are not burned and tokenfactory creation does not burn usei).",
67
+
"_comment": "Suites: SeiDB State Store, Mint & Staking & Bank, Distribution. SeiDB State Store runs first because it asserts absolute wasm code counts (genesis + its own fixtures). TestMintModule asserts an absolute usei total supply, so nothing upstream of it in this row may mint or burn usei (SeiDB SS is safe today: fees are not burned).",
68
68
"name": "Cosmos Modules (SeiDB SS, Mint & Staking & Bank, Distribution)",
*[#4536](https://github.com/sei-protocol/sei-chain/pull/4536) Remove the tokenfactory module behind the v6.8 upgrade: module, store, params, protobuf schema, CLI, wasm bindings, the bank `factory/` denom transfer allowlist and tooling are gone; only the tokenfactory Msg types remain decodable so historical blocks still trace. Existing `factory/` balances stay in bank but can no longer be minted or burned, and denoms that had a transfer allowlist become freely transferable. The upgrade deletes at most 1,000 allowlists from the bank store and leaves any beyond that in place, unenforced. App-hash breaking at the upgrade height.
33
34
*[#4319](https://github.com/sei-protocol/sei-chain/pull/4319) Remove the oracle module behind the v6.8 upgrade: module, store, protobuf schema, wasm query route and tooling are gone; only the oracle Msg types remain decodable so historical blocks still trace. App-hash breaking at the upgrade height.
34
35
*[#4332](https://github.com/sei-protocol/sei-chain/pull/4332) Bump sei-protocol/go-ethereum to v1.15.7-sei-21
35
36
*[#4329](https://github.com/sei-protocol/sei-chain/pull/4329) Add Giga fetch/serve and BlockDB prune metrics
0 commit comments