Open Bidon15 opened 8 months ago
we do have to have a mechanism to pay for the state created in the new account, so we can't create accounts with zero funds, however there likely is a way to automate the creation of an account. One simple way would be add a 1utia bank.MsgSend as the first sdk.Msg of this tx, which would create the account.
we do have to have a mechanism to pay for the state created in the new account, so we can't create accounts with zero funds, however there likely is a way to automate the creation of an account. One simple way would be add a 1utia bank.MsgSend as the first sdk.Msg of this tx, which would create the account.
Ngl, any interim solution is fine as we need this UX feature to be done. Otherwise feegrant is not going to be adopted by RaaS teams due to itching nerves experience
What I thought happened was if you grant something to an account that doesn't exist you would create that account such that the account could sign a transaction and part of the fee would go towards setting the pubkey (and executing the rest of the transaction)
If you look here we should be creating the account: https://github.com/cosmos/cosmos-sdk/blob/7799bba7bc889288607576aa11655b5fc31a2da9/x/feegrant/keeper/keeper.go#L43-L48
If you look here we should be creating the account: https://github.com/cosmos/cosmos-sdk/blob/7799bba7bc889288607576aa11655b5fc31a2da9/x/feegrant/keeper/keeper.go#L43-L48
you mean by creating the account
- it should be created by default once we have the feegrant tx included?
bc in Rootul's gist, we are creating the account and funding it before doing the granting tx
https://gist.github.com/rootulp/c47606e177aad1f8959ea31fa077ca5e
To complete this, I think we should write a quick script to sanity test that this is does occur after creating a grant for an account. If it doesn't, then that appears to be a bug in the x/feegrant module. At that point, we can write a simple function that generates a bank.MsgSend of 1utia to the account and appends it to the sdk.Msgs in the feegrant tx, or fix the bug in v3 in a state breaking way.
Summary
You need the account to be pre-funded in order to use fee grant module
Problem Definition
This is a successful tx - https://mocha.celenium.io/tx/802a17777fbeab416f6fa2c25f0c56dd9cc8a92afc2a96293d114ac7c22efb5c
From a user pov - why do you need to prefund this account after the fee that has been granted for blob msgs?
celestia1rgj3z5rfydj3xulhm6glqr0zs7j8rr9rfh6ekw
Should the state be updated already if the grant tx is successful? I've tried this hypothesis without prefunding step and failed with insufficient balance error
Proposal
Ideally have the following UX:
For Admin Use