Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: not able to execute a smart contract transaction #438

Closed
spoo-bar opened this issue Aug 31, 2023 · 0 comments · Fixed by #437
Closed

bug: not able to execute a smart contract transaction #438

spoo-bar opened this issue Aug 31, 2023 · 0 comments · Fixed by #437
Assignees
Labels
bug Something isn't working

Comments

@spoo-bar
Copy link
Contributor

Discussed in https://github.com/orgs/archway-network/discussions/6

The feeburn feature was introduced in v3.0.0 #422
This involves the transaction fees sent with the wasmTypes.MsgExecuteContract will be burnt instead of being sent to stakers. More details here ADR-007-fee-burning

While the authtypes.FeeCollectorName was given burn permissions in app.go, so it would have the necessary permissions when the chain is started fresh from v3.0.0 onwards, the upgrade handler for this release missed providing this permission to the account.

This caused the following error on every contract exec as the burn was not possible.

Error: Broadcasting transaction failed with code 111222 (codespace: undefined). Log: recovered: module account fee_collector does not have permissions to burn tokens: unauthorized [cosmos/cosmos-sdk@v0.45.16/x/bank/keeper/keeper.go:438]
stack:
goroutine 42089775 [running]:
runtime/debug.Stack()
	runtime/debug/stack.go:24 +0x65
github.com/cosmos/cosmos-sdk/baseapp.newDefaultRecoveryMiddleware.func1({0x23fee80, 0xc0b258b000})
	github.com/cosmos/cosmos-sdk@v0.45.16/baseapp/recovery.go:71 +0x27
github.com/cosmos/cosmos-sdk/baseapp.newRecoveryMiddleware.func1({0x23fee80?, 0xc0b258b000?})
	github.com/cosmos/cosmos-sdk@v0.45.16/baseapp/recovery.go:39 +0x30
github.com/cosmos/cosmos-sdk/baseapp.processRecovery({0x23fee80, 0xc0b258b000}, 0xc0b10b3440?)
	github.com/cosmos/cosmos-sdk@v0.45.16/baseapp/recovery.go:28 +0x37
github.com/cosmos/cosmos-sdk/baseapp.processRecovery({0x23fee80, 0xc0b258b000}, 0x2e9ca10?)
	github.com/cosmos/cosmos-sdk@v0.45.16/baseapp/recovery.go:33 +0x5e
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx.func1()
	github.com/cosmos/cosmos-sdk@v0.45.16/baseapp/baseapp.go:632 +0x110
panic({0x23fee80, 0xc0b258b000})
	runtime/panic.go:884 +0x213
github.com/cosmos/cosmos-sdk/x/auth/ante.SetUpContextDecorator.AnteHandle.func1()
	github.com/cosmos/cosmos-sdk@v0.45.16/x/auth/ante/setup.go:57 +0x1fa
panic({0x23fee80, 0xc0b258b000})
	runtime/panic.go:884 +0x213
