filecoin-shipyard / browser-retrieval

A p2p network of Filecoin content retrievers
21 stars 8 forks source link

Add a global boolean that enables/disables gas estimator #174

Closed ghost closed 3 years ago

ghost commented 3 years ago

@aistoc We've been having some trouble with the gas estimator. I don't think it's a problem with the code; I think it's a bug in Lotus that only appears when gas costs are high.

Initially, I thought we would have to revert your changes that added the gas estimator. However, I think a better solution is to keep that logic and just have a const boolean flag somewhere that control whether the gas estimator is used. If true, use the gas estimator as we are doing now.

If false, fall back to the old hard-coded default values we were using in messages previously:

gas limit:  "10000000"
gas fee cap:  "16251176117"
gas premium"140625002"