celestiaorg / celestia-app

Celestia consensus node
https://celestiaorg.github.io/celestia-app/
Apache License 2.0
342 stars 281 forks source link

tx_client: rework EstimateGas #3524

Open vgonkivs opened 4 months ago

vgonkivs commented 4 months ago

As we've added the option of auto- gas and fee calculations we should reconsider the estimation process for all transactions(besides MsgPayForBlob) and get rid of the Simulate request as it brings an additional overhead in the form of roundtrips. EstimateGas should work the same as it works for PFB transactions. To achieve this, we should empirically get constants for the estimation. I'd also propose breaking the issue into multiple PRs, so that each of them will contain the estimation for different tx types(I believe it will help to speed up the implementation).

cmwaters commented 4 months ago

I don't think we would ever get rid of estimate gas. There are so many message types (you can also mix and match), I don't think it's worth building a model for each but rather just for the most frequently used message types.

vgonkivs commented 4 months ago

Yes, we can start with MsgSend/MsgDelegate and then see how it goes 🙂. But, I'd personally, get rid of Simulate.