Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Light client jsonrpc eth_gasPrice returning 0 #10437

Closed
tdrml opened this issue Feb 28, 2019 · 5 comments
Closed

Light client jsonrpc eth_gasPrice returning 0 #10437

tdrml opened this issue Feb 28, 2019 · 5 comments
Labels
F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust.
Milestone

Comments

@tdrml
Copy link

tdrml commented Feb 28, 2019

  • Parity Ethereum version: 2.3.4-beta-0e95db1-20190220
  • Operating system: Linux - Ubuntu 18.04.2 LTS
  • Installation: one-line installer
  • Fully synchronized: yes - light
  • Network: ethereum
  • Restarted: yes

running with following options: --light --jsonrpc-apis all --pruning archive

curl --data '{"method":"eth_gasPrice","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545

actual
{"jsonrpc":"2.0","result":"0x0","id":1}

expected behavior
a result greater than 0.

@jam10o-new jam10o-new added F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust. labels Feb 28, 2019
@jam10o-new jam10o-new added this to the 2.5 milestone Feb 28, 2019
@jam10o-new
Copy link
Contributor

Hey, @tdrml is that the exact request you are sending?

@tdrml
Copy link
Author

tdrml commented Feb 28, 2019

Hi, @joshua-mir here's my curl:

curl --data '{"method":"eth_gasPrice","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545

response:

{"jsonrpc":"2.0","result":"0x0","id":1}

eth_blockNumber works fine

curl --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545

{"jsonrpc":"2.0","result":"0x6f1184","id":1}

@tdrml
Copy link
Author

tdrml commented Feb 28, 2019

@joshua-mir FYI - after 24+ hours of returning 0, I am now getting 18gwei (no restart or changes from me) which is well above ethgasstation, but I understand that parity has an entirely different algo for calculating gas price.

Looks like returning 0 is an intermittent issue.

EDIT: more like it intermittently works. My application checks the gas price about once an hour. Over the last 111 queries only 2 were not 0.

@bejavu
Copy link

bejavu commented Mar 19, 2019

I have the same problem in my side-chain using parity clients:

curl -s -X POST -H "Content-Type:application/json" -d '{"jsonrpc":"2.0","method":"eth_gasPrice", "params":[],"id":42}' https://rpc.fuse.io
{"jsonrpc":"2.0","result":"0x0","id":42}

I am using this client:
Parity-Ethereum//v2.1.3-beta-18ddd7c-20181015/x86_64-linux-gnu/rustc1.29.0

@niklasad1 niklasad1 self-assigned this Mar 26, 2019
@niklasad1
Copy link
Collaborator

niklasad1 commented Mar 26, 2019

Currently, we only read the local cache to get the gas_price when it is outdated and we return 0 but we should probably fetch the gas_price from the network instead

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

No branches or pull requests

4 participants