Skip to content

eth/gasprice: fix eth_feeHistory blobGasUsedRatio divide zero #31663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 19, 2025

Conversation

yiweichi
Copy link
Contributor

@yiweichi yiweichi commented Apr 17, 2025

The API eth_feeHistory returns {"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"json: unsupported value: NaN"}}, when we query eth_feeHistory with a old block that without a blob, or when the field config.blobSchedule.cancun.max in genesis.config is 0 (that happens for some projects fork geth but they don't have blob).

So here we specially handle the case when maxBlobGas == 0 to prevent this issue from happening.

@yiweichi yiweichi requested a review from rjl493456442 as a code owner April 17, 2025 08:54
@yiweichi yiweichi marked this pull request as draft April 17, 2025 08:54
@yiweichi yiweichi marked this pull request as ready for review April 17, 2025 09:30
@yiweichi yiweichi changed the title eth: fix ethapi eth_feeHistory eth/gasprice: fix eth_feeHistory blobGasUsedRatio divide zero Apr 17, 2025
@fjl fjl added this to the 1.15.9 milestone Apr 18, 2025
@rjl493456442 rjl493456442 merged commit bf6da20 into ethereum:master Apr 19, 2025
3 of 4 checks passed
sivaratrisrinivas pushed a commit to sivaratrisrinivas/go-ethereum that referenced this pull request Apr 21, 2025
…um#31663)

The API `eth_feeHistory` returns
`{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"json:
unsupported value: NaN"}}`, when we query `eth_feeHistory` with a old
block that without a blob, or when the field
`config.blobSchedule.cancun.max` in genesis.config is 0 (that happens
for some projects fork geth but they don't have blob).

So here we specially handle the case when maxBlobGas == 0 to prevent
this issue from happening.
0g-wh pushed a commit to 0glabs/0g-geth that referenced this pull request Apr 22, 2025
…um#31663)

The API `eth_feeHistory` returns
`{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"json:
unsupported value: NaN"}}`, when we query `eth_feeHistory` with a old
block that without a blob, or when the field
`config.blobSchedule.cancun.max` in genesis.config is 0 (that happens
for some projects fork geth but they don't have blob).

So here we specially handle the case when maxBlobGas == 0 to prevent
this issue from happening.
0g-wh pushed a commit to 0g-wh/0g-geth that referenced this pull request May 8, 2025
…um#31663)

The API `eth_feeHistory` returns
`{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"json:
unsupported value: NaN"}}`, when we query `eth_feeHistory` with a old
block that without a blob, or when the field
`config.blobSchedule.cancun.max` in genesis.config is 0 (that happens
for some projects fork geth but they don't have blob).

So here we specially handle the case when maxBlobGas == 0 to prevent
this issue from happening.
Rampex1 pushed a commit to streamingfast/go-ethereum that referenced this pull request May 15, 2025
…um#31663)

The API `eth_feeHistory` returns
`{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"json:
unsupported value: NaN"}}`, when we query `eth_feeHistory` with a old
block that without a blob, or when the field
`config.blobSchedule.cancun.max` in genesis.config is 0 (that happens
for some projects fork geth but they don't have blob).

So here we specially handle the case when maxBlobGas == 0 to prevent
this issue from happening.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants