Bug report
When encountering a block with base_fee_per_gas being higher than 2^64, it fails to parse the block
In previous graphnode versions, the base_fee_per_gas field of the block header was U256
https://github.com/graphprotocol/rust-web3/blob/585c9db21576fd9aace40607b764ec870a5faebb/src/types/block.rs#L38-L39
In v0.42, graphnode switched to the alloy instead, which has the base_fee_per_gas as an u64
https://github.com/alloy-rs/alloy/blob/76aa416c661c370e588b9632d34d8e5062ab00f5/crates/consensus-any/src/block/header.rs#L60-L69
example block (Stable chain):
{
"baseFeePerGas": "0x3635c9adc5dea00000",
"blobGasUsed": "0x0",
"difficulty": "0x0",
"excessBlobGas": "0x0",
"extraData": "0x",
"gasLimit": "0x5f5e100",
"gasUsed": "0x0",
"hash": "0x4c2bdd9b606eaee018d298d05f5f87e515cda8a50de3a61707e0cafcc79d88a5",
"logsBloom": "0x000", // truncated for readability
"miner": "0x940d1df160e775dd10ae4d2a0e8f6b31b93e469d",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": "0x24f946",
"parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash": "0xb6e0b620c568296ad79c8f9c018916be70bc73dde41e88685d2a107e1fb46281",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x270",
"stateRoot": "0x335a15e649f5e96135d84b8f41be3c39d99a8005567f6242361a1425d8e24eea",
"timestamp": "0x691c1eda",
"transactions": [],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": [],
"withdrawals": [],
"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
}
Relevant log output
WARN Trying again after eth_getBlockByNumber RPC call for block number 2423110 failed (attempt #73753) with result Err(deserialization error: invalid value: string "0x3635c9adc5dea00000", expected a 8 byte hex string at line 1 column 1711
{"baseFeePerGas": "0x3635c9adc5dea00000", /* ... */ }
IPFS hash
No response
Subgraph name or link to explorer
No response
Some information to help us out
OS information
None
Bug report
When encountering a block with
base_fee_per_gasbeing higher than 2^64, it fails to parse the blockIn previous graphnode versions, the
base_fee_per_gasfield of the block header was U256https://github.com/graphprotocol/rust-web3/blob/585c9db21576fd9aace40607b764ec870a5faebb/src/types/block.rs#L38-L39
In v0.42, graphnode switched to the alloy instead, which has the
base_fee_per_gasas an u64https://github.com/alloy-rs/alloy/blob/76aa416c661c370e588b9632d34d8e5062ab00f5/crates/consensus-any/src/block/header.rs#L60-L69
example block (Stable chain):
{ "baseFeePerGas": "0x3635c9adc5dea00000", "blobGasUsed": "0x0", "difficulty": "0x0", "excessBlobGas": "0x0", "extraData": "0x", "gasLimit": "0x5f5e100", "gasUsed": "0x0", "hash": "0x4c2bdd9b606eaee018d298d05f5f87e515cda8a50de3a61707e0cafcc79d88a5", "logsBloom": "0x000", // truncated for readability "miner": "0x940d1df160e775dd10ae4d2a0e8f6b31b93e469d", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "number": "0x24f946", "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", "parentHash": "0xb6e0b620c568296ad79c8f9c018916be70bc73dde41e88685d2a107e1fb46281", "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "size": "0x270", "stateRoot": "0x335a15e649f5e96135d84b8f41be3c39d99a8005567f6242361a1425d8e24eea", "timestamp": "0x691c1eda", "transactions": [], "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncles": [], "withdrawals": [], "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421" }Relevant log output
IPFS hash
No response
Subgraph name or link to explorer
No response
Some information to help us out
OS information
None