When a queried block is not found on-chain, the RobustProvider returns (or intends to) BlockNotFound error. This was done to avoid the ambiguity of alloy of just returning None.
The problem is that different Nodes have different behavior when querying for non-existent blocks:
- Anvil (dev node): Returns
None
- Reth node: Returns
None
- Geth node: Return an RPC error (exact error message to be determined)
- etc.
We need to have tests running on different nodes verifying that the expected behavior is present, i.e. whether alloy properly converts all Nodes' "block not found" particular errors/results into None (and by extension, that RP converts to BlockNotFound).
When a queried block is not found on-chain, the
RobustProviderreturns (or intends to)BlockNotFounderror. This was done to avoid the ambiguity ofalloyof just returningNone.The problem is that different Nodes have different behavior when querying for non-existent blocks:
NoneNoneWe need to have tests running on different nodes verifying that the expected behavior is present, i.e. whether
alloyproperly converts all Nodes' "block not found" particular errors/results intoNone(and by extension, that RP converts toBlockNotFound).