Open danbryan opened 1 month ago
cc @KyleMoser
Good error report. This happens because there is bad logic in the paginator chains/cosmos/query.go:256
that's only triggered if there are multiple pages of grants for the granter. So for most users, this is never triggered.
The fix will involve removing the nil pointer dereference and writing an interchaintest case to prove the paginator works properly. Then @danbryan can test it again using the same exact command he used initially.
In the meantime, there is an easy workaround, which is to set block_last_verified: 0
to any block height greater than 0 in the config.
Setting block_last_verified
> 0 seems to work as long as you make sure the grantees
match the name of the key
eg
kujira:
type: cosmos
value:
key: default
feegrants:
num_grantees: 1
granter: kujira1vkje22mayn72r0a7kna6agv0sqm6k94ry9k6dd
external_granter: true
grantees:
# - kujira1x9fxqdkg4rumkzrck8t3qnhm30jgfsx9ntcpas #does not work
- default # does work
block_last_verified: 19171312
granteelastsignerindex: 0
However, i think the stdout from the log message it has the wrong feepayer, it says
2024-05-25T16:01:10.625821Z info Successful transaction {"provider_type": "cosmos", "chain_id": "kaiyo-1", "gas_used": 336673, "fees": "1299ukuji", "fee_payer": "kujira1x9fxqdkg4rumkzrck8t3qnhm30jgfsx9ntcpas", "height": 19181348, "msg_types": ["/ibc.core.client.v1.MsgUpdateClient"], "tx_hash": "9F63A985A0DCA8BF1C138BC1434C1A0FA6385B624FBDBF81322C96915B1CF6A7"}
However, if you look at the tx it says
{
"key": "fee_payer",
"value": "kujira1vkje22mayn72r0a7kna6agv0sqm6k94ry9k6dd",
"index": true
}
Here are the changes i would suggest to make this tool more operator friendly.
1.) Don't require operators to set block_last_verified
> 0
2.) allow the address to be used in the grantees
3.) update the stdout log to reflect the true fee payer
4.) have some documentation on how to update the config to use an external feegrant.
GitHub Issue for Cosmos Relayer
Title
Panic in Relayer when Configuring Feegrant with Multiple Grant Results
Description
Encountering a panic in the Cosmos Relayer when attempting to configure feegrant using an existing allowance. This issue occurs when there is more than one page of results for the "query grants by granter" AllowancesByGranter RPC query.
Steps to Reproduce
The relayer panics with the following stack trace:
Configuration
Additional Context
Links
Documentation for Feegrant Configuration
Steps Taken
Successfully ran the update client with the configured feegrant:
Transaction details:
kujira1x9fxqdkg4rumkzrck8t3qnhm30jgfsx9ntcpas
However, the relayer panics and might be preventing additional necessary configurations.