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

Feature: Add config option for fee granters #1634

Merged

Conversation

fkneeland-figure
Copy link
Contributor

@fkneeland-figure fkneeland-figure commented Dec 2, 2021

Closes: #1633

Description

I updated the way the relayer handles fee to add a fee granter if it is specified in the config.toml. If the fee_granter is unspecified it will be set to an empty string as it currently is.


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests: integration (for Hermes) or unit/mock tests (for modules).
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@iramiller
Copy link

A nice and simple fix... As an aside this was tested using a relayer instance for the Provenance --> Cosmoshub IBC channel.

Copy link
Member

@adizere adizere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for you contribution!

We may adjust the changelog in your PR to adhere to our process (we follow this guideline for maintaining the changelog). I also left a nit suggestion. Feel free to fix the nit & changelog, otherwise one of the core maintainers will do it within ~1 day.

Cheers!

@@ -440,6 +440,11 @@ impl CosmosSdkChain {
self.config.max_gas.unwrap_or(DEFAULT_MAX_GAS)
}

/// Get the fee granter address
fn fee_grant(&self) -> &str {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we name this method similarly to the config.toml option, specifically fee_granter ?

@fkneeland-figure
Copy link
Contributor Author

@adizere Thanks for the review! I ran the script for the changelog and updated the name as you suggested.

@adizere
Copy link
Member

adizere commented Dec 6, 2021

Question: Would it be sensible for your use-case if we make

pub fee_granter: Option<String>,

instead of

pub fee_granter: String,

?

Motivation: This would simplify a bit the life of relayer operators who do not need to employ this new config.toml field, because they can simply skip defining it (and thus maintain a more concise config.toml for their operation). I think the change I'm proposing should not impact your use-case, but not sure if I'm missing anything.

@adizere
Copy link
Member

adizere commented Dec 7, 2021

I document the config.toml option in 16fc6a2 but left that segment of the configuration file commented-out. The reason for keeping this option a bit hidden is that it may be a source of misconfiguration. In particular, we don't validate the string in any way, and I suspect it should be a bech32-valid account identifier, but unclear how (if) we can validate that on Hermes side.

Currently, using a random string such as fee_granter = 'adi' will yield a very obscure error message (see below). Will open an issue to track this.

Error message when using invalid fee granter account

2021-12-07T13:39:07.310229Z DEBUG ThreadId(21) [ibc-0] send_tx: max fee, for use in tx simulation: Fee { amount: "1001stake", gas_limit: 1000000 }
2021-12-07T13:39:07.345402Z ERROR ThreadId(21) [ibc-0] estimate_gas: failed to simulate tx with non-recoverable error: gRPC call failed with status: status: InvalidArgument, message: "recovered: decoding bech32 failed: invalid bech32 string length 3\nstack:\ngoroutine 1255 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x65\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.newDefaultRecoveryMiddleware.func1({0x534f2e0, 0xc003934a20})\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/recovery.go:71 +0x27\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.newRecoveryMiddleware.func1({0x534f2e0, 0xc003934a20})\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/recovery.go:39 +0x30\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.processRecovery({0x534f2e0, 0xc003934a20}, 0xc003aa0240)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/recovery.go:28 +0x37\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.processRecovery({0x534f2e0, 0xc003934a20}, 0x59e5440)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/recovery.go:33 +0x5e\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx.func1()\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/baseapp.go:588 +0xfd\npanic({0x534f2e0, 0xc003934a20})\n\truntime/panic.go:1038 +0x215\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.SetUpContextDecorator.AnteHandle.func1()\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/setup.go:59 +0x1fd\npanic({0x534f2e0, 0xc003934a20})\n\truntime/panic.go:1038 +0x215\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/tx.(*wrapper).FeeGranter(0x2020202020202020)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/tx/builder.go:149 +0x65\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.RejectFeeGranterDecorator.AnteHandle({}, {{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/fee_grant.go:22 +0x99\ngit.luolix.top/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/handler.go:40 +0x158\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.ConsumeTxSizeGasDecorator.AnteHandle({{_, }}, {{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/basic.go:142 +0x3c6\ngit.luolix.top/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/handler.go:40 +0x158\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.ValidateMemoDecorator.AnteHandle({{, _}}, {{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/basic.go:66 +0x2ee\ngit.luolix.top/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/handler.go:40 +0x158\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.TxTimeoutHeightDecorator.AnteHandle({}, {{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/basic.go:199 +0x28e\ngit.luolix.top/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/handler.go:40 +0x158\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.ValidateBasicDecorator.AnteHandle({}, {{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/basic.go:34 +0x1ce\ngit.luolix.top/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/handler.go:40 +0x158\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.MempoolFeeDecorator.AnteHandle({}, {{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/fee.go:54 +0x306\ngit.luolix.top/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/handler.go:40 +0x158\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.RejectExtensionOptionsDecorator.AnteHandle({}, {{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/ext.go:35 +0x12e\ngit.luolix.top/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/handler.go:40 +0x158\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.SetUpContextDecorator.AnteHandle({}, {{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/setup.go:64 +0x68e\ngit.luolix.top/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/handler.go:40 +0x158\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx(0xc00058b520, 0x2, {0xc003893400, 0x276, 0x276})\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/baseapp.go:637 +0x63f\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.(*BaseApp).Simulate(...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/test_helpers.go:22\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/tx.txServer.Simulate({{{0x0, 0x0, 0x0}, {0x59fb700, 0xc000553220}, {0x0, 0x0}, {0x59cb530, 0xc000fa20e0}, {0x59d5f80, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/tx/service.go:108 +0xcf\ngit.luolix.top/cosmos/cosmos-sdk/types/tx._Service_Simulate_Handler({0x545e260, 0xc001162000}, {0x59c33b8, 0xc00393d230}, 0xc00391c230, 0x0)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/tx/service.pb.go:732 +0x170\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.(*GRPCQueryRouter).RegisterService.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc0038ddbc0}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/grpcrouter.go:92 +0x23e\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.(*BaseApp).handleQueryGRPC(0x203000, 0xc00056c6c0, {{0xc003893180, 0x279, 0x279}, {0x5571086, 0x23}, 0x10, 0x0})\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/abci.go:574 +0x1ef\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.(*BaseApp).Query(0xc00058b520, {{0xc003893180, 0x279, 0x279}, {0x5571086, 0x23}, 0x10, 0x0})\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/abci.go:418 +0x713\ngit.luolix.top/tendermint/tendermint/abci/client.(*localClient).QuerySync(0xc0005511a0, {{0xc003893180, 0x279, 0x279}, {0x5571086, 0x23}, 0x0, 0x0})\n\tgit.luolix.top/tendermint/tendermint@v0.34.11/abci/client/local_client.go:250 +0x171\ngit.luolix.top/tendermint/tendermint/proxy.(*appConnQuery).QuerySync(0x4, {{0xc003893180, 0x279, 0x279}, {0x5571086, 0x23}, 0x0, 0x0})\n\tgit.luolix.top/tendermint/tendermint@v0.34.11/proxy/app_conn.go:159 +0x6e\ngit.luolix.top/tendermint/tendermint/rpc/core.ABCIQuery(0x0, {0x5571086, 0x23}, {0xc003893180, 0x279, 0x279}, 0x3e9, 0x0)\n\tgit.luolix.top/tendermint/tendermint@v0.34.11/rpc/core/abci.go:20 +0xf6\ngit.luolix.top/tendermint/tendermint/rpc/client/local.(*Local).ABCIQueryWithOptions(0xc0038d79e8, {0x1, 0x0}, {0x5571086, 0xa}, {0xc003893180, 0x8, 0x52c5600}, {0x0, 0x0})\n\tgit.luolix.top/tendermint/tendermint@v0.34.11/rpc/client/local/local.go:87 +0x45\ngit.luolix.top/cosmos/cosmos-sdk/client.Context.queryABCI({{0x0, 0x0, 0x0}, {0x59fb700, 0xc000553220}, {0x0, 0x0}, {0x59cb530, 0xc000fa20e0}, {0x59d5f80, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/client/query.go:79 +0x19e\ngit.luolix.top/cosmos/cosmos-sdk/client.Context.QueryABCI(...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/client/query.go:55\ngit.luolix.top/cosmos/cosmos-sdk/client.RunGRPCQuery({{0x0, 0x0, 0x0}, {0x59fb700, 0xc000553220}, {0x0, 0x0}, {0x59cb530, 0xc000fa20e0}, {0x59d5f80, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/client/grpc_query.go:119 +0x31d\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.(*BaseApp).RegisterGRPCServer.func1({0x59c33b8, 0xc0039118f0}, {0x5493600, 0xc0005b96e0}, 0xc003934040, 0x0)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/grpcserver.go:41 +0x15e\ngit.luolix.top/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x59c33b8, 0xc0039118f0}, {0x5493600, 0xc0005b96e0})\n\tgit.luolix.top/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngit.luolix.top/grpc-ecosystem/go-grpc-middleware/recovery.UnaryServerInterceptor.func1({0x59c33b8, 0xc0039118f0}, {0x5493600, 0xc0005b96e0}, 0x18, 0xc003934040)\n\tgit.luolix.top/grpc-ecosystem/go-grpc-middleware@v1.3.0/recovery/interceptors.go:33 +0xc8\ngit.luolix.top/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x59c33b8, 0xc0039118f0}, {0x5493600, 0xc0005b96e0})\n\tgit.luolix.top/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngit.luolix.top/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1({0x59c33b8, 0xc0039118f0}, {0x5493600, 0xc0005b96e0}, 0xc002e10b01, 0xc002e10b58)\n\tgit.luolix.top/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:34 +0xbf\ngit.luolix.top/cosmos/cosmos-sdk/types/tx.Service_Simulate_Handler({0x545e260, 0xc001162000}, {0x59c33b8, 0xc0039118f0}, 0xc0038ede60, 0xc003911920)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/tx/service.pb.go:741 +0x138\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.(*BaseApp).RegisterGRPCServer.func2({0x545e260, 0xc001162000}, {0x59c33b8, 0xc0039118f0}, 0x54f5180, 0xc0011fa600)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/grpcserver.go:90 +0xdc\ngoogle.golang.org/grpc.(*Server).processUnaryRPC(0xc00055b6c0, {0x59dd0b0, 0xc001241b00}, 0xc0011fa600, 0xc000d1ba10, 0xc002e007e0, 0x0)\n\tgoogle.golang.org/grpc@v1.37.0/server.go:1210 +0xc8f\ngoogle.golang.org/grpc.(*Server).handleStream(0xc00055b6c0, {0x59dd0b0, 0xc001241b00}, 0xc0011fa600, 0x0)\n\tgoogle.golang.org/grpc@v1.37.0/server.go:1533 +0xa2a\ngoogle.golang.org/grpc.(*Server).serveStreams.func1.2()\n\tgoogle.golang.org/grpc@v1.37.0/server.go:871 +0x98\ncreated by google.golang.org/grpc.(*Server).serveStreams.func1\n\tgoogle.golang.org/grpc@v1.37.0/server.go:869 +0x294\n: panic: invalid request", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc"} }
Error: foreign client error: error raised while creating client for chain ibc-0: failed sending message to dst chain : gRPC call failed with status: status: InvalidArgument, message: "recovered: decoding bech32 failed: invalid bech32 string length 3\nstack:\ngoroutine 1255 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:24 +0x65\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.newDefaultRecoveryMiddleware.func1({0x534f2e0, 0xc003934a20})\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/recovery.go:71 +0x27\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.newRecoveryMiddleware.func1({0x534f2e0, 0xc003934a20})\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/recovery.go:39 +0x30\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.processRecovery({0x534f2e0, 0xc003934a20}, 0xc003aa0240)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/recovery.go:28 +0x37\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.processRecovery({0x534f2e0, 0xc003934a20}, 0x59e5440)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/recovery.go:33 +0x5e\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx.func1()\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/baseapp.go:588 +0xfd\npanic({0x534f2e0, 0xc003934a20})\n\truntime/panic.go:1038 +0x215\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.SetUpContextDecorator.AnteHandle.func1()\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/setup.go:59 +0x1fd\npanic({0x534f2e0, 0xc003934a20})\n\truntime/panic.go:1038 +0x215\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/tx.(*wrapper).FeeGranter(0x2020202020202020)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/tx/builder.go:149 +0x65\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.RejectFeeGranterDecorator.AnteHandle({}, {{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/fee_grant.go:22 +0x99\ngit.luolix.top/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/handler.go:40 +0x158\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.ConsumeTxSizeGasDecorator.AnteHandle({{
, }}, {{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/basic.go:142 +0x3c6\ngit.luolix.top/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/handler.go:40 +0x158\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.ValidateMemoDecorator.AnteHandle({{, _}}, {{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/basic.go:66 +0x2ee\ngit.luolix.top/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/handler.go:40 +0x158\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.TxTimeoutHeightDecorator.AnteHandle({}, {{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/basic.go:199 +0x28e\ngit.luolix.top/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/handler.go:40 +0x158\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.ValidateBasicDecorator.AnteHandle({}, {{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/basic.go:34 +0x1ce\ngit.luolix.top/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/handler.go:40 +0x158\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.MempoolFeeDecorator.AnteHandle({}, {{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/fee.go:54 +0x306\ngit.luolix.top/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/handler.go:40 +0x158\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.RejectExtensionOptionsDecorator.AnteHandle({}, {{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/ext.go:35 +0x12e\ngit.luolix.top/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/handler.go:40 +0x158\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/ante.SetUpContextDecorator.AnteHandle({}, {{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/ante/setup.go:64 +0x68e\ngit.luolix.top/cosmos/cosmos-sdk/types.ChainAnteDecorators.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc003a5e600}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/handler.go:40 +0x158\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.(*BaseApp).runTx(0xc00058b520, 0x2, {0xc003893400, 0x276, 0x276})\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/baseapp.go:637 +0x63f\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.(*BaseApp).Simulate(...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/test_helpers.go:22\ngit.luolix.top/cosmos/cosmos-sdk/x/auth/tx.txServer.Simulate({{{0x0, 0x0, 0x0}, {0x59fb700, 0xc000553220}, {0x0, 0x0}, {0x59cb530, 0xc000fa20e0}, {0x59d5f80, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/x/auth/tx/service.go:108 +0xcf\ngit.luolix.top/cosmos/cosmos-sdk/types/tx._Service_Simulate_Handler({0x545e260, 0xc001162000}, {0x59c33b8, 0xc00393d230}, 0xc00391c230, 0x0)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/tx/service.pb.go:732 +0x170\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.(*GRPCQueryRouter).RegisterService.func1({{0x59c3348, 0xc00012c008}, {0x59e5440, 0xc0038ddbc0}, {{0xb, 0x0}, {0xc00388d6f0, 0x5}, 0x10, {0x26552be0, ...}, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/grpcrouter.go:92 +0x23e\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.(*BaseApp).handleQueryGRPC(0x203000, 0xc00056c6c0, {{0xc003893180, 0x279, 0x279}, {0x5571086, 0x23}, 0x10, 0x0})\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/abci.go:574 +0x1ef\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.(*BaseApp).Query(0xc00058b520, {{0xc003893180, 0x279, 0x279}, {0x5571086, 0x23}, 0x10, 0x0})\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/abci.go:418 +0x713\ngit.luolix.top/tendermint/tendermint/abci/client.(*localClient).QuerySync(0xc0005511a0, {{0xc003893180, 0x279, 0x279}, {0x5571086, 0x23}, 0x0, 0x0})\n\tgit.luolix.top/tendermint/tendermint@v0.34.11/abci/client/local_client.go:250 +0x171\ngit.luolix.top/tendermint/tendermint/proxy.(*appConnQuery).QuerySync(0x4, {{0xc003893180, 0x279, 0x279}, {0x5571086, 0x23}, 0x0, 0x0})\n\tgit.luolix.top/tendermint/tendermint@v0.34.11/proxy/app_conn.go:159 +0x6e\ngit.luolix.top/tendermint/tendermint/rpc/core.ABCIQuery(0x0, {0x5571086, 0x23}, {0xc003893180, 0x279, 0x279}, 0x3e9, 0x0)\n\tgit.luolix.top/tendermint/tendermint@v0.34.11/rpc/core/abci.go:20 +0xf6\ngit.luolix.top/tendermint/tendermint/rpc/client/local.(*Local).ABCIQueryWithOptions(0xc0038d79e8, {0x1, 0x0}, {0x5571086, 0xa}, {0xc003893180, 0x8, 0x52c5600}, {0x0, 0x0})\n\tgit.luolix.top/tendermint/tendermint@v0.34.11/rpc/client/local/local.go:87 +0x45\ngit.luolix.top/cosmos/cosmos-sdk/client.Context.queryABCI({{0x0, 0x0, 0x0}, {0x59fb700, 0xc000553220}, {0x0, 0x0}, {0x59cb530, 0xc000fa20e0}, {0x59d5f80, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/client/query.go:79 +0x19e\ngit.luolix.top/cosmos/cosmos-sdk/client.Context.QueryABCI(...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/client/query.go:55\ngit.luolix.top/cosmos/cosmos-sdk/client.RunGRPCQuery({{0x0, 0x0, 0x0}, {0x59fb700, 0xc000553220}, {0x0, 0x0}, {0x59cb530, 0xc000fa20e0}, {0x59d5f80, ...}, ...}, ...)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/client/grpc_query.go:119 +0x31d\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.(*BaseApp).RegisterGRPCServer.func1({0x59c33b8, 0xc0039118f0}, {0x5493600, 0xc0005b96e0}, 0xc003934040, 0x0)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/grpcserver.go:41 +0x15e\ngit.luolix.top/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x59c33b8, 0xc0039118f0}, {0x5493600, 0xc0005b96e0})\n\tgit.luolix.top/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngit.luolix.top/grpc-ecosystem/go-grpc-middleware/recovery.UnaryServerInterceptor.func1({0x59c33b8, 0xc0039118f0}, {0x5493600, 0xc0005b96e0}, 0x18, 0xc003934040)\n\tgit.luolix.top/grpc-ecosystem/go-grpc-middleware@v1.3.0/recovery/interceptors.go:33 +0xc8\ngit.luolix.top/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x59c33b8, 0xc0039118f0}, {0x5493600, 0xc0005b96e0})\n\tgit.luolix.top/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a\ngit.luolix.top/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1({0x59c33b8, 0xc0039118f0}, {0x5493600, 0xc0005b96e0}, 0xc002e10b01, 0xc002e10b58)\n\tgit.luolix.top/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:34 +0xbf\ngit.luolix.top/cosmos/cosmos-sdk/types/tx._Service_Simulate_Handler({0x545e260, 0xc001162000}, {0x59c33b8, 0xc0039118f0}, 0xc0038ede60, 0xc003911920)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/types/tx/service.pb.go:741 +0x138\ngit.luolix.top/cosmos/cosmos-sdk/baseapp.(*BaseApp).RegisterGRPCServer.func2({0x545e260, 0xc001162000}, {0x59c33b8, 0xc0039118f0}, 0x54f5180, 0xc0011fa600)\n\tgit.luolix.top/cosmos/cosmos-sdk@v0.42.9/baseapp/grpcserver.go:90 +0xdc\ngoogle.golang.org/grpc.(*Server).processUnaryRPC(0xc00055b6c0, {0x59dd0b0, 0xc001241b00}, 0xc0011fa600, 0xc000d1ba10, 0xc002e007e0, 0x0)\n\tgoogle.golang.org/grpc@v1.37.0/server.go:1210 +0xc8f\ngoogle.golang.org/grpc.(*Server).handleStream(0xc00055b6c0, {0x59dd0b0, 0xc001241b00}, 0xc0011fa600, 0x0)\n\tgoogle.golang.org/grpc@v1.37.0/server.go:1533 +0xa2a\ngoogle.golang.org/grpc.(*Server).serveStreams.func1.2()\n\tgoogle.golang.org/grpc@v1.37.0/server.go:871 +0x98\ncreated by google.golang.org/grpc.(*Server).serveStreams.func1\n\tgoogle.golang.org/grpc@v1.37.0/server.go:869 +0x294\n: panic: invalid request", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc"} }

Copy link
Member

@adizere adizere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for your contribution @fkneeland-figure and @iramiller.

@adizere adizere merged commit 156e3d0 into informalsystems:master Dec 7, 2021
@fkneeland-figure
Copy link
Contributor Author

Thanks! @adizere

hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
* Add config option for fee granters

* update changelog

* add fee_granter to config

* make granter name consistent

* reset changelog and fmt

* updated changelog

* use optional type for fee_granter

* Documented `fee_granter` in config.toml.

Some fmt & clippy fixes.

Co-authored-by: Adi Seredinschi <adi@informal.systems>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow fee granters
3 participants