`eth_getBlockByNumber` returns `transaction type not supported` if number is same as current block
Describe the bug
Calling BlockByNumber() on Optimism-bedrock (eth_getBlockByNumber in JSON-RPC), returns transaction type not supported.
On Optimism legacy, this function worked as expected.
To Reproduce Steps to reproduce the behavior:
- Run ops-bedrock
- Dial to ethclient to localhost:8545
- Call BlockByNumber()
blockNumber, err := client.BlockNumber(context.Background())
if err != nil {
Log.Warn().Msg("failed to get blocknumber")
return
}
block, err := client.BlockByNumber(context.Background(), big.NewInt(int64(blockNumber)))
if err != nil {
Log.Warn().Msg("failed to get block") <-- Error occurs here
return
}
The current block from client.BlockNumber = 4045.
current behavior of client.BlockByNumber:
If I use 4044: I get the block.
If I use 4045: I get transaction type not supported error
If I use 4046: I get not found error
Expected behavior I expect this function to give me a block
System Specs:
- OS: WSL2
- Package Version (or commit hash): c1ebc9592a9da9cc9f0eebcc10e9a8930b6f29a0
Perhaps there is something here that we missed with the deposit transaction deserialization
is this solved?I use geth client still have this problem