github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper.BurnCoins({{{{0x2e9d040, 0xc001034390}, {0x2e77f10, 0xc002ff2fc0}, {0x2e9f1c0, 0xc0001ac5a0}}, {0x2e9d040, 0xc001034390}, {0x2e9f1c0, 0xc0001ac5a0}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/x/bank/keeper/keeper.go:438 +0x71a
github.com/archway-network/archway/x/rewards/ante.DeductFeeDecorator.deductFees({{0x0, 0x0}, {0x2e8ee48, 0xc0001f5a70}, {0x7fadfe312330, 0xc00016e2c0}, {0x2e75580, 0xc000e13bc0}, {0x2e91c00, 0xc000a9e1a0}}, ...)
	github.com/archway-network/archway/x/rewards/ante/fee_deduction.go:147 +0x559
github.com/archway-network/archway/x/rewards/ante.DeductFeeDecorator.AnteHandle({{0x0, 0x0}, {0x2e8ee48, 0xc0001f5a70}, {0x7fadfe312330, 0xc00016e2c0}, {0x2e75580, 0xc000e13bc0}, {0x2e91c00, 0xc000a9e1a0}}, ...)
	github.com/archway-network/archway/x/rewards/ante/fee_deduction.go:85 +0x765
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, {0x2d1b6071, ...}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/types/handler.go:40 +0x158
github.com/archway-network/archway/x/tracking/ante.TxGasTrackingDecorator.AnteHandle({{_, _}}, {{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, ...}, ...}, ...)
	github.com/archway-network/archway/x/tracking/ante/tracking.go:23 +0x170
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, {0x2d1b6071, ...}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/types/handler.go:40 +0x158
github.com/archway-network/archway/x/rewards/ante.MinFeeDecorator.AnteHandle({{_, _}, {_, _}}, {{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, ...}, ...}, ...)
	github.com/archway-network/archway/x/rewards/ante/min_cons_fee.go:56 +0x48b
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, {0x2d1b6071, ...}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/types/handler.go:40 +0x158
github.com/cosmos/cosmos-sdk/x/auth/ante.ConsumeTxSizeGasDecorator.AnteHandle({{_, _}}, {{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/x/auth/ante/basic.go:142 +0x646
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, {0x2d1b6071, ...}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/types/handler.go:40 +0x158
github.com/cosmos/cosmos-sdk/x/auth/ante.ValidateMemoDecorator.AnteHandle({{_, _}}, {{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/x/auth/ante/basic.go:66 +0x2ee
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, {0x2d1b6071, ...}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/types/handler.go:40 +0x158
github.com/cosmos/cosmos-sdk/x/auth/ante.TxTimeoutHeightDecorator.AnteHandle({}, {{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/x/auth/ante/basic.go:205 +0x28e
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, {0x2d1b6071, ...}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/types/handler.go:40 +0x158
github.com/cosmos/cosmos-sdk/x/auth/ante.ValidateBasicDecorator.AnteHandle({}, {{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/x/auth/ante/basic.go:34 +0x1ce
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, {0x2d1b6071, ...}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/types/handler.go:40 +0x158
github.com/cosmos/cosmos-sdk/x/auth/ante.MempoolFeeDecorator.AnteHandle({}, {{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/x/auth/ante/fee.go:54 +0x286
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, {0x2d1b6071, ...}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/types/handler.go:40 +0x158
github.com/cosmos/cosmos-sdk/x/auth/ante.RejectExtensionOptionsDecorator.AnteHandle({}, {{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/x/auth/ante/ext.go:35 +0x12e
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x2e8dda8, 0xc09c46f170}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, {0x2d1b6071, ...}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/types/handler.go:40 +0x158
github.com/CosmWasm/wasmd/x/wasm/keeper.CountTXDecorator.AnteHandle({{_, _}}, {{0x2e8dd38, 0xc000130020}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, ...}, ...}, ...)
	github.com/CosmWasm/wasmd@v0.33.0/x/wasm/keeper/ante.go:48 +0x578
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x2e8dd38, 0xc000130020}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, {0x2d1b6071, ...}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/types/handler.go:40 +0x158
github.com/CosmWasm/wasmd/x/wasm/keeper.LimitSimulationGasDecorator.AnteHandle({_}, {{0x2e8dd38, 0xc000130020}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, ...}, ...}, ...)
	github.com/CosmWasm/wasmd@v0.33.0/x/wasm/keeper/ante.go:87 +0x684
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x2e8dd38, 0xc000130020}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, {0x2d1b6071, ...}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/types/handler.go:40 +0x158
github.com/cosmos/cosmos-sdk/x/auth/ante.SetUpContextDecorator.AnteHandle({}, {{0x2e8dd38, 0xc000130020}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/x/auth/ante/setup.go:62 +0x66f
github.com/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x2e8dd38, 0xc000130020}, {0x2e9ca10, 0xc0b2c047c0}, {{0xb, 0x0}, {0xc09981a5c0, 0xd}, 0x197daa, {0x2d1b6071, ...}, ...}, ...}, ...)
	github.com/cosmos/cosmos-sdk@v0.45.16/types/handler.go:40 +0x158
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx(0xc000b6bc00, 0x0, {0xc0b1352340, 0x186, 0x186})
	github.com/cosmos/cosmos-sdk@v0.45.16/baseapp/baseapp.go:684 +0x786
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).CheckTx(0xc000b6bc00, {{0xc0b1352340?, 0xc0db5707b8?, 0x6b490e?}, 0xdb5708a8?})
	github.com/cosmos/cosmos-sdk@v0.45.16/baseapp/abci.go:244 +0x135
github.com/tendermint/tendermint/abci/client.(*localClient).CheckTxAsync(0xc0073e5140, {{0xc0b1352340?, 0xd39920?, 0xc00f1d74e0?}, 0xdb570a18?})
	github.com/tendermint/tendermint@v0.34.27/abci/client/local_client.go:104 +0x118
github.com/tendermint/tendermint/proxy.(*appConnMempool).CheckTxAsync(0xc00f1d74e0?, {{0xc0b1352340?, 0xc03c4abbb8?, 0x0?}, 0xdb570ac8?})
	github.com/tendermint/tendermint@v0.34.27/proxy/app_conn.go:126 +0x26
github.com/tendermint/tendermint/mempool/v0.(*CListMempool).CheckTx(0xc007adb080, {0xc0b1352340, 0x186, 0x186}, 0x0?, {0x20?, {0x0?, 0x50003?}})
	github.com/tendermint/tendermint@v0.34.27/mempool/v0/clist_mempool.go:254 +0x30d
github.com/tendermint/tendermint/rpc/core.BroadcastTxSync(0xc0b258a4a0, {0xc0b1352340, 0x186, 0x186})
	github.com/tendermint/tendermint@v0.34.27/rpc/core/mempool.go:36 +0xf6
reflect.Value.call({0x23143a0?, 0x2c4a7b8?, 0x478f96?}, {0x25b89c8, 0x4}, {0xc055d9d770, 0x2, 0x2?})
	reflect/value.go:586 +0xb0b
reflect.Value.Call({0x23143a0?, 0x2c4a7b8?, 0x211?}, {0xc055d9d770?, 0x25b0c40?, 0xc0b09a6cc0?})
	reflect/value.go:370 +0xbc
github.com/tendermint/tendermint/rpc/jsonrpc/server.makeJSONRPCHandler.func1({0x2e8c2e0, 0xc0b2bcbc80}, 0xc0ae0c0d00)
	github.com/tendermint/tendermint@v0.34.27/rpc/jsonrpc/server/http_json_handler.go:108 +0xf08
github.com/tendermint/tendermint/rpc/jsonrpc/server.handleInvalidJSONRPCPaths.func1({0x2e8c2e0?, 0xc0b2bcbc80?}, 0x7fadf5ae95d8?)
	github.com/tendermint/tendermint@v0.34.27/rpc/jsonrpc/server/http_json_handler.go:140 +0x5d
net/http.HandlerFunc.ServeHTTP(0xc000100000?, {0x2e8c2e0?, 0xc0b2bcbc80?}, 0xc0db5718b0?)
	net/http/server.go:2122 +0x2f
net/http.(*ServeMux).ServeHTTP(0x160?, {0x2e8c2e0, 0xc0b2bcbc80}, 0xc0ae0c0d00)
	net/http/server.go:2500 +0x149
github.com/tendermint/tendermint/rpc/jsonrpc/server.maxBytesHandler.ServeHTTP({{0x2e74360?, 0xc00fa825c0?}, 0x435747?}, {0x2e8c2e0?, 0xc0b2bcbc80}, 0xc0ae0c0d00)
	github.com/tendermint/tendermint@v0.34.27/rpc/jsonrpc/server/http_server.go:256 +0x124
github.com/tendermint/tendermint/rpc/jsonrpc/server.RecoverAndLogHandler.func1({0x2e8c940?, 0xc05d122700}, 0xc0ae0c0d00)
	github.com/tendermint/tendermint@v0.34.27/rpc/jsonrpc/server/http_server.go:229 +0x37f
net/http.HandlerFunc.ServeHTTP(0x0?, {0x2e8c940?, 0xc05d122700?}, 0x98de54?)
	net/http/server.go:2122 +0x2f
net/http.serverHandler.ServeHTTP({0x2e792e8?}, {0x2e8c940, 0xc05d122700}, 0xc0ae0c0d00)
	net/http/server.go:2936 +0x316
net/http.(*conn).serve(0xc0b0ec1050, {0x2e8dda8, 0xc00f850c60})
	net/http/server.go:1995 +0x612
created by net/http.(*Server).Serve
	net/http/server.go:3089 +0x5ed
: panic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant