pyquarkchain icon indicating copy to clipboard operation
pyquarkchain copied to clipboard

gas_price() estimate function may not return expected value for multi-native token

Open qizhou opened this issue 4 years ago • 2 comments

https://github.com/QuarkChain/pyquarkchain/blob/d470e13a26c64875652b3b1665eb58895baeb4ab/quarkchain/cluster/shard_state.py#L1777

The current estimation will estimate based on the historical gas price of the same token id, which may be empty or small if the token id is not frequently used. A better way may still estimate the price for QKC first and then convert to the price for token id.

Further, returning MIN_TX_POOL_GAS_PRICE for other token ids other than QKC may be wrong.

qizhou avatar Mar 17 '20 23:03 qizhou

We may also need to add a jsonrpc that accepts:

  • chain id
  • token id
  • gas price and outputs
  • gas price in QKC

qizhou avatar Mar 20 '20 00:03 qizhou

lower the priority since it's not consensus-critical.

ninjaahhh avatar Mar 23 '20 00:03 ninjaahhh