-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Closed
Copy link
Labels
Description
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
1.3.2-stable
What version of Foundryup are you on?
1.3.0
What command(s) is the bug in?
forge script
Operating System
macOS (Apple Silicon)
Describe the bug
Running forge script
on a reth client with blobs disabled fails because blobGasUsedRatio
contains null
instead of numbers.
Steps to Reproduce
- Create a
genesis.json
with blobs disabled, e.g.:
{
"config": {
"chainId": 1789,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0,
"londonBlock": 0,
"mergeForkBlock": 0,
"cancunTime": 0,
"pragueTime": 0,
"blobSchedule": {
"cancun": {"baseFeeUpdateFraction": 3338477, "max": 0, "target": 0},
"prague": {"baseFeeUpdateFraction": 5007716, "max": 0, "target": 0}
}
},
"nonce": "0x0",
"timestamp": "0x0",
"gasLimit": "0x1c9c380",
"difficulty": "0x0",
"alloc": {}
}
- Run the reth node:
docker run -v /Users/javad/Projects/kadena-evm-sandbox/genesis.json:/chain-config/genesis.json -p 8545:8545 --rm ghcr.io/paradigmxyz/reth node --chain /chain-config/genesis.json --http --http.addr 0.0.0.0 --http.api all
- Run any Forge script:
forge script script/Counter.s.sol:CounterScript \
--private-key <your-private-key> \
--broadcast
Expected Behavior
Forge should handle null values in blobGasUsedRatio gracefully when blobs are disabled.
Actual Behavior
Error: Failed to get EIP-1559 fees; deserialization error: invalid type: null, expected f64 at line 1 column 254
{"baseFeePerGas":["0x7","0x7","0x7","0x7","0x7","0x7","0x7","0x7","0x7","0x7","0x7"],"gasUsedRatio":[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"baseFeePerBlobGas":["0x1","0x1","0x1","0x1","0x1","0x1","0x1","0x1","0x1","0x1","0x1"],"blobGasUsedRatio":[null,null,null,null,null,null,null,null,null,null],"oldestBlock":"0x20b","reward":[["0x0"],["0x0"],["0x0"],["0x0"],["0x0"],["0x0"],["0x0"],["0x0"],["0x0"],["0x0"]]}
Environment
Forge: 1.3.2-stable
Reth: 1.6.0
Workaround
using legacy transaction (--legacy
flag)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done